If ... Else ... Endi Structure; Repeat ... Until Structure - HEIDENHAIN TNC 415 Technical Manual

Hide thumbs Also See for TNC 415:
Table of Contents

Advertisement

3.18.1 IF ... ELSE ... ENDI Structure

The IF ... ELSE ... ENDI structure permits the alternative processing of two program branches
depending on the value in the Logic Accumulator. The ELSE branch can be omitted. The following
commands are available:
IFT
(If Logic Accu True)
IFF
(If Logic Accu False)
ELSE
(else)
ENDI
(End of IF-Structure)
Example:
L
I0
IFT
....
ELSE
....
ENDI
Internal jump labels are generated for the IF and ELSE instructions.

3.18.2 REPEAT ... UNTIL Structure

The REPEAT ... UNTIL structure repeats a program sequence until a condition is fulfilled.
Under no circumstances must this structure wait for an external event in the cyclical PLC program to
happen!
The following commands are available:
REPEAT
(Repeat)
UNTILT
(Until True)
UNTILF
(Until False)
A REPEAT ... UNTIL loop is always run at least once!
Example:
=
M100
REPEAT
.....
LX
>=
K100
UNTILT
An internal jump label is generated for the REPEAT ... UNTIL structure.
7-128
TNC 407/TNC 415/TNC 425
;If Logic Accu=1
;Program code for I0 = 1
;
;Program code for I0 = 0
;end of conditional processing
Repeat program sequence from here
Repeat sequence until Logic Accumulator=1
Repeat sequence until Logic Accumulator=0
;end of previous chain
;repeat following code
;code to be executed
;load Index Register
;check Index Register
;repeat until X>=100
3 Commands
Following code only if Logic Accumulator=1
Following code only if Logic Accumulator=0
Following code only if IF not fulfilled
End of IF Structure
can be omitted
can be omitted
01.98

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 425eTnc 415fTnc 407Tnc 415bTnc 425

Table of Contents