Documentation

TCP Client Configure

Configure a TCP client application that uses the specified Ethernet interface

  • Library:
  • TCP

Description

Configure a TCP client application and initialize a network interface for the application.

The combination of Client IP Address and Subnet mask must be unique across all Ethernet cards in the target computer, including the card for communicating between the development and target computers. Distinguish cards by specifying a different subnet for each. The subnet is the IP address masked by the subnet mask.

The Simulink® Real-Time™ TCP blocks function only when executed on the target computer. When simulated on the development computer, they do nothing.

Ports

Input

expand all

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

Output

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.

Parameters

expand all

Dependency

When you select this parameter, it deactivates the Client IP address, Subnet mask, Gateway, PCI bus, and PCI slot parameters and excludes the ports 22222 and 22223 from use by TCP.

The addresses 0.0.0.0 and 255.255.255.255 are invalid IP addresses.

Dependency

To activate this parameter, clear the Use host-target connection parameter.

The combination of Client IP address and Client local port must be unique.

Dependency

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

Mask that designates a logical subdivision of a network.

Dependency

To activate this parameter, clear the Use host-target connection parameter.

Gateway to access a different subnet. The gateway must be within the network.

To indicate that a gateway is not being used, enter 0.0.0.0 (the default). The address 255.255.255.255 is an invalid gateway IP address.

Dependency

To activate this parameter, clear the Use host-target connection parameter.

Enter the IP address of the server to which you want to connect the client.

The addresses 0.0.0.0 and 255.255.255.255 are invalid IP addresses.

Enter the port number of the server to which you want to connect the client.

Dependency

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

Enter the PCI bus number for the dedicated Ethernet card.

Dependency

To activate this parameter, clear the Use host-target connection parameter.

Enter the PCI slot number for the dedicated Ethernet card.

Dependency

To activate this parameter, clear the Use host-target connection parameter.

Enter the PCI function number for the Ethernet card.

Introduced in R2017a

Was this topic helpful?