Receive TCP/IP message on wired network
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 Arduino Ethernet Shield uses the following pins on different Arduino board variants.
Arduino Mega 2560 – pins 50 to 53.
Arduino Uno – pins 10 to 13.
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 the data is not available:
The Data block output emits the last received value.
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. See Block Produces Zeros or Does Nothing in Simulation
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.
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 is 0.000001 second.
Smaller values require the processor to complete the same number of instructions in less time, which can cause task overruns.