FunctionudpRcvFromVarPLCopen motion icon

Description

This function receives the contents a variable sent from another controller and saves it to a local variable. This allows for the exchange of data across controllers.

Arguments

Input

En Description Execute the function
  Data type BOOL
  Range [0,1]
  Unit n/a
  Default
sock Description Socket number, return value from udpCreate
  Data type DINT
  Range [0,+65535]
  Unit n/a
  Default
add[] Description Array which contains information about the sender (server) of information. This includes the sender's IP address.
  Data type USINT
  Range [0,32]
  Unit n/a
  Default
varName Description The name of a PxMM variable (or array or structure) that will store data from the sender. The variable should be the same type as what is being sent. See udpSendToVar.
  Data type STRING
  Range  
  Unit n/a
  Default

Output

OK Description Returns true when the function successfully executes. See Function - General rules.
  Data type BOOL
  Unit n/a
Q Description Number of bytes received
  Data type DINT
  Unit n/a

Examples

Structured Text

udpRcvFromVar( Socket_Number, Add, MyUDPVar )

Ladder Diagram

Function Block Diagram

Go back to the top of the page [Top]