Mitsubishi Electric MELSEC-Q Series User Manual page 45

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

Advertisement

4 SEQUENCE PROGRAM CONFIGURATION & EXECUTION
CONDITIONS
Interrupt program example
I0
I29
4 - 6
(3) Executing interrupt programs
(a)
To run an interrupt program, interrupts must have been enabled by the EI
instruction.
1)
If interrupt factors occur before interrupts are enabled, the interrupt
factors that occurred are stored, and the interrupt programs
corresponding to the stored interrupt factors are executed as soon as
interrupts are enabled.
2)
If the same interrupt factor occurs more than once, the interrupt factors
that occurred are stored or discarded.
EI
End of main
routine program
FEND
"I0" interrupt
program
IRET
"I29" interrupt
program
IRET
END
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) : When multiple interruptions occur simultaneously
When multiple interrupt programs are activated simultaneously, the
programs will be executed in order, beginning from the interrupt
program with the highest priority interrupt pointer number.
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.
1
Interrupt program execution
Main routine
program
FEND
I0
Interrupt
program
I29
Interrupt
program
END
MELSEC-Q
Program execution
Interrupt program for
"I0" activated
Interrupt program
for "I29" activated
2
4 - 6

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec qcpuMelsec q00jcpuMelsec q00cpuMelsec q01cpu

Table of Contents