Three command is associated with the interrupt: interrupt return instructions IRET, numbered FNCO3; EI interrupt enable directive, the number is FNCO4; break prohibition of DI, the number is FNC05. They have no operands, occupies 1 program step.
PLC is usually in the interrupt disable State, composed of EI and DI instructions allow ranges to be interrupted. In the implementation to the interval, such as the interrupt source interrupt, CPU to suspend execution of the main program and perform interrupt service routine. When the breakpoint is encountered IRET returns continue to the main program. As shown in Figure 1, allow ranges to be interrupted if the interrupt source in X0 had a falling edge, then transferred to I000–numbered interrupt service routine, but the X0 will cause disruption but also controlled by M8050, when X20 M8050 control X0 cannot be interrupted.
Interrupt related instruction should be used note:
1) interrupt priority Queuing are as follows, if multiple interrupt occur in sequence, then the sequence occurs higher earlier levels, if multiple sources at the same time signaled interrupt pointer is smaller, the higher the priority;
2) when M8050~M8058 is ON, and prohibited the I0–~I8––interruption, when M8059 is ON all counter interrupt is prohibited;
3) without disrupting prohibited, but only by EI instruction to have a DI instruction;
4) when performing an interrupt service routine, if you have EI and DI in interrupt service routines, achieving interrupt nesting II, prohibit other interrupts.
