Main Content

UDP Send

Send UDP packets to another UDP host on Internet network

  • UDP Send block

Libraries:
Simulink Support Package for LEGO MINDSTORMS EV3 Hardware
Simulink Coder Support Package for BeagleBone Blue Hardware / Communication
Simulink Support Package for Android Devices / Communication

Description

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

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.

Examples

Ports

Input

expand all

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32

Parameters

expand all

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'.

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

Select this option to determine the local port source from which the block sends the data.

Enter the local port from which the block sends the data to the remote host.

Extended Capabilities

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

Version History

Introduced in R2017a