690
11
11 Interrupt11.4 Counting Complete Interrupt
② Content of the interrupt subprogram
After M0 is connected, D2 increases by 1 every 10 ms. When D2 is greater than K20000, D2 is reset.
③ Enabling an interrupt (EI) in the main program (MAIN)
11.4 Counting Complete Interrupt
11.4.1 Overview
The function is used with the DHSCS comparison setting instruction. When the current value of the high-
speed counter reaches the specied one, the device executes an interrupt program.
11.4.2 Type of High-speed Counting Interrupt
Pointer Number Disable Interrupt
I010, I020, I030, I040, I050, I060, I070, and I080 M8059
• When M8059 is ON, all counting interrupt events are disabled.
• Pointer numbers cannot be reused.
11.4.3 Application
●
Example 1:
Y10 delay relates to the scan cycle
Running state
Y10 immediate output