EMI Lab#6
EMI Lab#6
Lab#6
Counters
Objective
To understand the operation of Counters and simulate the given tasks in Allen Bradley PLC.
Introduction
In this section we will cover the count up count down and reset instruction. Counters are very
essential in ladder logic programming. Counters are used to index, increment or decrement values.
Definition
CTU Count UP
Symbol
Definition
Increments the accumulated value at each false to true transition and retains the accumulated
value when the instruction goes false or when power cycle occurs.
The CTU is an instruction that counts false to true transition. When this transition happens the
accumulated value is incremented by one count.
A CTU accumulation is reset by the RES instruction.
If the accumulation value is over the maximum range then the overflow (OV) bit will be true.
Page 1
Instrumentation & Measurement Lab Air University Islamabad
Definition
Decrements the accumulate value at each false to true transition and retains the accumulated
value when the instruction goes false or when power cycle occurs.
The CTD is an instruction that counts false to true transition. When this transition happen the
accumulated value is decrements by one count.
A CTD accumulation is reset by the RES instruction.
If the accumulation value is below the minimum range then the underflow (UN) bit will be
true.
RES Reset
Symbol
Definition
Resets the accumulated value and status bit of a timer or counter.
Use a RES instruction to reset timers or counters. When the RES instruction is enabled, it
resets the Timer On Delay, Retentive Timer, and Counter Up, Counter Down instruction
having the same address as the RES instruction.
Page 2
Instrumentation & Measurement Lab Air University Islamabad
LAB TASKS:
Exercise 1:
Let us consider a system in which we have a switch to turn on a light when the switch is pressed 10
times the light should energize. We should also have a reset button.
Exercise 2:
A motor will be controlled by two switches. The Go switch will start the motor and the Stop switch
will stop it. If the Stop switch was used to stop the motor, the Go switch must be thrown twice to start
the motor. When the motor is active a light should be turned on. The start/stop switches are supposed
to be push buttons.
Exercise 3:
Exercise 4:
Page 3