UDP Send

Send data over UDP network to a remote device

  • Library:
  • Real-Time UDP


The UDP Send block sends data over a UDP network to a remote device. The block can send data by using the connection between the development and target computers or by using a dedicated Ethernet card. If you use a dedicated Ethernet card, add a UDP Configure block to your model.

The parameter Local IP address applies only when the block executes on a target computer. If your model is running in Simulink® on the development computer, you can use this block to transmit data to a remote device. In this case, the Windows® operating system determines the network connection.

To broadcast to all devices, set To IP address to, otherwise set To IP address to a valid IP address.



expand all

Vector of uint8 containing data to transmit over the UDP network. To determine how many bytes of data to transmit, use the Length input port.

Data Types: uint8

Determines the number of bytes of data to transmit. Specify the width of the Data vector as the maximum number of bytes that you expect to transmit.


expand all

When Local IP address is set to Use host-target connection, the block uses the connection between the development and target computers. Otherwise, the block uses the value that you set in the Local IP address parameter of the UDP Configure block.

Specifies local UDP port through which to transmit data.

The value −1 means that the block transmits using any available port.

Specifies IP address of target device. To broadcast, send to

Specify the UDP port of target device. With To IP address, this parameter defines the destination of the data transmission.

Enter the base sample time or a multiple of the base sample time.

Introduced in R2016b

Was this topic helpful?