フィルターのクリア

Sending over TCP/IP from simulink to a localhost.

12 ビュー (過去 30 日間)
Arsalan Shah
Arsalan Shah 2018 年 12 月 5 日
コメント済み: Arsalan Shah 2018 年 12 月 11 日
I am trying to send data from my simulink model to a server running on the same computer. The server is running on the localhost port 8080. My problem is that when I try to configure the TCP client block the client and remote server IP address are the same. As my server and Simulink are running on the same computer. All the examples I have come across are about sending data to a target/remote PC. Can anyone help me with achieve my goal.

回答 (1 件)

Koundinya
Koundinya 2018 年 12 月 11 日
To send data from the simulink model to a server running on the same machine, you could just specify the remote address as 'localhost' and the remote port as 8080 for the Simulink TCP/IP Send block parameters.
  1 件のコメント
Arsalan Shah
Arsalan Shah 2018 年 12 月 11 日
I was using the TCP/IP blocks from simulink realtime. But according to my understanding those blocks will only send data to a physically connected target device. I found another block TCP/IP Client Send block in the Instrument Control Toolbox in Simulink. With this block I am able to send data to my node.js server.
At the moment I am seeing this in my console. I am not sure how to parse it to the correct format. But working on it.
<Buffer 40 22 00 00 00 00 00 00>

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

カテゴリ

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

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by