udpAddrMake

PLCopen motion icon

 Function - Build an address buffer for UDP functions.

This function:

  • Builds an address buffer for UDP functions.
  • Is required for building an internal UDP address to be passed to the udpSendTo function in case of UDP client processing.

Inputs

Input

Data Type

See Data Types.

Range

Unit

Default

Description

En

BOOL

0 to 1

N/A

No default

Execute the function.

IPaddr

STRING

0.0.0.0, 255.255.255.255

N/A

No default

IP address in the form XXX.XXX.XXX.XXX.

port

DINT

0 to 65535

N/A

No default

IP port number.

add[ ]

USINT

0 to 32

N/A

No default

Buffer containing the UDP address (filled on output).

Outputs

Output

Data Type

See Data Types.

Range

Unit

Description

OK

BOOL

FALSE, TRUE

N/A

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

bAddrMake := udpAddrMake('10.156.238.176',Server_Port,add); //server details