Send data over UDP network to specified remote machine
Instrument Control Toolbox
The UDP Send block sends data from your model to the specified remote machine using the UDP protocol.
Note: You need a license for both the Instrument Control Toolbox™ and Simulink® software to use this block.
The UDP Send block has one input port and it accepts both 1-D vector and matrix data. This block has no output ports. The block inherits the data type from the signal at the input port.
Use the Sink Block Parameters dialog box to select your acquisition mode and to set other configuration options.
Specify the IP address, name, or the Web server address of the machine to which you need to send data. This field is empty by default.
Specify the remote port on the host you need to send the data
to. The default port value is
9090. Valid port
Specify the port to bind on the local machine. The default value
-1, which automatically binds to an available
Click this button to:
Check if the specified remote address is correct.
Establish connection with the specified remote address and port.
When using binary or binblock format with more than 8 bits,
you can specify the instrument's byte order for the data. Your options
Big Endian or
Specify if you want to block the simulation while sending data. This option is selected by default. Clear this check box if you do not want the write operation to block the simulation.
The following diagrams show the difference between sending data using blocking mode and nonblocking mode.
In this example, you start the simulation at time (t=0). At time step (T1), data output is initiated and simulation stops until the block of data (B1) is sent to the specified remote address and port. After the data is sent, simulation resumes until time step (T2), where the block initiates another data output and simulation is blocked until the block of data (B2) is sent to the remote address and port, and the simulation resumes.
Nonblocking Mode – Scenario 1
In this scenario, the data output outpaces the simulation speed. Data output is initiated at the first time step (T1) and the corresponding block of data (B1) is sent to the specified remote address asynchronously. The simulation runs continuously in this mode.
Nonblocking Mode – Scenario 2
In this scenario, the simulation is nonblocking and occurs faster than the data initiation.
At time step T1: The block of data (B1) is sent to the specified remote address and port asynchronously.
At time step T2: The simulation is blocked until the block of data (B1) is sent completely. When the (B1) is completely sent, the new block of data (B2) is sent asynchronously, and the simulation resumes.
Note: Several factors, including network connectivity and model complexity, can affect the simulation speed. This can cause both nonblocking scenarios to occur within the same simulation.