Switching Between Main Routine/Sub-Routine Program And Interrupt Program - Mitsubishi Electric MELSEC-Q Series User Manual

Hide thumbs Also See for MELSEC-Q Series:
Table of Contents

Advertisement

10 DEVICES

10.6.1 Switching between main routine/sub-routine program and interrupt program

10 - 40
The PLC System sheet of the PLC Parameter dialog box provides the option to save
(protect) or restore index register data (Z0 to Z9) when switching between main
routine/sub-routine program and a low-speed execution type program or between an
interrupt program.
If you do not want to write date onto index registers when using an interrupt program,
turn on the "High speed execution" check box in the "Interrupt program fixed program
setting" section of the PLC System sheet in the PLC Parameter dialog box. This will
enable you to switch between program quickly.
(1) When the "High-speed execution" check box is OFF:
(a) When the main routine/sub-routine program is switched to the interrupt
program, the main routine/sub-routine program's index register value is first
saved, and is then transferred to the interrupt program.
(b) When the interrupt program is switched to the main routine/sub-routine
program, the saved index register value is reset.
Executed program
Index register value
Index register storage area
Word devices should be used to transfer index register data from an
interrupt to a main routine/sub-routine program.
Main routine/
Switch-
ing
sub-routine
program
Transf-
erred
Z0=1
Saved
Z0=0
Z0=1
MELSEC-Q
Reset
Interrupt program
Z0=1 to Z0=3
Z0=1
Z0=1
: For interrupt program, Z0 is changed to 3.
Main routine/
sub-routine
program
Z0=1
Reset
Z0=1
10 - 40

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec qcpuMelsec q00jcpuMelsec q00cpuMelsec q01cpu

Table of Contents