MATLAB: How to show communication between two computers using the UDP blocks in Instrument Control Toolbox using only a single computer

communicationcomputerscontrolinstrumentInstrument Control Toolboxtoolboxtwoudp

I have only a single computer and want to test the communication between two computers using the UDP blocks from the Instrument Control Toolbox. How do I set up the model to test this?

Best Answer

To a Simulink model, communication between two computers or between two local ports of a computer is equivalent. From that standpoint, the following example should be sufficient to validate the UDP communication capability of the Instrument Control Toolbox:
To be closer to communication between two computers using only one machine, a virtual machine might be the best one can do. In this case, one can have a model run on the host machine and use the UDP Send block to send data to the virtual machine. In the virtual machine, run another model that receives data with the UDP Receive block. The host machine and the virtual machine might need to be connected on a common network for this test to work.
For modelling delays in the network, please refer to the following: