Main Content

Data Transmission Using UDP in Simulink

This example shows how to transfer a sine wave signal over UDP network using the UDP Send and UDP Receive blocks in DSP System Toolbox™.

The sine wave signal has a frequency of 1 Hz, sample time of 1/1000 seconds, and samples per frame of 1. The local IP port of the UDP Receive block and remote IP port of the UDP Send block are both set to 25000. The blocks are configured to send and receive 1 sample at a time.

Open and run the model. Visualize the transmitted and the received sine wave signals on the two Time Scope windows respectively.

In this example, the UDP Send and Receive blocks exist in the same Simulink model and are run on the same machine. However, you can also use the UDP Send and Receive blocks in two different models and communicate across two different machines.

See Also

| | |