Repeat Statement - Mitsubishi Electric MELSEC Q Series Programming Manual

Structured text
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

4 ST PROGRAM EXPRESSIONS

4.3.3 Repeat statement

4 - 15
(1) FOR...DO syntax
[Format]
FOR <Repeat variable initialization>
TO <Last value expression>
BY <Incremental expression> DO
< Statement ...>
END_FOR;
Repeat variable initialization: The data used as a repeat variable is initialized.
Last value expression, incremental expression:
Data types that can be used in <Last value expression, incremental
expression> of FOR syntax
Integer values and the integer values of operation expression results can be
specified.
[Explanation]
The data used as a repeat variable is initialized. The initialized repeat
variable is incremented or decremented according to the incremental
expression, and one or more statements between DO and END_FOR are
repeatedly executed until the value of repeat variable exceeds the last
value expression. The repeat variable after the FOR...DO statement is
completed retains the value at the time of completion.
The initialized repeat variable is incremented or
decremented according to the incremental
expression, and repetitive processing is performed
until the last value is reached.
4 - 15

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents