Table of Contents
This page is based on SDK 2025.2.
The UDP input mailbox block allows receiving up to 1024 bytes of data via Ethernet using the UDP protocol (in SDK versions prior to 2025.2, the size limit is 8 byte). To send data, the UDP output mailbox should be used.
The block returns the data received via UDP on a specified port, formatted as a vector. The Signal decoding format parameter defines the data type of each element, and the Number of signals parameter defines the length of the output vector. The data can be interpreted as one of the following types: int8, int16, int32, uint8, uint16, uint32, float32, or float64.
Example: if Signal decoding format is set to uint32 (4 bytes) and Number of signals is 100, then:
- Size of the UDP data = 4 × 100 = 400 bytes
- Output = vector of 100 uint32 elements
Simulink block
Signal specification
- The first signal returns the data received via UDP, formatted as a vector. The Signal decoding format parameter defines the data type of each element, and the Number of signals parameter defines the length of the output vector.
- The second signal is the data valid output. It is set to 1 each time new data are available.
Parameters
- Ethernet port number: sets the port number on which data will be received.
- Signal decoding format: defines the type of the data output (int8, int16, int32, uint8, uint16, uint32, float32, or float64).
- Number of signals: specifies the vector size of the data output signal.
- Byte order: defines the byte order in which the data will be read. (Little-endian or Big-endian)
- Initial value: sets the initial value of the data output before any data are received.
PLECS block
- The first signal returns the data received via UDP, formatted as a vector. The Signal decoding format parameter defines the data type of each element, and the Number of signals parameter defines the length of the output vector.
- The second signal is the data valid output. It is set to 1 each time new data are available.
Parameters
- Ethernet port number: sets the port number on which data will be received.
- Signal decoding format: defines the type of the data output (int8, int16, int32, uint8, uint16, uint32, float32, or float64).
- Number of signals: specifies the vector size of the data output signal.
- Byte order: defines the byte order in which the data will be read. (Little-endian or Big-endian)
- Initial value: sets the initial value of the data output before any data are received.







