udpSendTo
Description
This function sends UDP data to a server.
Arguments
Input
| En | Description | Execute the function |
| Data type | BOOL | |
| Range | [0,1] | |
| Unit | N/A | |
| Default | — | |
| sock | Description | ID of the client socket |
| Data type | DINT | |
| Range | [0,+65535] | |
| Unit | N/A | |
| Default | — | |
| nb | Description | Number of bytes of data to send |
| Data type | DINT | |
| Range | [0,65535] | |
| Unit | N/A | |
| Default | — | |
| add[] | Description | Buffer containing the UDP address |
| Data type | USINT | |
| Range | [0,32] | |
| Unit | N/A | |
| Default | — | |
| data | Description | The characters to send |
| Data type | STRING | |
| Range | [0,255] | |
| Unit | N/A | |
| Default | — |
Output
| OK | Description | Returns true when the function successfully executes. See Function - General rules. |
| Data type | BOOL | |
| Unit | N/A |
Examples
Structured Text
bUdpSendTo := udpSendTo(Socket_Number,5,add,'1000');
Ladder Diagram
Function Block Diagram





