![background image](http://html1.mh-extra.com/html/omron/cs1w-hca12-v1/cs1w-hca12-v1_operation-manual_741977143.webp)
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
Содержание CS1W-HCA12-V1
Страница 2: ......
Страница 6: ...vi...
Страница 20: ...xx Conformance to EC Directives 7...
Страница 38: ...18 Models and System Configurations Section 1 2...
Страница 78: ...58 Fail safe Circuits Section 3 5...
Страница 138: ...118 AR Area Section 6 4...
Страница 204: ...184 Improved Instructions Section 7 14...
Страница 222: ...202 Cycle Time Section 8 3...
Страница 240: ...220 Troubleshooting Flowcharts Section 9 5...
Страница 244: ...224 Precautions when Using the CX Programmer Appendix A...
Страница 252: ......
Страница 253: ......