TCP/IP Receive
Receive data over TCP/IP network from specified remote machine
Libraries:
Instrument Control Toolbox
Description
The TCP/IP Receive block configures and opens an interface to the specified remote address using the TCP/IP protocol. The configuration and initialization occur once at the start of the model's execution. The block acquires data either in blocking mode or nonblocking mode during the model's run time. Use the TCP/IP Receive block to read streaming data over a TCP/IP network. This block works only as a TCP/IP client and cannot be used as a TCP/IP server.
This block has no input ports. It has one or two output ports based on whether you select blocking or nonblocking mode. If you select blocking mode, the block has one output port, Data, corresponding to the data it receives. If you do not select blocking mode, the block has two output ports, Data and Status.
This block uses a First In, First Out (FIFO) buffer to receive data. At each time step,
the Data port returns the requested values from the buffer. In
nonblocking mode, the Status port indicates if the block has received new
data. If the Status port displays 1
, new data is
available and if the Status port displays
0
, no new data is available.
Other Supported Features
The TCP/IP Receive block supports the use of Simulink® Accelerator mode and Rapid Accelerator. This feature speeds up the execution of Simulink models.
The TCP/IP Receive block supports the use of model referencing. This feature lets your model include other Simulink models as modular components.
The TCP/IP Receive block supports C/C++ code generation. This feature allows you to generate C and C++ code using Simulink Coder™.
For more information on these features, see the Simulink documentation.
Examples
Ports
Output
Parameters
Extended Capabilities
Version History
Introduced in R2007b