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

5 Ansichten (letzte 30 Tage)
Carolin Schmidt
Carolin Schmidt am 11 Dez. 2019
Kommentiert: Walter Roberson am 12 Mär. 2020
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 Kommentar
Walter Roberson
Walter Roberson am 12 Mär. 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?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by