Mitsubishi Electric R16MTCPU Programming Manual page 295

Hide thumbs Also See for R16MTCPU:
Table of Contents

Advertisement

Limited count for repeat control
■Description
Operation control program requires longer processing time if the operation control program or transition program has more
repeat control instructions (FOR - NEXT). The longer processing time may cause the increase of main cycle and the operation
cycle over in event task/NMI task, which is prevented by setting "Limited count for repeat control". Set "Limited count for
repeat control" in every normal task, event task and NMI task.
If the repeat control instruction (FOR - NEXT) is executed over "Limited count for repeat control" in an operation control
program or a transition program, a minor error (SFC) (error code: 31F8H) will occur, and the corresponding Motion SFC
program No. will stop to execute. For the subroutine called program, the call source program also stops to execute.
The repeat control instruction is executed once when the repeat control is judged to continue at FOR instruction execution
(when the condition is true). In the program shown below, each block is executed as the arrow indicates, and the repeat
control instruction is executed eight times.
(1)
FOR #0=K1 TO K2
FOR #10=K1 TO K3
(2) (3) (4)
#100=#100+K1
NEXT
NEXT
#0=K0
■Errors
None.
These parameters are imported and checked at leading edge of "[Rq.1120] PLC ready flag (R: M30000/Q: M2000)". When the
value that was set is outside the setting range, the moderate error (error code: 2220H) will occur.
(5)
Loop twice. #0 is from 1 to 2.
Loop three times.
(6) (7) (8)
#10 is from 1 to 3.
6 OPERATION FOR MOTION SFC AND PARAMETER
293
6.8 Task Parameters
6

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

R64mtcpuMelsec iq-r seriesR32mtcpu

Table of Contents