UDP Send

Send UDP packets over IP network

Description

Send a UDP packet to a network address identified by the remote IP address and remote IP port parameters.

The block accepts input with data type int8, uint8, int16, uint16, int32, uint32, single, or double.

Note

If you are having trouble using UDP to communicate with a computer, investigate whether antivirus or firewall software might be blocking UDP traffic. If so, try reconfiguring the software to allow UDP traffic for a specific IP port number.

Parameters

Remote IP address (‘255.255.255.255’ for broadcast)

Enter the address or hostname of the IP node on the remote device.

To broadcast the UDP message to all devices, use the default parameter value, '255.255.255.255'. Use this approach sparingly to avoid creating unnecessary broadcast traffic. Often, IP routers are configured to drop broadcast UDP packets sent to '255.255.255.255'.

Remote IP port

The number of the IP port on the remote device, which can range from 1 to 65535. This value defaults to 25000.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.