319
Interrupt Functions
Section 6-1
Prevention of Duplicate Processing
b.
The following example shows duplicate processing by an interrupt
task, which interrupts processing while BSET is writing to a block of
words and yields an incorrect comparison result.
Since the interrupt occurs during BSET(071) processing and before #1234 is
set in D10, the content of D0 and D10 do not match when the comparison is
made in the interrupt task (*1) and output A remains OFF.
In the end (*2), the D0 and D10 both contain #1234 and match, but the correct
comparison result is not reflected in comparison result output A.
+B
D0
#0001
D0
DI
EI
Cyclic task
Disables execution of
interrupt programs.
Enables execution of
interrupt programs.
BSET
#1234
D0
D10
CMP
D0
D10
A
1234
1234
1234
1234
1234
1234
0502
ABCD
ABCD
ABCD
1234
OFF
OFF*
1
003E 0502
D0
D1
D2
D10
A
1234*
2
OFF
Cyclic task
Interrupt task
Equals Flag
#1234 set in D0.
#1234 set in D1.
#1234 set in D2.
#1234 set in D10.
BSET(071)
processing
CMP(020)
processing
Read D0.
Read D1.
Output result.
Compare D0 and D10.
Interrupted.
Continued.
Interrupt occurs.
Interrupt completed.
Flow of Processing
Summary of Contents for CP1L - 12-2007
Page 3: ...iv...
Page 9: ...x...
Page 13: ...xiv TABLE OF CONTENTS...
Page 21: ...xxii...
Page 33: ...xxxiv Conformance to EC Directives 6...
Page 65: ...32 Function Blocks Section 1 5...
Page 428: ...395 Clock Section 6 9...
Page 429: ...396 Clock Section 6 9...
Page 523: ...488 Troubleshooting Unit Errors Section 9 4...
Page 531: ...496 Replacing User serviceable Parts Section 10 2...
Page 563: ...528 Auxiliary Area Allocations by Function Appendix C...
Page 611: ...576 Auxiliary Area Allocations by Address Appendix D...
Page 638: ...603 Connections to Serial Communications Option Boards Appendix F Connecting to Unit...
Page 639: ...604 Connections to Serial Communications Option Boards Appendix F...
Page 669: ...634 Index...
Page 671: ...636 Revision History...