Main Content

TCP/IP Send

Send data over TCP/IP network to another remote host

  • TCP/IP Send block

Libraries:
Simulink Coder Support Package for BeagleBone Blue Hardware / Communication
Simulink Support Package for Android Devices / Communication
Simulink Support Package for LEGO MINDSTORMS EV3 Hardware
Simulink Support Package for Raspberry Pi Hardware / Network

Description

Send data to a remote host/another hardware board over the network. You can set the connection mode of the block as a server or a client. When you set connection mode as TCP/IP client, you must provide the remote address and the remote IP port of the TCP/IP server to which you have to send the data. When you set the block as a TCP/IP server, you must provide the local IP port of the TCP/IP server. This IP port acts as the listening port of the TCP/IP server.

Ports

Input

expand all

The block accepts data as an [Nx1] array.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean

Parameters

expand all

Main Tab

Select this option to set the block as TCP/IP client or TCP/IP server.

Enter the local port number which acts as the listening port of the TCP/IP server. This parameter appears only when you set the Connection mode to Server.

Enter the remote server address to which to send the data. This parameter appears only when you set the Connection mode to Client.

Enter the remote server port. This parameter appears only when you set the Connection mode to Client.

Advanced Tab

Allow manual specification of local IP port from which to send data. This parameter appears only when you set the Connection mode to Client.

Enter the local port of the client to send data. This parameter appears only when you set the Connection mode to Client and select the check box Manually specify local IP port.

Select this option to specify for block to wait for the current data to be sent. Selecting this check box enables the ‘blocking mode’.

Specify the time the block waits for the data to be sent during each simulation time step. This field is unavailable, if you have not selected Wait until previous packet transmitted parameter. Enter inf value in this parameter, if you want the block to wait indefinitely until it sends the data.

Version History

Introduced in R2017a