Mitsubishi Electric Melsec Q Series Programming Manual page 380

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

Advertisement

5 OPERATION CONTROL PROGRAMS
[Errors]
[Program examples]
(5) Maximum multiplicities of repeat control are eight.
FOR...
FOR...
NEXT
NEXT
(6) When data types of (D), (S1), (S2) and (S3) are different, type conversion
processing is executed but an unintended operation may occur. Set the same
data type.
(1) In the following case, an operation error will occur, and the corresponding Motion
SFC program No. execution will be stopped. For the subroutine called program,
the call source program also stops to execute.
• (S1) data is outside the range of (D) data type.
• (D), (S1), and (S2) are indirectly specified devices, and the device No. is
outside the range.
• FOR to NEXT instruction is executed over the limited count for repeat control
set in parameter in an operation control program or a transition program.
(1) Program which repeats to substitute #0 data to Motion register (#) that is indirectly
specified with the device No. "#0+100" when #0 is between 1 and 10 (Incremental
value is 1.).
(When the program is ended, 1 to 10 is substituted to #101 to #110.)
FOR #0 = K1 TO K10
#(#0 + K100) = #0
NEXT
When the incremental value is positive number, the device value specified with (D)
is larger than the final value specified with (S2) after FOR to NEXT repeat is
completed. In the above example, #0 set in (D) is 11.
(2) Program which repeats to subtract #0 from #100 when #0 is between 100 to 10
(Incremental value is -10.).
FOR #0 = K100 TO K10 STEP K-10
#100 = #100 - #0
NEXT
When the incremental value is negative number, the device value specified with
(D) is smaller than the final value specified with (S2) after FOR to NEXT repeat is
completed. In the above example, #0 set in (D) is 0.
(2 level)
(1 level)
5 - 157

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents