0% found this document useful (0 votes)
3 views

Lab 9 Counter

PLC lab

Uploaded by

Abbas Haider
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Lab 9 Counter

PLC lab

Uploaded by

Abbas Haider
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

AUTOMATED CONTROLS INSTALLATION AND MAINTENANCE PROGRAM

ACIM 5010

Lab 9 – PLC Counters

Compact Logix PLC

LAB 9 Page 1 of 9
Name: _______________________________ Date: ______________________________

LAB 9 Page 2 of 9
Lab 9 – PLC Counters

Compact Logix PLC

Objectives
Test a program for a Compactlogix PLC (=CTU) UP counter.

References
Documentation: The RS Studio 5000 software has information about the controller and its
installed modules.

Equipment
 Compactlogix PLC lab workstation panel. Refer to figure 1 on page 3 and the figure 2 on
page 4.
 Banana jumpers
 Fluke digital multimeter
 USB flash drive

Safety
 Eye protection is required when working with power circuits energized at more than 30 volts.
 Identify the emergency stop buttons located near the entrance to lab SE1-116.
 Before making jumper connections and at the end of this lab session, turn off all power sources
connected to the Compactlogix PLC.
 Be aware that in future labs there may be more than one live source that will have to be turned
on for the lab to work and to be turned off to make the test area safe.
 Substantial footwear is required in the lab area.
 Refer to Figure 1 to review the arrangement for the PLC workstation console.

General Discussion for PLC Up Counter


A PLC counter instruction allows events to be counted. Usually what is being counted actuates
a field device such as a photo-eye, limit switch, proximity sensor, or pushbutton. A counter is
incremented when the rung on which the counter is programmed is made true.

At programming time, a counter is given a Preset value. The Preset value is how far you want
the counter to count before it ‘counts out’. A counter ‘counts out’ when the counter
Accumulator value has reached the Preset value. When counting is ‘DoNe’, the (DN) counter
output coil becomes true.

LAB 9 Page 3 of 9
The counter (DN) coil is examined by examine type instructions that have been given the
address of the counter DN bit to control an event that must be initiated after a preset number
of counts.
An up counter in Allen-Bradley PLC's is abbreviated as CTU. A counter is not given an explicit
address since it is internal to the PLC. Instead, a CTU counter instruction is simply given a tag
with no corresponding base tag.
To reset a counter, a reset instruction must be used. Reset is abbreviated RES in Allen-Bradley
PLC's. After a reset, the counter Accumulator value returns to 0 (zero).
Counters are retentive, i.e., they retain their current accumulated count even if the PLC CPU
power is lost. This is essential where a production tally is being kept or the progress of a multi-
step process is being tracked.

Example: This control system moves boxes under a heater on a slow-moving conveyor. Storage
space on the outfeed (downstream) end of the dryer conveyor limits the number of boxes that
can be stored there to six.

DRYER BEACON
PHOTO-EYE

INFEED DRYER IDLER ROLLERS

CONVEYOR
The PLC program is shown on the next page and the wiring diagram BOX
CONVEYOR
for STORAGE
the system is on page 5.
The operation as follows:
1. Stop and Start pushbuttons control the dryer conveyor which starts first; and then the
infeed conveyor starts via interlocking to the the dryer conveyor.

2. The photo-eye is wired to a PLC input that is OFF when NO object is sensed.
The purpose of the photo-eye is to stop both conveyors once the sixth box has passed the
photo-eye.

A beacon alerts a roving production worker that the boxes must be removed from the idler
rollers box storage conveyor. The production worker restarts the conveyor once the boxes
have been manually removed.

LAB 9 Page 4 of 9
LAB 9 Page 5 of 9
LAB 9 Page 6 of 9
LAB 9 Page 7 of 9
Procedure – Acquire and test a program for a PLC UP (=CTU) counter

1. Make sure the power to the PLC workstation is off.

2. Make the connections according to the diagram in Figure 2. Use a N.O. limit switch contact
for the Photo-eye.

Have an instructor check your connections before turning on the power.

3. Acquire the RS Studio 5000 program called ACIM_5010_Lab_9.ACD from the J:\

4. Save the program as BoxCounter.ACD on to your flash drive.

5. Verify the program.

6. Navigate to download the program via Communications→Who Active.

7. Download the program and put the processor into RUN mode.
8. Test the program functionality, as follows:

FUNCTIONALITY TO BE TESTED √
#

a Pressing the Jog Reverse pushbutton causes the Dryer Conveyor to run in reverse.

b The initial counter ACCumulator value is 0 & the initial Preset value is 6.
The Forward pushbutton runs both conveyors in the forward direction and the Forward
c
Light comes on.

d Each time the Photo-eye is blocked the counter is incremented by 1.

The 6th time the Photo-eye is blocked the Beacon comes on but the conveyors continue
e
to run until the box is past the photo-eye.

f The conveyors cannot be restarted in the forward direction until the Stop button has
been pressed.
g Pressing the Stop button resets the counter only when the outfeed is full.

CONTINUED ON THE FOLLOWING PAGE…


Case History: After the system has been tested and has been running for a while, the operator
reports that once in a while, only five boxes are at the outfeed idler roll storage area when the
system has stopped automatically and the beacon light is on. The system can be restarted

LAB 9 Page 8 of 9
normally. You investigate and find that the program has a flaw in it.

The problem with the program is as follows: if the stop button is pressed to stop the system
while the 6th box is blocking the photo-eye, the conveyor will stop but the counter will
increment to 1 immediately after it has been reset by the stop button.

Three solutions are proposed.

1. Save the original program under three new names and make each proposed change and
test it.

Which of the following solves the problem?

A. Put an examine if off photo-eye instruction in rung 5.

B. Put a oneshot (=ONS) instruction in rung 3 before the counter.

C. Delete the photo-eye instruction in rung 0 and change the photo-eye instruction in
rung 3 to examine if off.

D. Any of the above.

2. Turn the PLC workstation panel power OFF.

Shut down the computer and remove all the jumpers if nearing the end of this lab session.

ANSWER KEY ( INSTRUCTOR USE ONLY )

LAB 9 Page 9 of 9
1. √
2. √
3. √
4. √
5. √
6. √
7. √
8. √√√√√√√
9. √√√
A and B both work.
10. √
11. √

LAB 9 Page 10 of 9

You might also like