XW2Z-200J-B9 Omron, XW2Z-200J-B9 Datasheet - Page 224

no-image

XW2Z-200J-B9

Manufacturer Part Number
XW2Z-200J-B9
Description
CONNECTOR CABLE 2M
Manufacturer
Omron
Datasheet

Specifications of XW2Z-200J-B9

Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
XW2Z200JB9
7-2-3
Disabling All
Interrupts
Enabling All
Interrupts
Interrupt Functions
Disabling and Enabling All Interrupts
Method 1:
Disabling all interrupts
in the main program
Note
Note
Note
This situation can be avoided with the programming methods shown in the fol-
lowing diagram.
@PLS2
Only one interrupt task number is recorded for pulse output and high-speed
counter interrupts. When a pulse output or high-speed counter interrupt is on
standby (because another interrupt is being executed or interrupts are dis-
abled) and another interrupt occurs, the earlier interrupt task number is
replaced with the most recent interrupt task number. Design the system to
allow sufficient time between interrupts for the length of the interrupt tasks to
prevent unwanted conflicts between interrupts.
All interrupts can be disabled using the DI(802) instruction, as shown below.
The following interrupts are disabled and enabled by DI(802) and EI(694).
Observe the following precautions when using DI(802).
The DI(802) instruction will disable all interrupts.
Interrupt processing will not be executed for an interrupt that occurs while
interrupts are disabled, but the interrupt event will be recorded for each type of
interrupt and interrupt processing will be executed when interrupts are
enabled.
The EI(694) instruction clears the prohibition on all interrupts that was set with
the DI(802) instruction.
Executing the EI(694) instruction merely returns the interrupts to the status
they were in before all interrupts were prohibited (disabled by DI(802)).
The EI(694) instruction does not enable all interrupts. If an interrupt was
masked before all interrupts were disabled, that interrupt will still be masked
after the prohibition on all interrupts is cleared.
EI
DI
D00010
• Input interrupts
• Interval timer interrupts
• High-speed counter interrupts
• Pulse output interrupts
• DI(802) and EI(694) cannot be used within an interrupt task to disable or
• Do not use DI(802) to disable all interrupts unless there is a specific need
#0001
#0000
enable interrupts.
to do so.
(@)DI
(@)EI
(Main program)
Method 2:
Executing the routine in the main program instead of
the interrupt task, where it could not be executed.
0002.00
@CTBL
RSET 0002.00
PRV
D10000
D00000
#0001
#0002
#0001
#0000
(Interrupt task)
Always
ON
P_On
ER Flag
P_ER
Section 7-2
CTBL
SET 0002.00
D00000
#0001
#0000
197