MATLAB Answers

How can I communicate between PCs using Simulink?

14 views (last 30 days)
Yoshiyuki Otsuji
Yoshiyuki Otsuji on 16 May 2019
Commented: Walter Roberson on 12 Mar 2020
We are studying how to communicate between two PCs.
I would like to send data from Simulink on PC-1 to Simulink on PC-2 in real time. How can I do this?

  0 Comments

Sign in to comment.

Answers (1)

Etsuo Maeda
Etsuo Maeda on 20 May 2019
In Instrument Control Toolbox, TCP/IP, Serial Port, UDP, and Bluetooth inrerfaces are prepared for instrument communicaitons.
On the other hand, the TURE real-time communication is not available with those interface based communication.
Interface-Based Instrument Communication
I am not sure your goal but If your target is not a PC, please try to use Simulink Real-Time.
HTH

  2 Comments

Walter Roberson
Walter Roberson on 12 Mar 2020
My understanding is that xpc can be used on "pc" hardware that is being used to run a real time operating system instead of MS Windows (Windows is not real time!)
However, these days xpc is only supported for Speedgoat computers.
Walter Roberson
Walter Roberson on 12 Mar 2020
The difference between what Instrument Control does and "true real time" is that true real time offers a hard upper bound on time of operations.
There is no commercially available technology that can guarantee a hard upper limit on guaranteed correct communication between different systems. Tcp cannot do it: tcp sends over a link that is only "mostly correct" and puts in measures that can detect some kinds of transmission problems and return back a "Sorry, try that again?" response. But the reply to that could have problems and you could retry an indefinite number of times. Simple proof: remove the network cable and you can be sure that the data will not make it correctly within any fixed period of time.
"Remove the cable" is an argument that works for a lot of technologies. For wireless, put the transmitter inside a Faraday cage for the same effect.

Sign in to comment.

Sign in to answer this question.