While ... Endw Structure - HEIDENHAIN TNC 426 PB/M Technical Manual

Table of Contents

Advertisement

7.13.3 WHILE ... ENDW structure

7 – 172
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:
n
WHILET (WHILE TRUE):
Run the sequence if logic accumulator = 1.
n
WHILEF (WHILE FALSE):
Run the sequence if logic accumulator = 0.
n
ENDW (END WHILE):
End of the program sequence, return to the beginning
The TNC runs a WHILE ... ENDW loop only if at the beginning the WHILE
condition is fulfilled. Before the ENDW instruction you must reproduce the
condition for execution. For the WHILE ... ENDW structure the TNC generates
two internal labels. The condition can also be produced in a manner different
from before the WHILE instruction!
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
HEIDENHAIN Technical Manual TNC 426, TNC 430
STL
L M100
WHILET
L M101 A M102
ENDW

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 430 pa/mTnc 430 mTnc 426 cbTnc 430 caTnc 426 pbTnc 430 pa ... Show all

Table of Contents