Problems For Timer and Counter

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

plc timers - 16.

28

• MCRs can force off a section of ladder logic.

16.9 PRACTICE PROBLEMS

1. What does edge triggered mean? What is the difference between positive and negative edge
triggered?

2. Are reset instructions necessary for all timers and counters?

3. What are the numerical limits for typical timers and counters?

4. If a counter goes below the bottom limit which counter bit will turn on?

5. a) Write ladder logic for a motor starter that has a start and stop button that uses latches. b)
Write the same ladder logic without latches.

6. Use a timing diagram to explain how an on delay and off delay timer are different.

7. For the retentive off timer below, draw out the status bits.

RTF
A Timer t
(EN)
Preset 3.5s
Accum. 0
(DN)

t.EN
t.DN
t.TT

t.ACC

0 3 6 10 16 18 20
plc timers - 16.29

8. Complete the timing diagrams for the two timers below.


RTO
A (EN)
Timer t
Preset 10s (DN)
Accum. 1

t.EN

t.TT

t.DN

t.ACC

0 3 6 9 14 17 19 20

TOF
A Timer t
(EN)
Preset 0.05s
Accum. 0
(DN)

t.EN
t.TT
t.DN

t.ACC

0 15 45 150 200 225


plc timers - 16.30

9. Given the following timing diagram, draw the done bits for all four fundamental timer types.
Assume all start with an accumulated value of zero, and have a preset of 1.5 seconds.

input

TON

RTO

TOF

RTF

sec
0 1 2 3 4 5 6 7

10. Design ladder logic that allows an RTO to behave like a TON.

11. Design ladder logic that uses a timer and counter to measure a time of 50.0 days.

12. Develop the ladder logic that will turn on an output (light), 15 seconds after switch (A) has
been turned on.

13. Develop the ladder logic that will turn on a output (light), after a switch (A) has been closed
10 times. Push button (B) will reset the counters.

14. Develop a program that will latch on an output (B), 20 seconds after input (A) has been turned
on. The timer will continue to cycle up to 20 seconds, and reset itself, until A has been turned
off. After the third time the timer has timed to 20 seconds, B will be unlatched.

15. A motor will be connected to a PLC and controlled by two switches. The GO switch will start
the motor, and the STOP switch will stop it. If the motor is going, and the GO switch is thrown,
this will also stop the motor. 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 running, a light should be turned on
(a small lamp will be provided).

16. In dangerous processes it is common to use two palm buttons that require a operator to use
both hands to start a process (this keeps hands out of presses, etc.). To develop this there are
two inputs that must be turned on within 0.25s of each other before a machine cycle may begin.
plc timers - 16.31

17. Design a conveyor control system that follows the design guidelines below.
- The conveyor has an optical sensor S1 that detects boxes entering a workcell
- There is also an optical sensor S2 that detects boxes leaving the workcell
- The boxes enter the workcell on a conveyor controlled by output C1
- The boxes exit the workcell on a conveyor controlled by output C2
- The controller must keep a running count of boxes using the entry and exit sen-
sors
- If there are more than five boxes in the workcell the entry conveyor will stop
- If there are no boxes in the workcell the exit conveyor will be turned off
- If the entry conveyor has been stopped for more than 30 seconds the count will be
reset to zero, assuming that the boxes in the workcell were scrapped.

18. Write a ladder logic program that does what is described below.
- When button A is pushed, a light will flash for 5 seconds.
- The flashing light will be on for 0.25 sec and off for 0.75 sec.
- If button A has been pushed 5 times the light will not flash until the system is
reset.
- The system can be reset by pressing button B

19. Write a program that will turn on a flashing light for the first 15 seconds after a PLC is turned
on. The light should flash for half a second on and half a second off.

20. A buffer can hold up to 10 parts. Parts enter the buffer on a conveyor controller by output con-
veyor. As parts arrive they trigger an input sensor enter. When a part is removed from the
buffer they trigger the exit sensor. Write a program to stop the conveyor when the buffer is full,
and restart it when there are fewer than 10 parts in the buffer. As normal the system should also
include a start and stop button.

21. What is wrong with the following ladder logic? What will happen if it is used?
A
L X

Y
B
U X

22. We are using a pneumatic cylinder in a process. The cylinder can become stuck, and we need
to detect this. Proximity sensors are added to both endpoints of the cylinder’s travel to indicate
when it has reached the end of motion. If the cylinder takes more than 2 seconds to complete a
motion this will indicate a problem. When this occurs the machine should be shut down and a
light turned on. Develop ladder logic that will cycle the cylinder in and out repeatedly, and
watch for failure.
plc timers - 16.32

16.10 ASSIGNMENT PROBLEMS

1. Draw the timer and counter done bits for the ladder logic below. Assume that the accumulators
of all the timers and counters are reset to begin with.
A
TON
Timer T_0

Preset 2s
RTO
Timer T_1

Preset 2s
TOF
Timer T_2

Preset 2s
CTU
Counter C_0
Preset 2
Acc. 0
CTD
Counter C_1
Preset 2
Acc. 0

T_0/DN

T_1/DN

T_2/DN

C_0/DN

C_1/DN
t(sec)
0 5 10 15 20

2. Write a ladder logic program that will count the number of parts in a buffer. As parts arrive they
activate input A. As parts leave they will activate input B. If the number of parts is less than 8
then a conveyor motor, output C, will be turned on.
plc timers - 16.33

3. Explain what would happen in the following program when A is on or off.


A
MCR

TON
t
5s

MCR

4. Write a simple program that will use one timer to flash a light. The light should be on for 1.0
seconds and off for 0.5 seconds. Do not include start or stop buttons.

5. We are developing a safety system (using a PLC-5) for a large industrial press. The press is
activated by turning on the compressor power relay (R, connected to O:013/05). After R has
been on for 30 seconds the press can be activated to move (P connected to O:013/06). The
delay is needed for pressure to build up. After the press has been activated (with P) the system
must be shut down (R and P off), and then the cycle may begin again. For safety, there is a sen-
sor that detects when a worker is inside the press (S, connected to I:011/02), which must be off
before the press can be activated. There is also a button that must be pushed 5 times (B, con-
nected to I:011/01) before the press cycle can begin. If at any time the worker enters the press
(and S becomes active) the press will be shut down (P and R turned off). Develop the ladder
logic. State all assumptions, and show all work.

6. Write a program that only uses one timer. When an input A is turned on a light will be on for 10
seconds. After that it will be off for two seconds, and then again on for 5 seconds. After that
the light will not turn on again until the input A is turned off.

7. A new printing station will add a logo to parts as they travel along an assembly line. When a
part arrives a ‘part’ sensor will detect it. After this the ‘clamp’ output is turned on for 10 sec-
onds to hold the part during the operation. For the first 2 seconds the part is being held a
‘spray’ output will be turned on to apply the thermoset ink. For the last 8 seconds a ‘heat’ out-
put will be turned on to cure the ink. After this the part is released and allowed to continue
along the line. Write the ladder logic for this process.

8. Write a ladder logic program. that will turn on an output Q five seconds after an input A is
turned on. If input B is on the delay will be eight seconds. YOU MAY ONLY USE ONE
TIMER.

You might also like