4 - 7 4 - 7
MELSEC-Q
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
(b) Using the interrupt program as a separate program
Interrupt programs can also be managed as separate, discrete programs
(stand-by type programs). (See Section 4.2.4 for details on stand-by type
programs).
However, the same interrupt program pointer number cannot be used more
than once in the program being executed by the CPU module.
(3) Executing interrupt programs
(a) In order to execute an interrupt program with the interrupt pointer I32 to I47,
IMASK and EI instructions are required to obtain permission for the
interruption. 1
1) If an interrupt factor occurs prior to an interruption permitted status, the
interrupt program corresponding to the factor will be executed when
the "interruption permitted" status is established.
2) If an interrupt factor occurs during a STOP/PAUSE, the interrupt
program corresponding to the factor will be executed when the
"interruption permitted" status is established following a return to the
RUN status.
Main routine
program
FEND
Interrupt
program
Interrupt
program
END
Interrupt program for
"I0" activated
Interrupt program
for "I29" activated
Program execution
FEND
EI
IRET
IRET
END
"I0" interrupt
program
"I29" interrupt
program
End of main
routine program
I0
I29
I0
I29
Interrupt program example
Interrupt program execution
Fig.4.3 Interrupt Program Execution
(b) When an interrupt factor occurs, the interrupt program with the interrupt
pointer number corresponding to that factor is executed.
However, interrupt program execution varies according to the condition at
that time.
1) If two or more interrupts occur at the same time:
The interrupt programs are executed, starting with the one
corresponding to an interrupt pointer number (I
) of the highest
priority. 2
The remaining interrupt programs remain on stand-by until processing
of the higher priority interrupt program is completed.
If the same interrupt factor as that being executed occurs before the
interrupt program is processed, the interrupt factor is stored in the
memory and, after the interrupt program has been processed, the
same interrupt program is executed again.
2) When an instruction is being executed:
Interruptions are prohibited during execution of instructions.
If an interrupt factor occurs during execution of an instruction, the
interrupt program will be executed after processing of the instruction is
completed.
Содержание QCPU (Q Mode)
Страница 111: ...5 19 5 19 MELSEC Q 5 ASSIGNMENT OF I O NUMBERS MEMO ...
Страница 450: ...App 59 App 59 MELSEC Q APPENDICES MEMO ...