udpAddrMake

PLCopen motion icon

 Function - Build an address buffer for UDP functions.

Inputs

Input

Data Type

Range

Unit

Default

Description

En

BOOL

0, 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, 65535

N/A

No default

IP port number.

add[ ]

USINT

0, 32

N/A

No default

Buffer containing the UDP address (filled on output).

Outputs

Output

Data Type

Range

Unit

Description

OK

BOOL

 

N/A

Returns TRUE when the function successfully executes.

See Function - General Rules.

Remarks

  • 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.

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