## 1.6 PRACTICE PROBLEMS

6. Design ladder logic for the following process description.

a) A toggle start switch (TS1) and a limit switch on a safety gate (LS1) must both be on before a solenoid (SOL1) can be energized to extend a stamping cylinder to the top of a part. Should a part detect sensor (PS1) also be considered? Explain your answer.

b) While the stamping solenoid is energized, it must remain energized until a limit switch (LS2) is activated. This second limit switch indicates the end of a stroke. At this point the solenoid should be de-energized, thus retracting the cylinder.

c) When the cylinder is fully retracted a limit switch (LS3) is activated. The cycle may not begin again until this limit switch is active. This is one way to ensure that a new part is present, is there another?

d) A cycle counter should also be included to allow counts of parts produced. When this value exceeds some variable amount (from 1 to 5000) the machine should shut down, and a job done light lit up.

e) A safety check should be included. If the cylinder solenoid has been on for more than 5 seconds, it suggests that the cylinder is jammed, or the machine has a fault. If this is the case the machine should be shut down, and a maintenance light turned on.

f) Implement the ladder diagram on a PLC in the laboratory.

g) Fully document the ladder logic and prepare a short report - This should be of use to another engineer that will be maintaining the system.

7. Write the ladder logic diagram that would be required to execute the following data manipulation for a preventative maintenance program.

i) Keep track of the number of times a motor was started with toggle switch #1.

ii) After 2000 motor starts turn on an indicator light on the operator panel.

iii) Provide the capability to change the number of motor starts being tracked, prior to triggering of the indicator light. HINT: This capability will only require the change of a value in a compare statement rather than the addition of new lines of logic.

iv) Keep track of the number of minutes that the motor has run.

v) After 9000 minutes of operation turn the motor off automatically and also turn on an indicator light on the operator panel.

11. Develop an SFC for a two person assembly station. The station has two presses that may be used at the same time. Each press has a cycle button that will start the advance of the press. A bottom limit switch will stop the advance, and the cylinder must then be retracted until a top limit switch is hit.

12. You have been asked to program a PLC-5 that is controlling a handicapped access door opener. The client has provided the electrical wiring diagram below to show how the PLC inputs and outputs have been wired. Button A is located inside and button B is located outside. When either button is pushed the motor will be turned on to open the door. The motor is to be kept on for a total of 15 seconds to allow the person to enter. After the motor is turned off the door will fall closed. In the event that somebody gets caught in the door the thermal relay will go off, and the motor should be turned off. After 20,000 cycles the door should stop working and the light should go on to indicate that maintenance is required.

a) Develop a state diagram for the control of the door.

b) Convert the state diagram to ladder logic. (list the input and the output addresses first)

c) Convert the state diagram to Boolean equations.

13. Convert the following state diagram to equations.

14. Design a garage door controller using four techniques a) scripts, b) block logic, c) state equations, d) SFCs and e) flowcharts. The behavior of the garage door controller is as follows,

- there is a single button in the garage, and a single button remote control.

- when the button is pushed the door will move up or down.

- if the button is pushed once while moving, the door will stop, a second push will start motion again in the opposite direction.

- there are top/bottom limit switches to stop the motion of the door.

- there is a light beam across the bottom of the door. If the beam is cut while the door is closing the door will stop and reverse.

- there is a garage light that will be on for 5 minutes after the door opens or closes.

15. This morning you received a call from Mr. Ian M. Daasprate at the Old Fashioned Widget Company. In the past when they built a new machine they would used punched paper cards for control, but their supplier of punched paper readers went out of business in 1972 and they have decided to try using PLCs this time. He explains that the machine will dip wooden parts in varnish for 2 seconds, and then apply heat for 5 minutes to dry the coat, after this they are manually removed from the machine, and a new part is put in. They are also considering a premium line of parts that would call for a dip time of 30 seconds, and a drying time of 10 minutes. He then refers you to the project manager, Ann Nooyed.

You call Ann and she explains how the machine should operate. There should be start and stop buttons. The start button will be pressed when the new part has been loaded, and is ready to be coated. A light should be mounted to indicate when the machine is in operation. The part is mounted on a wheel that is rotated by a motor. To dip the part, the motor is turned on until a switch is closed. To remove the part from the dipping bath the motor is turned on until a second switch is closed. If the motor to rotate the wheel is on for more that 10 seconds before hitting a switch, the machine should be turned off, and a fault light turned on. The fault condition will be cleared by manually setting the machine back to its initial state, and hitting the start button twice. If the part has been dipped and dried properly, then a done light should be lit. To select a premium product you will use an input switch that needs to be pushed before the start button is pushed. She closes by saying she will be going on vacation and you need to have it done before she returns.

You hang up the phone and, after a bit of thought, decide to use a SLC-150 with the following outputs and inputs,

a) Draw a state diagram for the process.

b) List the relays needed to indicate when each state is on, and list any timers and counters used.

c) Write a Boolean expression for each transition in the state diagram.

d) Do a simple wiring diagram for the SLC-150.

e) Write the ladder logic for the state that involves moving the part into the dipping bath.

16. Given the following state diagram, use equations to implement ladder logic.

17. Convert the following flow chart to ladder logic.

18. Convert the following state diagram to logic using equations.

19. A welding station is controlled by a PLC. On the outside is a safety cage that must be closed while the cell is active. A belt moves the parts into the welding station and back out. An inductive proximity sensor detects when a part is in place for welding, and the belt is stopped. To weld, an actuator is turned on for 3 seconds. As normal the cell has start and stop push buttons.

a) Draw a flow chart

b) Implement the chart in ladder logic

20. 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 (P1 and P2) that must both be turned on within 0.25s of each other before a machine cycle may begin.

Develop ladder logic to control a process that has a start (START) and stop (STOP) button for the power. After the power is on the palm buttons (P1 and P2) may be used as described above to start a cycle. The cycle will consist of turning on an output (MOVE) for 2 seconds. After the press has been cycled 1000 times the press power should turn off and an output (LIGHT) should go on.

21. Convert the following state diagram to ladder logic using equations. Give the stop button higher priority.