Delsys Signal to MATLAB Simulink

6 ビュー (過去 30 日間)
Caly
Caly 2024 年 5 月 2 日
コメント済み: Paromita 2025 年 10 月 13 日
Hello everyone!
I am having troubles streaming emg signals to Simulink to run a continuous expereiment where I can take those live emg signals and analyze them. I was using the TCP/IP client receive block in Simulink to establish the connection between the delsys system and Simulink (ran a previous matlab script in order to establish the Delsys/Matlab connection), but the data points are scattered and though the peaks of the signal rise when muscle contractions occur, the emg signal produces square waves that have many holes in it. Thank you in advance
  1 件のコメント
Paromita
Paromita 2025 年 10 月 13 日
I’m also working on streaming data from the Delsys system to MATLAB. I’m not using Simulink — instead, I’m connecting through the command:
client = tcpclient('localhost', 50040);
The connection seems to be successful since I can see “remote 1 user” in the Trigno Control Utility. However, after using read/write commands to access the data, I’m not seeing any output saved in my data folder.
Do you have any idea what might be causing this issue? I can also share my code if that would help troubleshoot it better.
Thank you so much for the help!

サインインしてコメントする。

採用された回答

Anshuman
Anshuman 2024 年 6 月 17 日
Hi Caly,
The issue you're encountering with scattered data points and "square waves that have many holes in it" could be due to several factors ranging from the way the TCP/IP connection is set up, to the processing of the incoming data stream in Simulink. Here are few things that you can try at your end:
On TCP/IP side:
  1. The default buffer size might be too small, leading to data loss. Increase the buffer size to ensure that all incoming data can be accommodated.
  2. If the block is in non-blocking mode, it might not wait for enough data to arrive before proceeding, leading to "holes" in your data. Try setting it to blocking mode.
Simulink Model configuration:
  1. The execution rate of the Simulink model might be too slow to process the incoming data in real-time. Try increasing the fixed-step size.
  2. If the data is sent in chunks, make sure that your processing script or Simulink model is correctly reassembling these chunks into a continuous stream.
  1 件のコメント
Caly
Caly 2024 年 9 月 3 日
Thank you so much for your response! The "enable blocking" option fixed what I had trouble with!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelopment Computer Setup についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by