![Mitsubishi Electric MELSEC iQ-R-R00CPU User Manual Download Page 166](http://html.mh-extra.com/html/mitsubishi-electric/melsec-iq-r-r00cpu/melsec-iq-r-r00cpu_user-manual_239139166.webp)
164
10 TEST FUNCTION
10.2 Device test with execution conditions
Execution timing
Select whether to change the device/label value before or after the execution of the instruction of the specified step when
registering the device test with execution conditions.
When the device test with execution conditions is registered with the step of the specific instruction specified, depending on
the setting of the execution timing, the device/label may not be changed even if the specified step is executed.
When the step of the following instructions is specified and the execution timing is set to "Before executing instruction", the
device/label value is not changed by the device test with execution conditions even when execution conditions of the
instruction are satisfied and the specified step is passed.
*1 When the execution timing is set to "After executing instruction", the device/label is changed when the execution condition of the
instruction is not satisfied.
■
FOR instruction, NEXT instruction, FOR to NEXT instruction loop
When the device test with execution conditions is registered with the step for the FOR instruction, the NEXT instruction, or the
FOR to NEXT instruction loop specified, the timing to change the device/label differs from that when other instructions are
specified.
■
END instruction
When the step for the END instruction is specified, the execution timing cannot be set to "After executing instruction".
Program
(1) The device test with execution conditions that sets 20 in D0 in step (100) is
registered.
Setting of execution timing
Operation of CPU module
Before execution of the instruction in
step (101)
(2) A value in D0 is changed to 20.
After execution of the instruction in
step (101)
(3) A value in D0 is changed to 20.
Classification
Instruction name
Stop
STOP
Jump
, SCJ
, JMP
Loop
BREAK(P)
Ending a program
FEND
Calling a subroutine program
CALL(P)
, ECALL(P)
, XCALL
Return
RET, IRET
Instruction for specified step
Specification detail of execution timing
Set to "Before executing instruction"
Set to "After executing instruction"
FOR
Executed only once before starting the loop processing
Executed only once after starting the loop processing
(Specified devices are changed before the execution of
the program that is between the FOR and NEXT
instructions.)
NEXT
Executed only once after starting the loop processing
(Specified devices are changed after the execution of the
program that is between the FOR and NEXT
instructions.)
Executed only once after ending the loop processing
FOR to NEXT instruction loop
Executed only once before execution of the instruction at
specified step in the FOR to NEXT instruction loop
Executed only once after execution of the instruction at
specified step in the FOR to NEXT instruction loop
+
K100
(1)
D0
M0
(100)
+
K100
D0
M0
(100)
D0
10
20
120
(2)
+
K100
D0
M0
(100)
D0
10
110
20
(3)
Summary of Contents for MELSEC iQ-R-R00CPU
Page 2: ......
Page 151: ...9 MONITOR FUNCTION 9 1 Real Time Monitor Function 149 9 MEMO ...
Page 323: ...18 SEQUENCE SCAN SYNCHRONIZATION SAMPLING FUNCTION 321 18 MEMO ...
Page 330: ...328 20 ROUTING SETTING 20 3 Precautions MEMO ...
Page 423: ...26 BASIC CONCEPT 26 8 State Transition of the Redundant System 421 26 MEMO ...
Page 1014: ...1012 APPX Appendix 15 Added and Enhanced Functions MEMO ...
Page 1027: ......