3. Instructions
726
CS/CJ/NSJ Series Instructions Reference Manual (W474)
DI
Applicable Program Areas
Flags
Related Auxiliary Area Words and Bits
Function
DI(693) is executed from the main program to disable all interrupt tasks except the power OFF interrupt
(I/O interrupt tasks, scheduled interrupt tasks, external interrupt tasks, input interrupt tasks, and high-
speed counter tasks) until EI(694) is executed. DI(693) is used when you do not what to execute
interrupt tasks during program execution in cyclic tasks. Interrupt causes that occur while interrupts are
disabled are recorded internally, the corresponding interrupt tasks are executed when interrupt tasks
are enabled again.
When a CJ2, CS1-H, CJ1-H, CJ1M and CS1D (for Single-CPU System) CPU Unit is being used, power
OFF interrupt processing can be disabled simultaneously when A503 (the Disable Setting for Power
OFF Interrupts) is set to A5A5 hex. Even if a power interruption is detected after DI(693) has been
executed, the CPU Unit will be reset after the program’s instructions have been executed in order up to
EI(694) or the END(001) instruction in the last task.
If the power OFF interrupt task is enabled, the CPU Unit will be reset after execution of the power OFF
interrupt task. For details, refer to information on the power OFF interrupt task in the CS/CJ Series
Programming Manual or the CJ2 CPU Unit Software Operation Manual (W473).
Precautions
All interrupt tasks will remain disabled until EI(694) is executed.
DI(693) cannot be executed from an interrupt task.
Instruction Mnemonic Variations
Function
code
Function
DISABLE INTERRUPTS DI @DI 693
Disables execution of all interrupt tasks except the
power OFF interrupt task for part of a program.
Symbol
DI
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or
transition programs
Usage OK OK OK OK Not allowed OK
Name Label Operation
Error Flag ER • ON if DI(693) is executed from an interrupt task.
• OFF in all other cases.
Name Address Contents
Disable Setting for Power OFF
Interrupts
A530 • A5A5 hex:
Enables the Disable Setting for Power OFF Interrupts. Power OFF processing (excluding execution of
the Power OFF interrupt task) is masked between the DI(694) and EI(694) instructions, so instruc-
tions up to EI(694) are executed.
• Other than hex #A5A5: Disable power OFF interrupt processing
DI(693)