Instrument Control Toolbox | ![]() ![]() |
Example: Communicating Between Two Hosts
This example illustrates how you can use UDP objects to communicate between two hosts. Your platform is considered the local host with name doejohn.dhcp
, while the other platform is considered the remote host with address 192.168.1.12
. To run this example on your platform, you can use the name of your machine as the local host.
u1
to the remote host. The warning occurs because you created u1
as a listener with no knowledge of u2
's address.
u1
, you must configure its datagram address and datagram port. This information is available to u1
after communication is established by u2
.
u1
, you should disconnect it from the host, and remove it from memory and from the MATLAB workspace.
![]() | The UDP Object Display | Writing and Reading Data | ![]() |