Modifiers and operators in il, L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual
Page 684

L-force | PLC Designer
General Editors
682
DMS 4.1 EN 03/2011 TD29
13.8.2
Modifiers and operators in IL
The following modifiers can be used in Instruction List:
C
with JMP, CAL, RET:
The instruction only will be executed if the result of the
preceding expression is TRUE.
N
with JMPC, CALC, RETC:
The instruction will only be executed if the result of the
preceding expression is FALSE.
N
otherwise:
Negation of the operand (not of the accumulator)
The following table shows which operators can be used in combination with the
specified modifiers:
The "accumulator" always stores the current value,resulting from the preceding
operation.
Operator
Modifiers
Meaning
Example
LD
N
Loads the (negated) value of the operand
into the accumulator
LD iVar
ST
N
Stores the (negated) content of the
accumulator into the operand variable
ST iErg
S
Sets the operand (type BOOL) to TRUE
when the content of the accumulator is
TRUE
S bVar1
R
Sets the operand (type BOOL) to FALSE
when the content of the accumulator is
TRUE
R bVar1
AND
N,(
Bitwise AND of the accumulator and the
(negated) operand
AND bVar2
OR
N,(
Bitwise OR of the accumulator and the
(negated) operand
OR xVar
XOR
N,(
Bitwise exclusive OR of the accumulator
and the (negated)operand
XOR N,(bVar1,bVar2)
NOT
Bitwise negation of the accumulator's
content
ADD
(
Addition of accumulator and operand,
result is copied to the accumulator
ADD (iVar1,iVar2)
SUB
(
Subtraction of accumulator and operand,
result is copied to the accumulator
SUB iVar2
MUL
(
Multiplication of accumulator and
operand, result is copied to the
accumulator
MUL iVar2
DIV
(
Division of accumulator and operand,
result is copied to the accumulator
DIV 44
GT
(
Check if accumulator is greater than
operand, result (BOOL) is copied into the
accumulator; >
GT 23