Download Print this page

HEIDENHAIN MANUALplus 620 Technical Manual page 1747

Hide thumbs Also See for MANUALplus 620:

Advertisement

8.35.3 WHILE ... ENDW structure
January 2012
The WHILE ... ENDW structure repeats a program sequence if 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:
WHILET (WHILE TRUE):
Run the sequence if logic accumulator = 1.
WHILEF (WHILE FALSE):
Run the sequence if logic accumulator = 0.
ENDW (END WHILE):
End of the program sequence, return to the beginning
The control runs a WHILE ... ENDW loop only if at the beginning the WHILE
condition is fulfilled. Before the ENDW statement you must reproduce the
condition for execution. The control generates two internal labels for the
WHILE ... ENDW structure. The condition can also be produced in a way
different from before the WHILE statement!
Function
Load marker 100 into the logic accumulator; create
condition for 1st WHILE scan.
Run the following code if logic accumulator = 1
Program code for logic accumulator = 1
Produce the condition of repeated execution: Load
marker 101 in the logic accumulator and gate the
content of marker M102 with AND.
Jump back to the WHILE request
8.35 Program Structures
STL
L M100
WHILET
L M101
A M102
ENDW
1747

Advertisement

loading