Download presentation
Presentation is loading. Please wait.
Published byShannon Heath Modified over 8 years ago
1
PLC programming Part 3: Problems with solutions
2
Topics Every problem is devided into three parts: Technology description contains the general properties of the technology to be controlled. The second part contains the controlling task. In the third part is the solution in ladder diagram form. Solutions are given according to the Mitsubishi nomenclature.
3
1. Robot control (I) Given a conveyor and a robotic arm. The robot can pack boxes (Y0) to the former. The conveyor can move forward (Y1). There is a sensor (X0) and a pusher (Y2) at the end of the conveyor. The sensor can detect the transported objects and the pusher can move them off from the conveyor. There is an operation panel with push buttons and switches for human control (X20, X21, X24).
4
1. Robot control (II) When [PB1] (X20) on the operation panel is pressed, a box is supplied to the conveyor. When [SW1] (X24) on the operation panel is turned ON, the conveyor moves forward. The conveyor stops at the sensor (X0) when it detects a box. When [PB2] (X21) is pressed, the box is pushed off.
5
1. Robot control (III)
6
2. Indicator lights (I) Given a machine wich has three indicator lights: Operating (Y0), Stop(Y1), Error(Y2). There is an operation panel with push buttons and switches for human control (X20, X21, X22, X24).
7
2. Indicator lights (II) At the beginning the lamp Stop (Y1) is lit. If [PB1] (X20) is pressed, the lamp Stop (Y1) is turned OFF and the lamp Operating (Y0) is lit. When [SW1] (X24) on the operation panel is turned ON and [PB2] (X21) or [PB3] (X22) is pressed then the lamp Error (Y2) is also lit.
8
2. Indicator lights (III)
9
3. Traffic light control (I) Given a Red (Y0) and a Green (Y1) signal light. The former one can be turned ON by the push button (X20), while the latter one by (X21).
10
3. Traffic light control (II) When [PB1] (X20) on the operation panel is pressed, the signal light Red (Y0) is lit. When [PB1] (X20) on the operation panel is released, the lamp remains lit. When [PB2] (X21) on the operation panel is pressed, the light Red (Y0) is extinguished and the light Green (Y1) is lit. When [PB2] (X21) on the operation panel is released, the lamp remains lit.
11
3. Traffic light control (III)
12
4. Door control (I) Given a door that can move up (Y0) and down (Y1). There is an operation panel with push buttons and switches for human control (X20, X21).
13
4. Door control (II) Pressing [PB1] (X20) on the operation panel sets the timer program (T0) ON. After 3 seconds, T0 is set ON and Y0 is set ON, then the door starts to open. When [PB2] (X21) on the operation panel is pressed, T1 is ON and the door starts to close after 4 seconds.
14
4. Door control (III)
15
5. Timed traffic light control (I-II) Given a Green (Y1) signal light. When [SW1] (X24) on the operation panel is turned ON then after 2 seconds (timed by T3), the signal Green (Y1) is lit. The signal Green (Y1) remains lit for 4 seconds (timed by T4). Green (Y1) will flicker OFF for 2 seconds and ON for 4 seconds.
16
5. Timed traffic light control (III)
17
6. Box counting (I) Given a conveyor and a robotic arm. The robot can pack boxes (Y0) to the former. The conveyor can move forward (Y1). There is a sensor (X0) at the end of the conveyor. The sensor can detect the transported objects. There is an operation panel with push buttons and switches for human control (X1, X2, X3) and a count-up indicator light (Y6).
18
6. Box counting (II) When (X2) and (X3) are turned ON on the operation panel then a box is supplied to the conveyor that moves forward. X0 is set ON every time a part on the conveyor passes the sensor. When the counter value reaches 10, the contact C0 is set ON and (Y6) is lit. When (X1) is pressed, the current value of the counter (C0) is set to zero and the contact C0 is turned OFF.
19
6. Box counting (III)
20
7. Paging unit (I) In a restaurant there are two tables with push buttons (X0, X1). There are two lamps belonging to the tables (Y0, Y1). When a guest presses the button on the table, then the corresponding lamp is lit. The lamps estinguish when the push button (X20) on the operation panel is pressed. There is an indicator light (Y23) on the panel too.
21
7. Paging unit (II) When Button 1 (X0) on the table is pressed, Lamp 1 (Y0) on the wall is lit. If Button 1 (X0) is released, Lamp 1 (Y0) remains lit. When Button 2 (X1) is pressed, Lamp 2 (Y1) on the wall is lit. If Button 2 (X1) is released, Lamp 2 (Y1) remains lit. When both Lamp 1 (Y0) and Lamp 2 (Y1) are lit, [PL4] (Y23) on the operation panel lights. When [PB1] (X20) on the operation panel is pressed, both Lamp 1 (Y0) and Lamp 2 (Y1) on the wall and [PL4] (Y23) on the operation panel are extinguished.
22
7. Paging unit (III)
23
8. Passage control (I) Given an area bordered by sensors (X0, X1, X2, X3). There are green (Y1, Y4) and a red (Y3) indicator lights, furthermore a buzzer (Y7). Humans and cars can pass through the given area.
24
8. Passage control (II) Human side: When the sensor In gate (X0) detects a person, the flashing light Green (Y1) comes ON. 5 seconds after the sensor Out (X1) detects the passage of the person, the flashing light Green (Y1) is extinguished. Car side: When the sensor In gate (X2) detects a car, the flashing light Green (Y4) is lit. 5 seconds after the sensor Out (X3) detects the passage of the car, the flashing light Green (Y4) is extinguished. If the car does not pass through the area between In gate (X2) and Out (X3) within 10 seconds, the flashing light Red (Y3) is lit and Buzzer (Y7) sounds. As soon as the car has passed the sensor Out (X3), the flashing light Red (Y3) is extinguished and Buzzer (Y7) stops.
25
8. Passage control (III)
26
9. A three lamp traffic light control (I) Given a Red (Y0), a Yellow (Y1) and a Green (Y2) lamp. There is a starter button (X20) on the lamp.
27
9. A three lamp traffic light control (II) When [PB1] (X20) is pressed, the process is started. First, the signal lamp Red (Y0) is lit for 10 seconds. The signal lamp Red (Y0) is extinguished after it has been lit for 10 seconds. The signal lamp Yellow (Y1) is lit for 5 seconds. The signal lamp Yellow (Y1) is extinguished after it has been lit for 5 seconds. The signal lamp Green (Y2) is lit for 10 seconds. The signal lamp Green (Y2) is extinguished after it has been lit for 10 seconds. The operations starting from the second above are repeated.
28
9. A three lamp traffic light control (III)
29
10. Size checking (I) Given a conveyor and a robotic arm. The robot can pack boxes (Y5) to the former. The conveyor can move forward (Y3). There is a vertical sequence of sensors (X0, X1, X2) at the beginnig of the conveyor and a solo sensor (X4) at the end of it. The sensors can detect the transported objects depending on their size. There is an operation panel with a switch (X14), a push button (X10) and three indicator lights (Y10, Y11, Y12) for human control.
30
10. Size checking (II) When [PB1] (X10) on the operation panel is pressed, supply command (Y5) for the robot is turned ON. When [PB1] (X10) is released, supply command (Y5) is turned OFF. When [Operation start] (X14) on the operation panel is turned ON, Conveyor forward (Y3) is ON. When [Operation start] (X14) on the operation panel is turned OFF, Conveyor forward (Y3) is OFF. Large, medium or small parts carried on the conveyor are sorted by the input of sensors Upper (X0), Middle (X1) or Lower (X2), then a corresponding lamp is lit. Large >> Y10 Medium >> Y11 Small >> Y12 A lamp is lit immediately after the sensors (X0, X1, X2) sort the size, then is extinguished when the part has passed Sensor (X4).
31
10. Size checking (III)
32
11. Conveyor control (I) Given a conveyor that can move forward (Y1). There is an operation panel with two push buttons (X20, X21), two indicator lights (Y6, Y7) and a buzzer (Y3) for human control.
33
11. Conveyor control (II) When [PB1] (X20) on the operation panel is pressed, the flashing light Yellow (Y7) is lit and Buzzer (Y3) sounds for 5 seconds. If [PB1] (X20) is released, Yellow (Y7) remains lit. After the flashing light Yellow (Y7) is extinguished and Buzzer (Y3) stops, Conveyor forward (Y1) is set ON. The flashing light Green (Y6) remains lit while the Conveyor forward (Y1) is ON. When [PB2] (X21) on the operation panel is pressed, the operations described above stop. The operations should be repeated when the procedure described in first step is executed.
34
11. Conveyor control (III)
35
12. Control the set of conveyors (I) Given a robotic arm and a sequence of three conveyors. The robot can pack boxes (Y7) onto the first conveyor when it is in its starting point (X5). The conveyors can move forward (Y0, Y2, Y4). There are sensors (X0, X1, X2) at the beginning of the conveyors and one sensor (X3) at the end of the last conveyor. The sensors can detect the transported objects. There is an operation panel with one push button (X20) to start the process.
36
12. Control the set of conveyors (II) When [PB1] (X20) on the operation panel is pressed, Supply command (Y7) for the robot is turned ON if the robot is at Starting point (X5). When [PB1] (X20) is released, Supply command (Y7) is latched on until the robot returns to the Starting point (X5). When Sensor (X0) detects a part, Upper conveyor forward (Y0) is set ON. When Sensor (X1) detects a part, Middle conveyor forward (Y2) is set ON and Upper conveyor forward (Y0) stops. When Sensor (X2) detects a part, Lower conveyor forward (Y4) is set ON and Middle conveyor forward (Y2) stops. When Sensor (X3) detects a part, Lower conveyor forward (Y4) stops. When Sensor (X3) is set ON, Supply command (Y7) for the robot is turned ON and a new part is supplied if the robot is at Starting point (X5).
37
12. Control the set of conveyors (III)
38
13. Traffic lights again (I) Given a Red (Y0), a Yellow (Y1) and a Green (Y2) lamp. There is a starter button (X10) on the lamp.
39
13. Traffic lights again (II) The signal lamp Red (Y0) flickers at one-second intervals (ON for 1 second and OFF for 1 second). When the pushbutton (X10) on the operation panel is pressed, the indicator (Y10) on the operation panel is lit. If the pushbutton (X10) is released, the indicator (Y10) remains lit. After the indicator (Y10) is lit for 5 seconds, the operation of the signal is changed as described in the followings. First, the signal lamp Red (Y0) flickers for 5 seconds while indicator (Y10) is lit. The signal lamp Red (Y0) turns off. The signal lamp Yellow (Y1) is lit for 5 seconds. After the lamp Yellow (Y1) is extinguished, signal lamp Green (Y2) is lit for 10 seconds. After the signal lamp Green (Y2) turns OFF, the signal lamp Red (Y0) flickers at one- second intervals (ON for 1 second and OFF for 1 second). The operations starting from the first are repeated.
40
13. Traffic lights again (III)
41
14. Sorting by size (I) Given a sequence of two conveyors and a robotic arm. The robot can pack boxes (Y0) to the first conveyor. The conveyors can move forward (Y1, Y2). There is a vertical sequence of sensors (X1, X2, X3) at the beginnig of the first conveyor and two sensors (X4, X5) at the end of the second one. The sensors (X1, X2, X3) can detect the transported objects depending on their size. There is a sorting wing at the end of the second conveyor. It can push the boxes to the left and to the rigth. There is an operation panel with a switch (X24) and a push button (X20) for human control.
42
14. Sorting by size (II) When [SW1] (X24) on the operation panel is turned ON, the conveyors move forward. When [SW1] (X24) is turned OFF, the conveyors stop. When [PB1] (X20) on the operation panel is pressed, Supply command (Y0) for the robot is turned ON. Supply command (Y0) is turned OFF when the robot has moved from the starting point. (The robot will complete the part loading cycle.) The robot supplies large, medium or small parts. Large parts are led to the left hand side and small parts are led to the rigth hand side. The part size is detected by the input Upper (X1), Middle (X2) and Lower (X3) on the conveyor.
43
14. Sorting by size (III)
44
15. Operator and robot (I) Given a human operator, a conveyor and a robotic arm. The operator supplies boxes to the conveyor. At the end of the conveyor there is a table from which the robot can take the box. There is a push button (X20) and an indicator lamp (Y0) on the operation panel to start the process.
45
15. Operator and robot (II) The operator supplies parts. The operator confirms the indicator lamp [Supply allowed] is lit and supplies a part to the conveyor. If the indicator lamp is always lit, the operator continuously supplies parts. While the PLC is in RUN status, the conveyor always moves forward. When [PB1] (X20) on the operation panel is pressed, Supply command (Y0) is turned ON and the [Supply allowed] indicator lamp is lit. The operator supplies a part. When [PB1] (X20) is released, the indicator lamp is extinguished. However, if a part is still located on the table, Supply command (Y0) is not turned ON so that the indicator lamp [Supply allowed] is not lit. When Part on table (X1) is turned ON in the robot, Unload command (Y2) is set ON. When Robot operation finished (X2) is turned ON (it is ON when a part is placed on the tray), Unload command (Y2) is set OFF. Unload command (Y2) should be set ON only when the robot is at the starting point.
46
15. Operator and robot (III)
47
16. Drilling (I) Given a driller (Y2), a conveyor (Y1) and a robotic arm. The robot supplies boxes (Y0) to the conveyor. There are push buttons (X20, X24) on the operation panel to start the process.
48
16. Drilling (II) Overall control: When [PB1] (X20) on the operation panel is pressed, Supply command (Y0) for the hopper is turned ON. When [PB1] (X20) is released, Supply command (Y0) is turned OFF. When Supply command (Y0) is turned ON, the hopper supplies a part. When [SW1] (X24) on the operation panel is turned ON, the conveyor moves forward. When [SW1] (X24) is turned OFF, the conveyor stops. Drilling control: When the sensor for Part under drill (X1) in the drill is turned ON, the conveyor stops. When Start drilling (Y2) is turned ON, the drilling starts. Start drilling (Y2) is turned OFF when Drilling (X0) is set ON. When Start drilling (Y2) is turned ON, either Drilled correctly (X2) or Drilled wrong (X3) is set ON after the drill machine has operated for one complete cycle. (The drill cannot be stopped in the middle of an operation.) After Drilled correctly (X2) or Drilled wrong (X3) is confirmed, the work is carried and put on the tray at the right. When multiple holes are drilled, Drilled wrong (X3) is set ON. In this exercise no specified control for scrap parts exists.
49
16. Drilling (III)
50
17. Orange packaging (I) Given an orange supplier (Y2), a conveyor (Y1) and a robotic arm. The robot supplies boxes (Y0) to the conveyor. There is a push button (X20) and a switch (X24) on the operation panel for human control.
51
17. Orange packaging (II) Overall control: When [SW1] (X24) on the operation panel is turned ON, the conveyor moves forward. When [SW1] (X24) is turned OFF, the conveyor stops. When [PB1] (X20) on the operation panel is pressed, Supply command (Y0) for the robot is turned ON. Supply command (Y0) is turned OFF when the robot has moved from the starting point. When Supply command (Y0) is turned ON, the robot supplies a box. Packaging control: When the sensor for Box on conveyor (X1) in the orange feeder is turned ON, the conveyor stops. Five oranges are placed in the box. Boxes containing 5 oranges are carried to the tray at right. Oranges are supplied when Supply orange command (Y2) is set ON and the number of oranges supplied are counted when Orange supplied (X2) is set ON.
52
17. Orange packaging (III)
53
18. Two directional conveyor (I) Given a conveyor and a robotic arm. The robot supplies boxes (Y10) to the conveyor that can move forward (Y11) and backward (Y12). There are sensors (X10, X11) at both end of the conveyor and in the middle of it (X12). There are push buttons (X20, X21) on the operation panel for human control.
54
18. Two directional conveyor (II) When [PB1] (X20) on the operation panel is pressed, Supply command (Y10) for the hopper is turned ON. When [PB1] (X20) is released, Supply command (Y10) is turned OFF. When Supply command (Y10) is turned ON, the hopper supplies a part. When [PB2] (X21) on the operation panel is pressed, the conveyor is operated in a sequence as described below. If [PB2] (X21) is released, the sequence of operation continues. The conveyor starts moving when Conveyor forward (Y11) is set ON and stops when Right limit (X11) for the part is turned ON. The conveyor moves in reverse when Conveyor reverse (Y12) is set ON until Left limit (X10) is turned ON. The part stays at the left limit for 5 seconds. 5 seconds later, Conveyor forward (Y11) is set ON and the conveyor moves until Stop sensor (X12) is turned ON.
55
18. Two directional conveyor (III)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.