TCP/IP Receive
Receive TCP/IP message on wired network
Library
Simulink Support Package for Arduino Hardware/Ethernet Shield
Description
Receive TCP/IP messages on a server port over a wired network.
Use this block when your model has the following requirements:
Reliable message transmission
Intact order of messages
Acceptable compromise on the transmission speed.
The TCP/IP Receive block has two block outputs, Data and Status.
When data is available:
The Data block output emits the data received from the TCP/IP server.
The Status block output emits
1
.
When data is not available, the Status block output emits
0
.
The Data block output emits uint8 values.
The Status block output emits int values.
During simulations without the hardware, this block emits zeroes.
Parameters
- Server port
Enter the port number through which you want the TCP/IP server to initiate the message reception. The server port numbers range from 0 to 65535.
Click View pin map to open the Arduino Pin Mapping table.
To know about the fixed ports and the allocated pins for the block, see Pin Mapping for Arduino Timer Independent Blocks.
- Sample time
Specify how often this block reads the TCP/IP messages, in seconds. Enter a value greater than zero. This value defaults to a sample time of
1
second. The minimum value is0.000001
second.Smaller values require the processor to complete the same number of instructions in less time, which can cause task overruns.