FunctionudpSendToVarPLCopen motion icon

Description

This function sends the contents of a local variable to another controller. 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 variable (or array or structure) to send to the receiver. The variable should be the same type as what is expected by the receiver. See udpRcvFromVar.
  Data type  
  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

Examples

Structured Text

udpSendToVar( Socket_Number, Add, MyUDPVar )

Ladder Diagram

Function Block Diagram

Go back to the top of the page [Top]