Download Print this page

HEIDENHAIN MANUALplus 620 Technical Manual page 1746

Hide thumbs Also See for MANUALplus 620:

Advertisement

8.35.1 IF ... ELSE ... ENDI structure
8.35.2 REPEAT ... UNTIL structure
1746
The IF ... ELSE ... ENDI structure permits the alternative processing of two
program branches depending on the value in the logic accumulator. The ELSE
branch is not mandatory. The following commands are available:
IFT (IF LOGIC ACCU TRUE):
Following code only if logic accumulator = 1
IFF (IF LOGIC ACCU FALSE):
Following code only if logic accumulator = 0
ELSE (ELSE):
Following code only if IF is not fulfilled
ENDI (END OF IF STRUCTURE):
End of the IF structure
Function
Load input I0 into the logic accumulator
Run the following code if logic accumulator = 1
Program code for I0 = 1
Run the following code if logic accumulator = 0;
command can be omitted
Program code for I0 = 0, can be omitted
End of the conditional processing
The REPEAT ... UNTIL structure repeats a program sequence until a condition
is fulfilled. Under no circumstances can you wait with this structure in the
cyclic PLC program for the occurrence of an external event! The following
commands are available:
REPEAT (REPEAT):
Repeat the program sequence from here.
UNTILT (UNTIL TRUE):
Repeat the sequence until the logic accumulator = 1.
UNTILF (UNTIL FALSE):
Repeat the sequence until the logic accumulator = 0.
The control runs a REPEAT ... UNTIL loop at least once!
Function
Assign the content of the logic accumulator to
marker 100; conclusion of the previous commands
Repeat the following program code
Program code to be run
Load the index register
Check the index register
Repeat until X >= 100
HEIDENHAIN Technical Manual MANUALplus 620
STL
L I0
IFT
ELSE
ENDI
STL
= M100
REPEAT
L X
>= K100
UNTILT

Advertisement

loading