Skip to main content

Operator: MOVE

The IEC operator is used for assigning a variable to another variable of a corresponding type.

Because MOVE is available in the CFC, FBD, and LD editors, you can also use the EN/ENO functionality there for variable assignment.

Example 110. CFC in connection with the EN/ENO function

CODESYS assigns the value of the var1 variable to the var2 variable only when en_i is TRUE.

_cds_img_move.png

ST

ivar2 := MOVE(ivar1);

The corresponds to:

ivar2 := ivar1;