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