Repeat Control With Specified Count: For - Next - Mitsubishi Electric Melsec Q Series Programming Manual

Motion controller (sv13/sv22)
Hide thumbs Also See for Melsec Q Series:
Table of Contents

Advertisement

5 OPERATION CONTROL PROGRAMS

5.17.3 Repeat control with specified count: FOR - NEXT

Format
[Usable data]
Setting
16-bit
data
Bit device
integer
type
(D)
(S1)
(S2)
(S3)
[Setting data]
Setting data
[Functions]
FOR(D) = (S1)TO(S2)STEP(S3) - NEXT
Word device
64-bit
32-bit
floating
integer
point
type (L)
type (F)
(D)
Device used for loop control counter
(S1)
Initial value of loop control counter
(S2)
Final value of loop control counter
(S3)
Incremental value of loop control counter
(1) (S1) is substituted to the device specified with (D) as initial value, and the block
between FOR and NEXT is repeatedly executed.
(2) The incremental value specified with (S3) is added to the device specified with (D)
at every execution of NEXT. If the device value specified with (D) is larger than the
final value specified with (S2), the repeat control of the block between FOR and
NEXT is ended, and the next block of NEXT is executed.
(3) When the incremental value specified with (S3) is negative number, if the device
value specified with (D) is smaller than the final value specified with (S2), the
repeat control of the block between FOR and NEXT is ended.
(4) STEP can be omitted. If STEP is omitted, the repeat control is executed as "STEP
1".
Usable Data
Constant
16-bit
32-bit
Coasting
integer
integer type
timer
type (K/H)
(K/H, L)
Description
5 - 156
F/FS
Number of basic steps
Bit
64-bit
Calculation
conditional
floating
expression
expression
point
type (K)
Data type of result
G
FOR : 9
NEXT : 8
Comparison
conditional
expression
: Usable

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents