Send TCP/IP messages to connected clients
Configure TCP/IP stack to send TCP/IP messages from a server to remote interface identified by a remote IP. The TCP/IP Send block in your model creates a generated code configured for TCP/IP on your target hardware for sending messages.
Use this block when your model has the following requirements:
Reliable message transmission
Intact order of message
Acceptable compromise on the transmission speed.
The TCP/IP server this block creates on the Arduino hardware can accept up to four socket connections.
The Arduino Ethernet shield uses the following pins on different variants of Arduino boards.
If you set the Target hardware parameter to:
Arduino Mega 2560, pin numbers from 50 to 53 are used.
Arduino Uno, pin numbers from 10 to 13 are used.
You cannot use this block for Arduino Nano target hardware.
If you run a simulation of a model that contains this block without the target hardware, this block outputs zeroes. See Block Produces Zeros or Does Nothing in Simulation
Enter the port number through which you need the TCP/IP server to initiate the message transmission. The server port numbers range from 0 to 65535.