UDP Send
Purpose
Sends data as UDP packets over the network.
Description
The block sends data to a network device using UDP packets. The data at the input port d is casted to the specified data type and packed contiguosly with no padding. Little endian byte order is used for integer data types.
Data can either be sent regularly with a fixed sample time or on demand when the trigger input changes. When configured for triggered execution, packets are sent when the trigger signal changes in the manner specified by the Trigger type parameter:
- rising
Data is sent when the trigger signal changes from 0 to a non-zero value.
- falling
Data is sent when the trigger signal changes from a non-zero value to 0.
- either
Data is sent when the trigger signal changes from 0 to a non-zero value or vice versa.
Parameters
- Remote host name or IP address
The hostname or IP address of the remote network device where the data is sent to. The IP address must be specified as 4 bytes separated by dots, e.g. 127.0.0.1. If a host name is specified the RT Box must have access to a name server (DNS).
- Remote IP port
The port of the remote network device where the data is sent to. Ports below 1024 are reserved for system services and should not be used.
- Data type
The data type of the data in the UDP packet.
- Execution
Selects between regular and triggered execution.
- Sample time
The time period for regular packet transmission (for regular execution only).
- Trigger type
The direction of the edges of the trigger signal upon which the data is sent, as described above (for triggered execution only).