Справочник Пользователя для Mitsubishi Electronics FXCPU
35 Interrupt Function and Pulse Catch Function
795
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
31
Appl
ied
ied
In
stru
cti
cti
ons
(Da
ta
ta
T
rans
fer
3)
fer
3)
32
Ap
plied
Instru
ctio
ns
Instru
ctio
ns
(High S
peed
Process
ing 2)
33
App
lied Instr
lied Instr
ucti
ons
(Exte
nsion File
Regis
ter C
ontrol
ontrol
)
34
Ap
pl
ied In
struct
struct
ions
(FX
3U
-C
F-
AD
P)
P)
35
Int
errupt
Fun
cti
Fun
cti
on
and Puls
e Cat
ch
Functi
on
A
Re
lation
sh
ip
s
be
tw
ee
n de
vic
vic
es
an
d ad
dre
ss
dre
ss
es
B
Ap
plie
d
In
structio
n List
35.2 Common items
2. Disabling interrupt pointers (for each interrupt routine) [interrupt function]
1) Programming method
The special auxiliary relays M8050 to M8059 for disabling interrupt are provided.
While an interrupt disable flag (M8050 to M8059) is ON, a corresponding interrupt program is not
executed even if the interrupt disable flag is set to OFF after a corresponding interrupt is generated.
While an interrupt disable flag (M8050 to M8059) is ON, a corresponding interrupt program is not
executed even if the interrupt disable flag is set to OFF after a corresponding interrupt is generated.
*1.
Cleared when the PLC mode is changed from RUN to STOP.
2) Program example
In the program example shown below, when M8053 is set to ON by M20, the interrupt input I301 triggered
by X003 is disabled.
by X003 is disabled.
35.2.3 Related items
1. Using the I/O refresh function (REF instruction)
When controlling an input relay or output relay in an interrupt program, the I/O refresh instruction REF can be
used to acquire the latest input information and immediately output the operation result. As a result, high
speed control is achieved without being affected by the operation cycle of the PLC.
used to acquire the latest input information and immediately output the operation result. As a result, high
speed control is achieved without being affected by the operation cycle of the PLC.
2. Interrupt operation while FROM/TO instruction is executed.
The interrupt operation is executed as follows depending on the ON/OFF status of the
special auxiliary relay M8028.
special auxiliary relay M8028.
1) While M8028 is OFF
While FROM/TO instructions are being executed, interrupts are automatically disabled. Input interrupts
and timer interrupts are not executed.
Interrupts generated during this period are immediately executed when the execution of FROM/TO
instructions are completed.
FROM/TO instruction can be used in an interrupt program when M8028 is OFF.
and timer interrupts are not executed.
Interrupts generated during this period are immediately executed when the execution of FROM/TO
instructions are completed.
FROM/TO instruction can be used in an interrupt program when M8028 is OFF.
2) While M8028 is ON
When an interrupt is generated while FROM/TO instruction is being executed, execution of the FROM/TO
instruction is paused and the interrupt program is executed.
FROM/TO instructions cannot be used in an interrupt routine program when M8028 is ON.
instruction is paused and the interrupt program is executed.
FROM/TO instructions cannot be used in an interrupt routine program when M8028 is ON.
Input interrupt
The input interrupts X000 to X005 correspond to M8050 to M8055
*1
respectively. When a relay
M8050 to M8055 turns ON, a corresponding input interrupt is disabled.
Timer interrupt
The timer interrupts 16
to 18
correspond to M8056 to M8058
*1
respectively. When a relay
M8056 to M8058 turns ON, a corresponding timer interrupt is disabled.
High speed counter interrupt
When M8059
*1
turns ON, all of the high speed counter interrupts 1010 to 1060 are disabled.
Interrupts
are enabled.
are enabled.
Interrupt
routine
routine
EI
EN
ENO
M8053
Command to disable an
interrupt triggered by X003
[Main program]
[Interrupt program]
(Event: I301)
(Event: I301)
When the rising edge
of X003 is detected
of X003 is detected
M20