Professional Documents
Culture Documents
Lab 6 Industrial Automation
Lab 6 Industrial Automation
Lab 6 Industrial Automation
LAB#06
Objective:
Ladder Logic Programming III
Implementation of Counter
Theory:
Counters
Counter is a sequential circuit. A digital circuit which is used for a counting pulses is known
counter. Counter is the widest application of flip-flops. It is a group of flip-flops with a clock
signal applied. Counters are of two types
Asynchronous or ripple counters.
Synchronous counters.
Asynchronous or ripple counters
The logic diagram of a 2-bit ripple up counter is shown in figure. The toggle (T) flip-flop
are being used. But we can use the JK flip-flop also with J and K connected permanently to
logic1. External clock is applied to the clock input of flip-flop A and QA output is applied to the
clock input of the next flip-flop i.e. FF-B.
Logical Diagram
Synchronous counters
If the "clock" pulses are applied to all the flip-flops in a counter simultaneously, then such a
counter is called as synchronous counter.
Logical Diagram
Classification of counters
Depending on the way in which the counting progresses, the synchronous or asynchronous
counters are classified as follows
Up counters
Down counters
Up/Down counters
UP/DOWN Counter
Up counter and down counter is combined together to obtain an UP/DOWN counter. A mode
control (M) input is also provided to select either up or down mode. A combinational circuit is
required to be designed and used between each pair of flip-flop in order to achieve the up/down
operation. Type of up/down counters
UP counting mode (M=0) − The Q output of the preceding FF is connected to the clock
of the next stage if up counting is to be achieved. For this mode, the mode select input M
is at logic 0 (M=0).
DOWN counting mode (M=1) − If M = 1, then the Q bar output of the preceding FF is
connected to the next FF. This will operate the counter in the counting mode.
When "CLR" is at 1, all of the contact Cn, FO0 (CUP), and CV value of the counter CV are
cleared to 0 and the counter stops counting.
When "CLR" is at 0, the counter is allowed to count up. The Counter counts up every time
the clock "CK" changes from 0 to 1 (adds 1 to the CV) until the cumulative current value is
equal to or greater than the preset value (CV>=PV), the counter "Count-Up" and the contact
status of the counter Cn and FO0 (CUP) changes to 1. If the input status of clock continues to
change, even the cumulative current value is equal and greater than the preset value, the CV
value will still accumulate until it reaches the up limit at 32767 or 2147483647. The contact Cn
and FO0 (CUP) stay at 1 as long as CV>=PV unless the "CLR" input is set to 1.
In WinProladder software counter is shown by the block
Tasks:
Task 1
Write a program to turn on light after 6 events and to turn it off after 10 seconds. Even may
be treated as two normally open switches.
Task 2
Design a ladder logic diagram that will use a counter elements as one UP/DOWN counter to
keep track of the cars in a certain parking plaza. If the numbers of cars exceed a certain value
(say 3), CAR LOT FULL light should be light up.
Conclusion:
In this we learn about counter, how counter count reading from Sensors.