Mitsubishi Electric MELSEC iQ-R-R00CPU User Manual page 81

Melsec iq-r series cpu module application user's manual
Table of Contents

Advertisement

Saving/restoring of the index register (Z, LZ)
When an interrupt program starts, the value of the index register (Z, LZ) of the running program is saved. When the interrupt
program finishes, and the saved value is restored to the running program. Note that when an interrupt program starts, the
local index register (Z, LZ) is not switched to the different one. When the local index register (Z, LZ) is used for the interrupt
program/fixed scan execution type program/event execution type program which uses occurrence of an interrupt as a trigger,
the register which has been used for the previous program is continuously used. Thus, the local index register (Z, LZ) cannot
be used independently.
• Saving/restoring of the index register
Scan execution
Execution program
type program
Value of the index register
Save area of the index
register
(for scan execution type
programs)
(1) This value can be used as a value specific to the scan execution type program. (Using the value in an interrupt program is not needed to be concerned.)
(2) This value can be used only at the moment an interrupt program, fixed scan execution type program, or event execution type program is executed. (The
value cannot be used continuously.)
• Operations of the local index register and local device
Scan execution
Execution program
type program (A)
Z0=0→Z0=1
Local index register (Z0) for A
Local index register (Z0) for B
*2
Local device (#D0) for A
#D0=0→#D0=1
*2
Local device (#D0) for B
*1 The value of Z0 is changed by the interrupt program, fixed scan execution type program, or event execution type program.
*2 For when SM777 is on (when using the local device of the program file of storage location)
Interrupt program/
Fixed scan execution type program/
Event execution type program
Switch
Without change
Z0=0
Z0=0
Z0=3
Save
Z0=0
Interrupt program/
Fixed scan execution type program/
Event execution type program (B)
Switch
Without change
Z0=1→Z0=10
Save
Not used
#D0=0→#D0=100
(1)
Scan execution
Return
Switch
type program
Return
Without change
*1
Z0=0
Save
Z0=0
Z0=0
Scan execution
Return
Switch
type program (A)
Without change
Return
Z0=1
Save
#D0=1
Interrupt program/
Fixed scan execution type program/
Event execution type program
Z0=0
(2)
Interrupt program/
Fixed scan execution type program/
Event execution type program (B)
Z0=1
Not used
#D0=100
1 RUNNING A PROGRAM
1.7 Interrupt Program
1
79

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents