ETH in – Ethernet input mailbox
Table of Contents
The Ethernet input mailbox block allows receiving 32-bit values via Ethernet using the UDP protocol.
It reads 4 bytes of data (32-bit) received via UDP/IP on the specified port and applies it to the output port of the block. The data can be interpreted as an int32
, an uint32,
or a float
. The ETH input mailbox block features a second output that indicates that new data have been received. The value on the output data port will remain unchanged until new data are received.
Simulink block
Signal specification
- The data output signal returns 32 bits of data received via UDP. The output data type is configured by the
Signal decoding format
parameter. - 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 (int32, uint32, or float32).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. The value is interpreted as a uint64.
PLECS block
Signal specification
- The data output signal returns 32 bits of data received via UDP. The output data type is configured by
Signal decoding format
parameter. - 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 (int32, uint32, or float32).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. The value is interpreted as a uint64.