Receive WiFi TCP/IP message on wireless network
Receive WiFi TCP/IP messages on a server port over a wireless 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 WiFi Shield uses the following pins on different Arduino board variants.
Arduino Mega 2560 – pins 50 to 53.
Arduino Uno – pins 10 to 13.
The WiFi TCP/IP Receive block has two block outputs, Data and Status.
When the data is available:
The Data block output emits the data received.
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 WiFi TCP/IP server to receive messages. The server port numbers range from 0 to 65535.
Specify how often this block reads the WiFi 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.