If ... Else ... Endi Structure; Repeat ... Until Structure - HEIDENHAIN iTNC 530 HSCI Technical Manual

Hide thumbs Also See for iTNC 530 HSCI:
Table of Contents

Advertisement

9.14.1 IF ... ELSE ... ENDI structure

9.14.2 REPEAT ... UNTIL structure

July 2013
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 iTNC 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
9.14 Program Structures
STL
L I0
IFT
ELSE
ENDI
STL
= M100
REPEAT
L X
>= K100
UNTILT
1843

Advertisement

Table of Contents
loading

Table of Contents