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

1 view (last 30 days)
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 Comment
Walter Roberson
Walter Roberson on 12 Mar 2020
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?

Sign in to comment.

Answers (0)

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!