Skip to main content

6.1.3.4.1 MOVE

Function

Assignment ( := ), transfers the contents of the operand at the IN input to the operand at the OUT output

LD Graphics

alt text

Parameter description

Interface variableDeclarationData typeDescription
INVar_InputANYThe value used for assignment
OUTVar_OutputANYOUT:=IN

Example

Assign the value of variable a to variable b through the move instruction, as shown in the figure below: Two DINT type variables are defined, and the move instruction is executed by compiling, downloading, and achieving the effect of a:=b

alt text

warning
  • When MOVE supports STRUCT, IN and OUT come from a UDT definition
  • When MOVE supports arrays, the IN and OUT array types are the same. Array type consistency standards:
    • The data types of the elements must be the same, and the STRING type requires the length defined by STRING to be consistent
    • The dimensions of the two ARRAYs must be the same
    • The number of elements in all dimensions must be the same, but the specific ARRAY restrictions (starting subscripts) do not need to be the same
    • Supports STRCUT arrays, but does not support FB type arrays
  • MOVE does not support FB type