This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Receive data over UDP network on a dedicated network interface


Simulink® Real-Time™ Library for PTP UDP


The Receive block receives UDP data on the specified local (destination) port. To receive all data sent to this port, set Source IP address to, otherwise set Source IP address to a valid IP address.

IP fragmentation is not supported in Simulink Real-Time PTP UDP blocks. The packet payload is limited to 1472 bytes (1500 bytes UDP packet size − 28 bytes combined packet header size).

Block Outputs



Vector of uint8 containing data received


Number of new bytes received, and otherwise 0

The default block behavior is to keep the previous output when there is no new data.

Block Parameters

Device ID

From the list, select a unique number to identify the Ethernet board. Select the same Device ID as the one you selected for the Real-Time UDP Configuration block.

Source IP address

Enter a valid IP address as a dotted decimal character vector, for example, You can also use a MATLAB® expression that returns a valid IP address as a character vector. With Local (destination) port, this parameter defines the source address.

The default address,, causes the block to accept UDP packets from any accessible computer. If set to a specific IP address, packets arriving from only that IP address are received.

The address is an invalid IP address.

Local (destination) port

Specify the port of the target computer or device from which to receive the UDP packets. With Source IP address, this parameter defines the source address.

Output port width

Enter the output port width.

Sample time

Enter the base sample time or a multiple of the base sample time (-1 means sample time is inherited).

See Also


External Websites

Introduced in R2011a

Was this topic helpful?