udpRcvFromArray

PLCopen motion icon

 FunctionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. - Receives a byte array through UDPClosed User Datagram Protocol.

Inputs

Input

Data Type

Range

Unit

Default

Description

En

BOOL

0, 1

N/A

No default

Execute the function.

sock

DINT

0, 65535

N/A

No default

Socket number, return value from udpCreate.

nb

DINT

0, 65535

N/A

No default

Number of bytes to be transferred.

add[ ]

USINT

0, 32

N/A

No default

Array which contains information about the server.

data[ ]

USINT

0, 65535

N/A

No default

Array of bytes to be transferred.

Outputs

Output

Data Type

Range

Unit

Description

OK

BOOL

 

N/A

Returns TRUE when the function successfully executes.

See Pipe Network - General Rules.

Q

DINT

 

N/A

Number of bytes received.

Remarks

None

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

BytesReceived := udpRcvFromArray(Socket_Number,nb,add,FrameClosed In networking dialect, a message is called a frame.);