![background image](http://html1.mh-extra.com/html/omron/srm1-programing-02-2001/srm1-programing-02-2001_programming-manual_742414096.webp)
2-2
Section
CPM2A/CPM2C High-speed Counters
75
Using Data Areas
The high-speed counter’s present value (PV) is stored in words SR 244 to
SR 247 as shown below.
SR 244
SR 245
SR 246
SR 247
PV
PV
PV
PV
Interrupt input (counter mode) 0
Interrupt input (counter mode) 1
Interrupt input (counter mode) 2
Interrupt input (counter mode) 3
Words SR 244 to SR 247 are refreshed with every scan, so there may be a dis-
crepancy from the exact PV at any given time.
Words SR 244 to SR 247 cannot be used as work word even when the interrupt
inputs (counter mode) are not used.
When the PV is read by executing PRV(62), words 244 to 247 are refreshed with
the same timing.
Mask/Unmask All Interrupts
For details regarding masking and unmasking all interrupts, refer to
2-1-2 Inter-
rupt Inputs
.
Application Example
In this example, the PV is decremented every time input 00003 is turned ON, and
DM 0000 is incremented by 1 by an interrupt subroutine every 100 times
(64 Hex) that input 00003 is turned ON.
The following diagram shows input wiring in the CPM2A.
Input device
Explanation
Wiring