TCP Server

Configure TCP server application

  • Library:
  • Simulink Real-Time / TCP


Configure a TCP server application. This block assumes that a network interface has been configured for IP by the IP Config block.



expand all

If Enable is greater than zero, the block connects to the Ethernet device. Otherwise, the block does not connect.


expand all

The status value is one of:

  • 0 — Not connected

  • 1 — Connected

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.


expand all

If you are using the Ethernet connection between the development and target computers, this value must match the value of the TcpIpTargetAddress target setting. If you are using a dedicated Ethernet card, this value must match the Local IP Address parameter in the IP Config block for the network interface.

The addresses and are invalid IP addresses.

Programmatic Use

Block Parameter: serverAddress

The combination of Server IP address and Server port must be unique.

When you select the Use host-target connection parameter in the TCP configure blocks, you cannot use ports 22222 and 22223. Simulink® Simulink Real-Time™ reserves these ports for its own use.

Programmatic Use

Block Parameter: serverPort

Introduced in R2017a