Omron CP1H CPU Operation Manual page 221

Cp1h cpu unit
Hide thumbs Also See for CP1H CPU:
Table of Contents

Advertisement

Interrupt Functions
a. The following example shows duplicate processing by an interrupt
task, which interrupts processing of a +B instruction between the first
and third operands and overwrites the same memory address.
Cyclic task
+B
D0
#0001
D0
Flow of Processing
Read D0 value (1234).
BCD addition: 1234 + 1 = 1235
Processing
interrupted.
Processing
Data saved.
of +B
Addition result (1235)
instruction
Processing
continues.
Write addition result (1235).
The interrupt occurs during processing of the +B instruction and the result is
saved temporarily without being written to the destination word (D0).
The interrupt task transfers the value of #0010 to D0, but the saved result of
the +B instruction (1235) is written to D0 when processing returns to the cyclic
task. In the end, the interrupt task's processing has no effect.
Prevention of Duplicate Processing
Cyclic task
DI
+B
EI
Interrupt task
Interrupt occurs.
0010 moved to D0.
Interrupt completed.
Disables execution of
interrupt programs.
D0
#0001
D0
Enables execution of
interrupt programs.
Section 5-1
MOV
#0010
D0
D0
1234
MOV executed
0010
1235
187

Advertisement

Table of Contents
loading

Table of Contents