Chapter 5 Power Supply / CPU
5- 12
5.3.6 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. MASTER-K series have 4 counter instructions such as CTU, CTD, CTUD, and CTR. The followings shows
brief information for counter operation. Refer to the ‘MASTER-K Instruction Manual’ for details.

1) Up counter (CTU)

-. The counter output relay is turned on when the current value reaches the preset value.
-. 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.
-. 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.

3) Up-down counter

-. The current value is increased with the rising edge of up-count input signal, and decreased with the rising edge of
down-count input signal.
-. The counter output relay is turned on when the current value is equal or greater than the preset value otherwise off.