Speedgoat to Speedgoat TCP Communication
16 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Rhett Green
el 8 de Mzo. de 2022
Comentada: Rhett Green
el 21 de Mzo. de 2022
I have been sending a command matrix from a MATLAB GUI to a simulink model running in standalone mode on a Speedgoat. I did this using the simulink blocks attatched. Then in my GUI I create a TCP client with tcp = tcpclient('192.168.7.5',5027);. I can then write my data with write(tcp,data);. For the next project however I need to communicate Speedgoat to Speedgoat via TCP. I used the simulink blocks TCP Server in one model and TCP Client in the other. This built fine but when I went to the MATLAB command window to create the TCP Server object with, t = tcpserver(IP address, port), so I can write and read data from them it says I need "Instrument Control Toolbox". It seems odd that I can create a client object fine but not a server. The blocks compiled so I'm assumming my Server and Client exist I just need to enable them. Is there a way I can do this without buying the "Instrument Control Toolbox" or must I buy it for Simulink to Simulink communication via TCP.
0 comentarios
Respuesta aceptada
Diego Kuratli
el 10 de Mzo. de 2022
The tcpserver function is only available in Instrument Control Toolbox. However, you could use the tcpclient function which is included in MATLAB:
Here is an example showing TCP host-target communication:
7 comentarios
Diego Kuratli
el 15 de Mzo. de 2022
On the Speedgoat side, we don't have a mechanism to detect new data, but you can add some logic to the data and length port.
On the host side (MATLAB), there are some callbacks that may help:
If in the host you have MATLAB+SLRT installed, I would look into the instrument object:
Más respuestas (0)
Ver también
Categorías
Más información sobre Development Computer Setup en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!