Siemens SINUMERIK 808D ADVANCED Series Commissioning Manual page 292

Hide thumbs Also See for SINUMERIK 808D ADVANCED Series:
Table of Contents

Advertisement

Tag identifier
FOR
292
Meaning
For loop
for (initialization; test; continuation) instruction(s)
Syntax:
<FOR>
<INIT>...</INIT>
<CONDITION>...</CONDITION>
<INCREMENT>...</INCREMENT>
Instructions
...
</FOR>
The For loop is executed as follows:
1. Evaluation of the expression initialization (INIT).
2. Evaluation of the expression test (CONDITION) as a Boolean expression.
If the value is false, the For loop is exited.
3. Execution of the following instructions.
4. Evaluation of the expression continuation (INCREMENT).
5. Continue with 2.
All the variables within the INIT, CONDITION, and INCREMENT branches are declared
and initialized outside the FOR loop.
Example:
<LET name = "count">0</LET>
<FOR>
<INIT>
<OP> count = 0</OP>
</INIT>
<CONDITION> count <= 7 </CONDITION>
<INCREMENT>
<OP> count = count + 1 </OP>
</INCREMENT>
<OP> "plc/qb10" = 1+ count </OP>
</FOR>
Commissioning Manual
6FC5397-4EP10-0BA8, 07/2018

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 808d advanced t

Table of Contents