Siemens SINUMERIK 840DE sl Commissioning Manual page 1174

Basesoftware and operating software
Hide thumbs Also See for SINUMERIK 840DE sl:
Table of Contents

Advertisement

Programming commands
6.3 Functions
6.3.37
WHILE/UNTIL loops
Description
A loop can be implemented with the DO LOOP commands. Depending on the configuration,
it is run through as long as a condition is satisfied (WHILE) or until a condition occurs (UNTIL).
As loops can impair the system performance, depending on the configuration, they should be
used carefully and without time-intensive actions in the loops.
It is recommended that a register (REG[]) be used as run variable, because normal display
variables (particularly those with system or user variables connection) also impair the system
performance due to the frequent updates or write operations.
The runtime of "Run MyScreens" methods can be determined with the DEBUG function (see
Section DEBUG (Page 151)). Problems caused by loops (high CPU load, reduced response
capability) may be identified in this way.
Note
As each FOR loop can be replaced by a WHILE loop, the syntax to formulate a FOR loop is
not supported in EasyScreen.
Programming
DO
LOOP_WHILE <Condition to continue the loop>
DO
LOOP_UNTIL <Condition to terminate the loop>
DO_WHILE <Condition to continue the loop>
LOOP
DO_UNTIL <Condition to terminate the loop>
LOOP
Example
REG[0] = 5
DO
188
<instructions>
<instructions>
<instructions>
<instructions>
SINUMERIK Integrate Run MyScreens (BE2)
Programming Manual, 12/2017, 6FC5397-1DP40-6BA1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents