Control Structures - Siemens sinumerik 840d Programming Manual

Hide thumbs Also See for sinumerik 840d:
Table of Contents

Advertisement

Flexible NC programming
1

1.12 Control structures

840D
840D
NCU 571
NCU 572
NCU 573
1.12

Control structures

Explanation
IF–ELSE–IFENDIF
LOOP–ENDLOOP
FOR–ENDFOR
WHILE–ENDWHILE
REPEAT–UNTIL
Function
The control processes the NC blocks as standard in
the programmed sequence.
In addition to the program branches described in this
Chapter, these commands can be used to define
additional alternatives and program loops.
These commands enable the user to produce well-
structured and easily legible programs.
Sequence
1. IF–ELSE–ENDIF
An IF–ELSE–ENDIF block is used to select one of
two alternatives:
IF (expression)
NC blocks
ELSE
NC blocks
ENDIF
If the value of the expression is TRUE, i.e. the
condition is fulfilled, then the next program block is
executed. If the condition is not fulfilled, then the
ELSE program branch is executed.
The ELSE branch can be omitted.
1-58
FM-NC
810D
840Di
Selection between 2 alternatives
Endless loop
Count loop
Loop with condition at beginning of loop
Loop with condition at end of loop
SINUMERIK 840D/840Di/810D/FM-NC Programming Guide Advanced (PGA) − 04.00 Edition
04.00
1
 Siemens AG 2000. All rights reserved

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik fm-ncSinumerik 840diSinumerik 810d

Table of Contents