Main Content

Real-Time UDP

Real-time communication with low-level internet protocol

Universal Datagram Protocol (UDP) is a packet-based protocol that uses an Ethernet board as physical layer. Each UDP packet contains bytes provided by an application layer. You can transfer data using this protocol from a real-time application that is executing on the target computer. For more information about the UDP standard, see UDP Transport Protocol.

The Simulink® Real-Time™ implementation can support either a dedicated Ethernet network or a shared Ethernet network.

To create a dedicated Ethernet network, use a separate Ethernet board that is compatible with PCI standard bus architectures, such as PCI, PCI Express®, and PXI®. Use the Speedgoat configuration utility to configure the dedicated Ethernet board. You can run this implementation of the protocol from a real-time application that is running on the target computer. You can use it to transfer data to and from a UDP-compatible device.

To create a shared Ethernet network, use the same Ethernet hardware port as the target computer uses to communicate with the development computer. Configure the UDP Send and UDP Receive blocks to use the host-target connection setting. You can run this implementation of the protocol from a real-time application that is running on the target computer. You can also run it from a Simulink model that is running on the development computer. To transfer data to and from a UDP-compatible device that is connected to this network, use a switch.

For multicast operations, use the UDP Multicast Receive block and UDP Send block. Multicast operations are supported by the real-time application that you build from the model. Multicast receive operation is not supported in model simulation on the development computer.

Functions

slrealtime.createUDPPacketBusObjCreated UDP packet bus object (Since R2022a)

Blocks

expand all

UDP SendSend data over UDP network to a remote device (Since R2020b)
UDP ReceiveReceive data over UDP network from a remote device (Since R2020b)
UDP Multicast ReceiveReceive data over UDP network from a remote device (Since R2021a)
Byte PackingConstruct data frames
Byte UnpackingDeconstruct data frames
Byte Reversal/Change EndianessReverse little-endian data for big-endian processor
Shared Memory PackShared memory pack
Shared Memory UnpackShared memory unpacking

Topics

Related Information

Featured Examples