How to use TCP/IP Client Send and Receive blocks?

5 次查看(过去 30 天)
I want to control a robot with TCP/IP and Simulink and receive values send from the robot. Therefore I want to use the blocks "TCP/IP Client Send" and "TCP/IP Client Receive" of Instrument Control Toolbox. I've written my own TCP server application that roots the received values from one client to all other clients.
The actual problem is, that when I try to send values (doesn't matter if double or uint8) to the server, the server only gets cryptic characters, as you can see in the picture.
I've already tried sending with the fprintf-function in a Matlab function block and the server got the values I expected. Unfortunately the correspondig fscan-function slowed down the simulation too much.
Has anybody ever had that problem before? Does the input of the block has to be a specific data type? - I couldn't find anything in the documentation.
  1 个评论
Walter Roberson
Walter Roberson 2020-3-12
If you send uint8('A':'E') then what is received? Can you adjust the tracing to also output the hex version of what was received?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Development Computer Setup 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by