Assignment operator, L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual
Page 56
Advertising

L-force | PLC Designer
What is What in PLC Designer
54
DMS 3.2 EN 02/2011 TD29
Instruction type
Example
CASE
CASE INT1 OF
1: BOOL1 := TRUE;
2: BOOL2 := TRUE;
ELSE
BOOL1 := FALSE;
BOOL2 := FALSE;
END_CASE;
FOR
J:=101;
FOR I:=1 TO 100 BY 2 DO
IF ARR[I] = 70 THEN
J:=I;
EXIT;
END_IF;
END_FOR;
WHILE J:=1;
WHILE J<= 100 AND ARR[J] <> 70 DO
J:=J+2;
END_WHILE;
REPEAT
J:=-1;
REPEAT
J:=J+2;
UNTIL J= 101 OR ARR[J] = 70
END_REPEAT;
EXIT EXIT;
Empty instruction
;
Assignment operator
On the left side of an assignment there is an operand (variable, address) to which is
assigned the value of the expression on the right side with the assignment operator :=
Example:
Var1 := Var2 * 10;
After completion of this line Var1 has the tenfold value of Var2.
Advertising