123
Interrupt Functions
Section 7-2
The following program sections show how to handle this problem.
Note
1.
Only one interrupt subroutine number is recorded for pulse output or high-
speed counter interrupts when another interrupt is being executed or inter-
rupts are disabled. The subroutine number of the most recent interrupt is
always recorded. Design the system to allow sufficient time between inter-
rupts for the length of the subroutines to prevent unwanted competition be-
tween interrupts.
2.
“No SBS” errors will occur when interrupt subroutines are defined, but
these will not affect operation.
7-2-3
Disabling and Enabling All Interrupts
All interrupts can be disabled using the INT instruction. The following inter-
rupts are disabled and enabled by INT.
• Input interrupts
• Interval timer interrupts
• High-speed counter interrupts
• Pulse output interrupts
Observe the following precautions when using INT.
• INT cannot be used within a subroutine to disable or enable interrupts.
• Do not use INT to disable all interrupts unless there is a specific need to
do so.
Disabling All Interrupts
The following instruction will disable all interrupts.
Note
Interrupts that occur while interrupts are disabled will be recorded and pro-
cessed when interrupts are enabled.
Enabling All Interrupts
The following instruction will enable all interrupts.
Method 1
Disabling all interrupts in the main
program when controlling a port
Method 2
Executing in the main program
instructions that could not be
executed in a subroutine
Programming in subrou-
tine for method 2
Always
ON
ER Flag
Summary of Contents for CS1W-HCA12-V1
Page 2: ......
Page 6: ...vi...
Page 20: ...xx Conformance to EC Directives 7...
Page 38: ...18 Models and System Configurations Section 1 2...
Page 78: ...58 Fail safe Circuits Section 3 5...
Page 138: ...118 AR Area Section 6 4...
Page 204: ...184 Improved Instructions Section 7 14...
Page 222: ...202 Cycle Time Section 8 3...
Page 240: ...220 Troubleshooting Flowcharts Section 9 5...
Page 244: ...224 Precautions when Using the CX Programmer Appendix A...
Page 252: ......
Page 253: ......