Main Content

TCP Send

Send data over TCP network to a remote device

Since R2020b

  • TCP Send block

Simulink Real-Time / IP


The TCP Send block sends data from a server application on a target computer to a remote client device.



expand all

When Enable > 0, the block attempts to transmit data to the remote device.

As a best practice, connect the Status output of a TCP configure block to the Enable input of the associated TCP Send and TCP Receive blocks.

Vector of Length to transmit to the client device.

Data Types: uint8

Number of uint8 values to transmit to the client device.


expand all

Returns the number of uint8 values transmitted to the client device.


expand all

This parameter is read-only.

The block receives the list of IP address and port pairs from the TCP configuration blocks in the model.

Ports 1 through 1023 and 5500 through 5560 are reserved for Simulink Real-Time communications.

Programmatic Use

Block Parameter: socketAddPort

Enter the base sample time or a multiple of the base sample time. -1 means that the sample time is inherited.

Programmatic Use

Block Parameter: sampleTime

Extended Capabilities

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

Version History

Introduced in R2020b