TCP

Real-time communication with Transmission Control Protocol

Transmission Control Protocol (TCP) is a client/server packet-based protocol that uses an Ethernet board as physical layer. Each TCP packet contains bytes provided by an application layer. You can transfer data using this protocol from a real-time application that is executing on the target computer. For more information about the TCP standard, see TCP Transport Protocol.

The Simulink® Real-Time™ implementation can support either a dedicated Ethernet network or a shared Ethernet network.

To create a dedicated Ethernet network, use a separate Ethernet board that is compatible with PCI standard bus architectures, such as PCI, PCI Express®, and PXI®. Configure the TCP Client Configure and TCP Server Configure blocks with the PCI bus and slot number of the dedicated Ethernet board. You can then transfer data to and from a TCP-compatible device that is connected to the target computer through the dedicated Ethernet board.

To create a shared Ethernet network, use the same Ethernet hardware port as the target computer uses to communicate with the development computer. Configure the TCP Client Configure and TCP Server Configure blocks to use the connection between development and target computers. To transfer data to and from a TCP-compatible device that is connected to this network, use a switch.

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

Blocks

expand all

TCP Client ConfigureConfigure a TCP client application that uses the specified Ethernet interface
TCP Server ConfigureConfigure TCP server application that uses the specified Ethernet interface
TCP SendSend data over TCP network to a remote device
TCP ReceiveReceive data over TCP network from a remote device
Byte PackingConstruct data frames
Byte UnpackingDeconstruct data frames
Byte Reversal/Change EndianessReverse little-endian data for big-endian processor

Functions

macaddrConvert character vector or string scalar MAC address to vector-based address

Topics

TCP Transport Protocol

The Simulink Real-Time software supports communication from the target computer to other systems or devices using Transmission Control Protocol (TCP).

Troubleshooting

Troubleshoot TCP Block Configuration

Investigate issues with TCP block configuration and usage that generate communication problems.

Featured Examples