Chapter 5
CPU Module
5.2.5
Counter Processing
The counter counts the rising edges of pulses driving its input signal and counts once only when the input signal is switched
from off to on. K series have 4 counter instructions such as CTU, CTD, CTUD, and CTR. The maximum counter
setting value is hFFFF ( = 65535). The followings shows brief information for counter operation.
1) Up counter (CTU)
The counter output relay is turned on when the current value reaches the preset value. After the counter relay output is
turned on, the current value will increase until it reaches the maximum counting value (hFFFF = 65535).
When the reset input is turned on, the counter output relay and current value is cleared as 0.
Input condition
Reset condition
2) Down counter (CTD)
When the CPU is switched to the RUN mode, the current value is set as preset value.
with the rising edge of counter input signal. The counter output relay is turned on when the current value reaches 0.
Input condition
Reset condition
1
If the retentive counter area is used for down counter, the reset input has to be turned on to initialize counter.
U
CTU
Cxxx
R
<S> xxxx
U
CTD
Cxxx
R
<S> xxxx
5-
1
The current value is decreased by 1
Need help?
Do you have a question about the K7 Series and is the answer not in the manual?