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

5 vues (au cours des 30 derniers jours)
Carolin Schmidt
Carolin Schmidt le 11 Déc 2019
Commenté : Walter Roberson le 12 Mar 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 commentaire
Walter Roberson
Walter Roberson le 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?

Connectez-vous pour commenter.

Réponses (0)

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by