beckhoff TwinCAT 2 PLC Control — 10.5.3.6 MOVE

Appendix 10.5.3.5 MOD Modulo Division of one variable by another of the types: BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT and UDINT. The result of this function will be the remainder of the division. This result will be a whole number. Example in IL: LD 9 MOD 2 ST var1 (* Result is 1 *) Example in ST: var1 := 9 MOD 2; Example in FBD: Similar Functions LMOD 10.5.3.6 MOVE Assignment of a variable to another variable of an appropriate type. As MOVE is available as a box in the graphic editors LD, CFC, there the (unlocking) EN/EN0 functionality can also be applied on a variable assignment. In the FBD editor this is not possible however.

Example in CFC in conjunction with the EN/EN0 function: Only if en_i is TRUE, var1 will be assigned to var2. Example in IL: LD ivar1 MOVE ST ivar2 (* Ergebnis: var2 erhдlt Wert von var1 *) ( ! you get the same result with: LD ivar1 ST ivar2 ) Example in ST: ivar2 := MOVE(ivar1); ( ! you get the same result with: ivar2 := ivar1; ) TwinCAT 2 PLC Control 314 Version: 1.0