EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-R-R04CPU - Page 82

Mitsubishi Electric MELSEC iQ-R-R04CPU
1028 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
80
1 RUNNING A PROGRAM
1.7 Interrupt Program
If the value of the index register used for the interrupt program is continuously used for the next interrupt
program, the value of the index register for the interrupt program must be saved or restored. Create a program
to add the MOV instruction and the ZPUSH/ZPOP instruction.
(1)This value can be used as a value specific to the main routine program.
(2)This value can be used as a value specific to the interrupt program. (This value can be used continuously.)
Z0=0 Z0=3
*3
D0=0 D0=3 D0=3D0=3-
Z0=0 Z0=3
*4
D0=3
Z0=0
Z0=0
Z0=0
Z0=0 Z0=0
MOV D0 Z0
I50
MOV K3 Z0
IRET
MOV Z0 D0
FEND
ÒÓ
Ò
Ó
(1)
(2)
Value of the index
register
Save area of the index
register
(for scan execution
type programs)
Save
Return
Without change Without change
Save
Interrupt program
Execution program
Main routine
program
Switch
Main routine
program
Switch
Interrupt program
Return
Value of D0
Program example
Main routine program
*3 A value in Z0 changes at MOV D0 Z0.
*4 Z is zero when the program Ò and Ó are not added.

Table of Contents

Related product manuals