Ch.12 Programmable Logic Controllers
Ch.12 Programmable Logic Controllers
Control System Technology 1 Programmable Logic Controllers Control System Technology 2 Programmable Logic Controllers
Objectives
To introduce programmable logic controllers
After completing this chapter, students will be able to
1.Describe the following parts of PLC: power supply, processor,
input module, output module and programming unit
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
Control System Technology 3 Programmable Logic Controllers Control System Technology 4 Programmable Logic Controllers
§1.Introduction §1.Introduction
- PLC is a digital electronic device designed to control machines - PLC is a digital electronic device designed to control machines
and processes by performing event-driven and time-driven and processes by performing event-driven and time-driven
sequential operations sequential operations
- PLC can be programmed without special programming skills, - PLC can be programmed without special programming skills,
and it can be maintained by factory maintenance technicians and it can be maintained by factory maintenance technicians
- The Hydramatic Division, General Motors Corporation specified - The Hydramatic Division, General Motors Corporation specified
the design criteria for the first programmable logic controller in the design criteria for the first programmable logic controller in
1968 1968
- PLCs now include modules that perform - PLCs now include modules that can
• functions such as logic, timing, counting, sequencing, PID • perform functions such as logic, timing, counting, sequencing,
control, and fuzzy logic PID control, and fuzzy logic
• arithmetic operations, analyze data • perform arithmetic operations, analyze data
communicate with other programmable controllers and host • communicate with other programmable controllers and host
computers. Some advantages of PLCs include computers
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
Control System Technology 5 Programmable Logic Controllers Control System Technology 6 Programmable Logic Controllers
RUN 1 2 1 2 1 2 1 2 1 1
systems to deliver increasingly complex AC ON SCAN
3
5
4
6
3
5
4
6
3
5
4
6
3
5
4
6
2
3
2 PV1 PV2
7 8 7 8 7 8 7 8 4
functions at diminishing cost dC ON
FAULT OUT1 OUT2
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
1
22/10/2021
Control System Technology 7 Programmable Logic Controllers Control System Technology 8 Programmable Logic Controllers
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
Control System Technology 9 Programmable Logic Controllers Control System Technology 10 Programmable Logic Controllers
Control System Technology 11 Programmable Logic Controllers Control System Technology 12 Programmable Logic Controllers
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
2
22/10/2021
Control System Technology 13 Programmable Logic Controllers Control System Technology 14 Programmable Logic Controllers
SW1
L
IM:1-4 OM:1-2
light
b. Ladder diagram d. PLC program (ladder diagram language)
PLC implementation of a ladler diagram control circuit for a pneumatic cylinder. Observe
the use of a NC stop pushbutton in the input diagram with a NO contact symbol in the
PLC program to implement the NC stop function
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
Control System Technology 15 Programmable Logic Controllers Control System Technology 16 Programmable Logic Controllers
manufacturers. Typical limitations include the following IM:2-1 OM:2-1 IM:2-3 OM:2-3
PB2 PB2 PB4 PB4
• Power must flow from left to right, up, or down a. Two ways to implement a NO switching function
Output OM:2-1 is OFF when PB1 is not pressed and ON when PB1 is pressed
b. Two ways to implement a NC switching function
Output OM:2-3 is ON when PO3 is not pressed and OFF when PB3 is pressed
Output OM:2-2 is OFF when PB2 is not pressed and ON when PB2 is pressed Output OM:2-4 is ON when PB4 is not pressed and OFF when PB4 is pressed
• Power must never flow from right to left Two ways to implement a NO switch and two ways to implement a NC switch. Observe
• The number of series contacts is limited to 11 (or some other the double negative effect in PB2; it causes the NC switch, PB2, to behave like a NO
switch. Also note that both methods of implementing a NC switch involve use of a single
number set by the manufacturer) negative
• The number of parallel contacts is limited to 7 (or some other
number set by the manufacturer)
• A rung can have only one output
• The single output must be on the top line in a rung
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
Control System Technology 17 Programmable Logic Controllers Control System Technology 18 Programmable Logic Controllers
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
3
22/10/2021
Control System Technology 19 Programmable Logic Controllers Control System Technology 20 Programmable Logic Controllers
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
Control System Technology 21 Programmable Logic Controllers Control System Technology 22 Programmable Logic Controllers
The input/output diagram and the LD program of a PLC used to control the hydraulic
hoist. Observe the use of a NO stop pushbutton in the input diagram with a NC contact
symbol in the PLC program to implement the NC stop function
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
Control System Technology 23 Programmable Logic Controllers Control System Technology 24 Programmable Logic Controllers
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
4
22/10/2021
Control System Technology 25 Programmable Logic Controllers Control System Technology 26 Programmable Logic Controllers
- Ex.12.1: The batch blending process is to be controlled by a The PLC program consists of six rungs IM:1-1 IM:1-2 OM:1-4
Time/event-driven sequential control system • Rung 1 turns ON output OM:1-4 (CYCLE CYCLE OM:1-4 T:4
Sol. a Sol. b ON Sol. c
water syrup STEP 3: finish mixing the two ingredients ON light) when START is pressed and 2 OM:1-4 T:4 OM:1-3
LL3 Begins when LL3 closes and ends 5𝑚𝑖𝑛 later keeps it ON until the tank is empty at the 3 CYCLE ON LL2 Done Sol. a
LL2 Sol. c
STEP 4: drain the mixture from the tank end of STEP 5. Initially, the true path is OM:1-4 IM:1-3
LL2 LL3
T:4
Done
OM:1-1
Sol. b
drain
LL1 through the normally closed T:4 contact. 4 IM:1-3 IM:1-4 T:4 OM:1-2
CYCLE ON
Begins when STEP 3 is done and ends when In STEP 4, the true path is through the 5 Done
TIMER
L switch LL1 opens normally open LL1 contact OM:1-4
Enable/Reset D
T:4
START Enable
PB STEP 5: maintain the initial conditions • Rung 2 closes the normally open drain IM:1-4
Run E
T:4-E
Run
Begins when LL1 opens and ends when valve when OM:1-4 is ON and before Preset
5 min
R
T:4-R
OM:1-2 OM:1-5
Draw a PLC ladder diagram program that satisfies the above • Rung 3 energizes solenoid a when
design criteria OM:1-4 goes ON, deenergizes it when LL2 T:4-R
Solution closes, and keeps it from going back ON when the level drops
below LL2 in step 4
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
Control System Technology 27 Programmable Logic Controllers Control System Technology 28 Programmable Logic Controllers
T:4-R
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
Control System Technology 29 Programmable Logic Controllers Control System Technology 30 Programmable Logic Controllers
A two-counter PLC program maintains a count A generic sequencer with the I output address SE:2. When the Enable/Reset line is OFF,
of the number of customers in a store the sequencer is reset to STEP 1, it ignores changes on the step input line, and output
SE:2 is OFF. When the Enable/Reset line is ON, the step pointer advances one step
each time the step input line goes from OFF to ON. Output SE:2 goes ON when the
sequencer advances to the last step. The sequencer remains in the last step and SE:2
remains ON until Enable/Reset is turned OFF
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
5
22/10/2021
Control System Technology 31 Programmable Logic Controllers Control System Technology 32 Programmable Logic Controllers
Run
T:8 solid feeder
• Drain valve open and everything else
OM:1-1 Preset
30 sec
OFF, delay 30𝑠 after START is pressed
SEQUENCER
Enable/Reset D
Done water metering pump
water
syrup metering pump
syrup
• Close drain valve, turn water metering
OM:1-1 SE:2
pump ON, turn run light ON, delay 90𝑠
Step
T:8 Steps: 12
output module OM:1
Run
R
• Turn syrup metering pump ON, turn
Starting Register drain valve
RA:0151 START drain mixer ON, delay 60𝑠
Typical timing diagram
STOP • Turn syrup metering pump OFF, turn
Run
Enable/Reset solids feeder ON, delay 30𝑠
• Turn water metering pump OFF, turn solids feeder OFF, delay 90𝑠
T:8
A generic sequencer with timed steps. The timer is enabled by its own output, causing it
to reset immediately after it has finished a 30𝑠 delay. After it has reset, the timer • Open tank drain valve, turn mixer OFF, delay 60𝑠 to drain the tank
immediately begins another 30𝑠 delay (assuming OM:1-1 is ON). The timing diagram
illustrates the sequence of pulses produced by the timer in this circuit Solution
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
Control System Technology 33 Programmable Logic Controllers Control System Technology 34 Programmable Logic Controllers
§4.PLC Programming Functions §4.PLC Programming Functions TIMER SEQUENCER RA: Register
Steps: 12 Address Content
0151 0000 0000
The input and output assignments are as follows STEP 1: holds the sequencer in the Steps Pointer:
RA:0150
0152
0153
0010
0010
0011
0011
Starting Register 0154 0010 0011
Start PB IM:1-6 RUN light OM:1-1 reset condition, and only Delay
30 sec RA:0151
0155
0156
0011
0011
0111
0111
Output Destination 0157 0011 0111
STOP
delays are multiples of 30𝑠, so the timed- 0 0 1 0 0 0 1 1
8 8
step sequencer in Figure 12.12 will be drain valve closed run light ON
water metering pump ON
Gnd
input
Gnd
output
satisfactory. module module
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
Control System Technology 35 Programmable Logic Controllers Control System Technology 36 Programmable Logic Controllers
§4.PLC Programming Functions TIMER SEQUENCER RA: Register §4.PLC Programming Functions
Steps: 12 Address Content
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien
6
22/10/2021
Control System Technology 37 Programmable Logic Controllers Control System Technology 38 Programmable Logic Controllers
Control System Technology 39 Programmable Logic Controllers Control System Technology 40 Programmable Logic Controllers
Control System Technology 41 Programmable Logic Controllers Control System Technology 42 Programmable Logic Controllers