Chapter 4 CPU modules MASTER-K
4-8
4.2.6 Counter
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. MASTER-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.
2) Down counter (CTD)
When the CPU is switched to the RUN mode, the current value is set as preset value.
1
The current value is decreased by 1 with the rising edge of counter input signal. The
counter output relay is turned on when the current value reaches 0.
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