Vous êtes sur la page 1sur 6

Industrial Electronics

College of Engineering
ECE / CpE Department
Ateneo de Naga University

Activity
3 Ladder Diagram: Timer / Counter Functions

OBJECTIVES
 Implement the counter functions using ladder diagram.
 Implement the timer functions using ladder diagram.

MATERIALS/EQUIPMENT
 PC/laptop with pre-installed Multisim 11

REFERENCE:
 Automating Manufacturing Systems with PLCs, Hugh Jack

PROCEDURE
A counter is a special function included in the PLC program language that
allows the PLC to increment or decrement a number each time the control logic for
the rung switches from false to true. This special function generally has two control
logic lines, one which causes the counter to count each time the control becomes
true and one which causes the counter to reset when the control line is true. A typical
counter is shown below.
Construct the given ladder diagram below using Multisim 11. Record the result
in Table 1.

Laboratory Exercise No. 3 Page 1


Industrial Electronics
College of Engineering
ECE / CpE Department
Ateneo de Naga University

After simulating the given ladder diagram, you will notice that contacts IN1
and IN2 control the counter. The topline, containing IN1, is referred to as the
COUNT LINE. The lower control line, containing IN2 is referred to as the RESET
LINE. In operation, if IN2 is closed the counter will be held in the reset condition,
that is, the ACTUAL value will be set to zero no matter whether IN1 is open or
closed. As long as the reset line is true, the ACTUAL value will be held at zero
regardless of what happens to the count line. If the RESET LINE is opened, the
counter will be allowed to increment the ACTUAL value each time the count
control line switches from false to true (off to on). The counter will continue to
increment the ACTUAL value each time IN1 switches from open to closed until
the ACTUAL value is equal to the PRESET value. At that time the counter will
stop incrementing the ACTUAL value and coil CTR1 will be energized. If at any
time during the counting process the RESET control line containing IN2 is made
to switch to true, the ACTUAL value will be reset to zero and the next count
signal from IN1 will cause the ACTUAL value to increment to 1.

In some cases it is convenient to have a counter that can count in either of


the two directions, called a bidirectional counter. For example, in a situation
where a PLC needs to maintain a running tally of the total number of parts in a
que where parts are both entering and exiting the que, a bidirectional counter can
be incremented when a part enters and decremented when a part exits the que.
The figure below shows a bidirectional counter, C2, which has three inputs and
consists of three rungs. Rung one controls the counting of C2 in the up direction,
rung two controls C2 in the down direction, and rung three resets C2.

Construct the given ladder diagram below using Multisim 11. Record the
result in Table 2.

Laboratory Exercise No. 3 Page 2


Industrial Electronics
College of Engineering
ECE / CpE Department
Ateneo de Naga University
A timer is a special counter ladder function which allows the PLC to
perform timing operations based on a precise internal clock, generally 0.1 or 0.01
seconds per clock pulse. Timers usually fall into two different categories
depending on the PLC manufacturer. These are retentive and non-retentive
timers. A non-retentive timer is one which has one control line, that is, the timer is
either timing or it is reset. When this type of timer is stopped, it is automatically
reset. An example of a non-retentive timer is shown below.

Construct the given ladder diagram above using Multisim 11. Record the
result in Table 3.

Notice that this timer has only one control line containing normally open
contact IN1. Also notice that, like the counter, there are two values, ACTUAL and
PRESET. These values are, as with the counter, the present and final values for
the timer. While the control line containing, in this case, IN1 is false (IN1 is open)
the ACTUAL value of the timer is held reset to zero. When the control line
becomes true (IN1 closes), the timer ACTUAL value is incremented each 0.1 or
0.01 second. When the ACTUAL value is equal to the PRESET value, the coil
associated with the timer (in this case TIM1) is energized and ACTUAL value
incrementing ceases. The PRESET value must be set so that the timer counter
ACTUAL value will increment from zero to the PRESET value in the desired time.
For instance, suppose a timer of 5.0 seconds is required using a 0.1 second rate
timer. The PRESET value would have to be 50 for this function since it would
take 5.0 seconds for the counter to count from zero to 50 utilizing a 0.1 second
clock (50 X 0.1 second = 5.0 seconds). If a 0.01 second clock were available, the
PRESET value would have to be 500.

Construct the given ladder diagram above using Multisim 11. Record the
result in Table 4.

Laboratory Exercise No. 3 Page 3


Industrial Electronics
College of Engineering
ECE / CpE Department
Ateneo de Naga University

An example of a retentive timer is shown above. This type of timer looks


more like the counter discussed earlier. The two control lines operate in much the
same manner as the counter in that the lower line is the reset line. The top line,
however, in the case of the timer is the time line. As long as the reset line is true
and the time line

is true, the timer will increment at the clock rate toward the PRESET value. As
with the non-retentive timer, when the ACTUAL value is equal to the PRESET
value, the coil associated with the timer will be energized and timer incrementing
will cease. As with the timer, the PRESET value must be chosen so that the
ACTUAL value will increment to the PRESET value in the time desired
dependent upon the clock rate.

TABLES

Table 1:
IN1 IN2 CTR1
off off
off on
on off
on on

Table 2:
IN1 IN2 IN3 C2 (UPctr) C2 (DNctr) C2 (RSctr)
off off
off on
on off
on on

Table 3:
IN1 TIM1
off
on

Table 4:
IN1 IN2 TIM1
off off
off on
on off
on on

Laboratory Exercise No. 3 Page 4


Industrial Electronics
College of Engineering
ECE / CpE Department
Ateneo de Naga University
ANALYSIS / OBSERVATION:

Laboratory Exercise No. 3 Page 5


Industrial Electronics
College of Engineering
ECE / CpE Department
Ateneo de Naga University
CONCLUSION:

Laboratory Exercise No. 3 Page 6

Vous aimerez peut-être aussi