We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 20
Mastering PLC
Programming
Ebook
N ria eC
A COMPLETE GUIDE OF
INDUSTRIAL AUTOMATION
THE ENGINEERS GROUPLl
PROGRAMMABLE LOGIC CONTROLLERS...
TODO LIST
21 INTRODUCTION
211 Ladder Logic
212 Programming
2.13 PLC Connections
2.14 Ladder Logic Inputs
2.15 Ladder Logic Outputs
22 ACASE STUDY
23 SUMMARY
24 PRACTICE PROBLEMS
25 PRACTICE PROBLEM SOLUTIONS
26 ASSIGNMENT PROBLEMS
PLC HARDWARE.
31 INTRODUCTION
32 INPUTS AND OUTPUTS
3.2.1 Inputs
3.2.2 Output Modules
33 RELAYS
3.4 ACASE STUDY
35 ELECTRICAL WIRING DIAGRAMS
3.5.1 JIC Wiring Symbols
36 SUMMARY
37 PRACTICE PROBLEMS
3.8 PRACTICE PROBLEM SOLUTIONS
3.9 ASSIGNMENT PROBLEMS
LOGICAL SENSORS..
41 INTRODUCTION
42 SENSOR WIRING
421 Switches
422 Transistor Transistor Logic (TTL)
423 — Sinking/Soureing
424 Solid State Relays
43 PRESENCE DETECTION
43.1 Contact Switches
432 Reed Switches
433 Optical (Photoelectric) Sensors
434 Capacitive Sensors
435 Inductive Sensors
436 Ultrasonic
437 Hall Effect438 Fluid Flow
426
426
427
430
436
44 SUMMARY
45 PRACTICE PROBLEMS
46 PRACTICE PROBLEM SOLUTIONS
47 ASSIGNMENT PROBLEMS,
LOGICAL ACTUATORS..
5.1 INTRODUCTION
52 SOLENOIDS
53 VALVES
54 CYLINDERS,
55 HYDRAULICS
5.6 PNEUMATICS
57 MOTORS
58 OTHERS.
5.9 SUMMARY
5.10 PRACTICE PROBLEMS
SL PRACTICE PROBLEM SOLUTIONS
5.12 ASSIGNMENT PROBLEMS,
BOOLEAN LOGIC DESIGN.
6.1 I ODUCTION
6.2 BOOLEAN ALGEBRA
63 LOGIC DESIGN
63.1 Boolean Algebra Techniques
64 COMMON LOGIC FORMS
64.1 Complex Gate Forms
64.2 Multiplexers
65 SIMPLE. IGN CASES,
65.1 Basic Logic Functions
652 Car Salety System
65.3 Motor Forward/Reverse
654 A Burglar Alarm
66 SUMMARY
67 PRACTICE PROBLEMS
68 PRACTICE PROBLEM SOLUTIONS
69 ASSIGNMENT PROBLEMS,
KARNAUGH MAPS..
WW INTRODUCTION
72 SUMMARY
73 PRACTICE PROBLEMS
74 PRACTICE PROBLEM SOLUTIONS
5.10page ili
7S ASSIGNMENT PROBLEMS,
PLC OPERATION.
8.1 INTRODUCTION
82 OPERATION SEQUENCE
8.2.1 The Input and Output Scans
8.22 The Logic Sean
83 PLC STATUS
84 MEMORY TYPES
85 SOFTWARE BASED PLCS.
86 SUMMARY
87 PRACTICE PROBLEMS
88 PRACTICE PROBLEM SOLUTIONS:
89 ASSIGNMENT PROBLEMS
LATCHES, TIMERS, COUNTERS AND MORE.
91
92
93
94
95
96
97
98
99
9.10
91
STRUCTURED LOGIC DESIGN.
10.1
10.2
103
104
105
106
10.7
108
INTRODUCTION
LATCHES
‘TIMERS
COUNTERS
MASTER CONTROL RELAYS (MCRs)
INTERNAL BITS
DESIGN CASES
97.1 Basic Counters And Timers
97.2 More Timers And Counters
97.3 Deadman Switch
974 Conveyor
975 Accept/Reject Sorting
9.7.6 Shear Press
SUMMARY
PRACTICE PROBLEMS
PRACTICE PROBLEM SOLUTIONS
ASSIGNMENT PROBLEMS
INTRODUCTION
PROCESS SEQUENCE BITS
TIMING DIAGRAMS
DESIGN CASES
SUMMARY
PRACTICE PROBLEMS,
PRACTICE PROBLEM SOLUTIONS
ASSIGNMENT PROBLEMS
9.26
927
928
932
943
10.1
10.1
10.2
10.6
10.9
10.9
10.9
10.10
10.14i
12.
13.
13.11
14
page iv
FLOWCHART BASED DESIGN. 1d
id INTRODUCTION 1
112 BLOCK LOGIC M4
113. SEQUENCE BITS Wat
114 SUMMARY 1s
Ws PRACTICE PROBLEMS, 11S
116 PRACTICE PROBLEM SOLUTIONS. 11.16
117 ASSIGNMENT PROBLEMS 11.26
STATE BASED DESIGN. 12.1
121 INTRODUCTION 121
12.1.1 State Diagram Example 124
12.1.2 Conversion to Ladder Logie 127
Block Logic Conversion 127
State Equations 12.16
State-Transition Equations 12.24
122. SUMMARY 12.29
123. PRACTICE PROBLEMS 12.29
124 PRACTICE PROBLEM SOLUTIONS 12.34
125 ASSIGNMENT PROBLEMS 12.49
NUMBERS AND DATA... 00cccecceeeeneesee BI
14 INTRODUCTION 13.1
132 NUMERICAL VALUES 132
1321 Binary 13.2
Boolean Operations BS
Binary Mathematics 13.6
13.2.2 Other Base Number Systems 13.10
13.2.3 BCD (Binary Coded Decimal) 13.1
133 DATA CHARACTERIZATION 13.11
13.3.1 ASCII (American Standard Code for Information Interchange)
133.2 Parity 13.14
13.3.3. Checksums 13.15
1334 — Gray Code 13.16
134 SUMMARY 13.17
135 PRACTICE PROBLEMS 13.17
136 PRACTICE PROBLEM SOLUTIONS, 13.20
13.7 ASSIGNMENT PROBLEMS 13.23
PLC MEMORY, 14.1
141 INTRODUCTION 141
142 PROGRAM VS VARIABLE MEMORY. 141143. PROGRAMS.
144 VARIABLES (TAGS)
14.4.1 Timer and Counter Memory
14.4.2 PLC Status Bits
14.4.3 User Function Control Memory
145 SUMMARY
146 PRACTICE PROBLEMS:
147 PRACTICE PROBLEM SOLUTIONS
148 ASSIGNMENT PROBLEMS,
LADDER LOGIC FUNCTIONS.....
15.1 INTRODUCTION
152 DATA HANDLING
15.2.1 Move Functions
15.2.2 Mathematical Functions
15.2.3, Conversions
15.24 Array Data Functions
Statistics
Block Operations
153 LOGICAL FUNCTIONS
15.3.1 Comparison of Values
15.3.2 Boolean Functions
154 DESIGN CASES:
15.4.1 Simple Calculation
154.2 For-Next
15.4.3. Series Caleulation
15.44 Flashing Lights
15.5 SUMMARY
15.6 PRACTICE PROBLEMS:
15.7 PRACTICE PROBLEM SOLUTIONS
158 ASSIGNMENT PROBLEMS,
ADVANCED LADDER LOGIC FUNCTIONS...
16.1
16.2
16.3
16.4
INTRODUCTION
LIST FUNCTIONS
162.1 Shift Registers
1622 Stacks
16.2.3 Sequencers
PROGRAM CONTROL
163.1 Branching and Looping
16.3.2 Fault Handling
16.3.3 Interrupts
INPUT AND OUTPUT FUNCTIONS
16.4.1 Immediate I/O Instructions
143
143
14.6
148
14.11
14.12
14.12
14.13
14.15
15.1
15.1
153
153
15.5
15.10
15.11
15.12
15.13
15.15
15.15
15.21
15.22
15.22
15.23
15.24
15.25
15.25
15.26
15.28
15.34
16.1
16.1
16.1
16.1
16.3
16.6
16.9
16.9
16.14
16.15
16.17
16.1720.
16.5 DESIGN TECHNIQUES 16.19
165.1 State Diagrams 16.19
166 DESIGN CASES 16.24
166.1 If Then 16.24
166.2 Traflic Light 16.25
167 SUMMARY 16.25
168 PRACTICE PROBLEMS 16.26
169 PRACTICE PROBLEM SOLUTIONS 16.28
16.10 ASSIGNMENT PROBLEMS 16.37
OPEN CONTROLLERS. ..0.00.0.0..0.0c0ccecscccesetes essere TL
171 INTRODUCTION 171
172 IEC 61131 172
173 OPEN ARCHITECTURE CONTROLLERS 173
174 SUMMARY 174
175 PRACTICE PROBLEMS 174
176 PRACTICE PROBLEM SOLUTIONS 174
177 ASSIGNMENT PROBLEMS 174
INSTRUCTION LIST PROGRAMMING...........:c0:ccesceeeeeneereee 18.1
18.1 INTRODUCTION 18.1
18.2 THE IEC 61131 VERSION 18.1
183 THE ALLEN-BRADLEY VERSION 184
184 SUMMARY 18.9
18.5 PRACTICE PROBLEMS 18.10
18.6 PRACTICE PROBLEM SOLUTIONS 18.10
18.7 ASSIGNMENT PROBLEMS 18.10
STRUCTURED TEXT PROGRAMMING. lO
19.1 INTRODUCTION 191
192 THE LANGUAGE 192
19.2.1 Elements of the Language 193
19.2.2 Putting ‘Things Together in a Program 199
193 AN EXAMPLE 19.14
194 SUMMARY 19.16
195 PRACTICE PROBLEMS 19.16
196 PRACTICE PROBLEM SOLUTIONS 19.16
197 ASSIGNMENT PROBLEMS 19.16
SEQUENTIAL FUNCTION CHARTS.
20.1 INTRODUCTION 20.1
202 A COMPARISON OF METHODS 20.16
203 SUMMARY 20.1621
22,
204 PRACTICE PROBLEMS 20.17
205 PRACTICE PROBLEM SOLUTIONS 20.18
206 ASSIGNMENT PROBLEMS 20.25
FUNCTION BLOCK PROGRAMMING.. 2211
211 INTRODUCTION 211
212 CREATING FUNCTION BLOCKS 213
213. DESIGN CASE 214
214 SUMMARY 214
215 PRACTICE PROBLEMS 215
216 PRACTICE PROBLEM SOLUTIONS 215
217 ASSIGNMENT PROBLEMS 215
ANALOG INPUTS AND OUTPUTS........00:cccssstesssseeesereeeeeee 22,1
22.1 INTRODUCTION 22.1
222 ANALOG INPUTS 22
22.2.1 Analog Inputs With a PLC-5 29
223 ANALOG OUTPUTS. 22.13
22.3.1 Analog Outputs With A PLC-5 22.16
22.3.2 Pulse Width Modulation (PWM) Outputs. 22:18
22.3.3, Shielding, 22.20
224 DESIGN CASES 2.22
22.4.1 Process Monitor 222
225 SUMMARY 22.22
226 PRACTICE PROBLEMS 22.23
227 PRACTICE PROBLEM SOLUTIONS 22.24
228 ASSIGNMENT PROBLEMS 22.29
CONTINUOUS SENSORS. ...00...0.ccscccesccseeeeseeeeeeetieneeeeeeeneee 23.1
23.1 INTRODUCTION 23.1
232 INDUSTRIAL SENSORS 23.2
23.2.1 Angular Displacement 2.3
Potentiometers 23.3
23.2.2 Encoders Ba
‘Tachometers 2B
23.2.3 Linear Position 23.8
Potentiometers 238
Linear Variable Differential Transformers (LVDT)23.9
Moire Fringes 23.11
Accelerometers 23.12
23.2.4 Forces and Moments 23.15
Strain Gages 23.15
Piezoelectric 23.18
23.2.5 Liquids and Gases 23.20Pressure
Venturi Valves
Coriolis Flow Meter
Magnetic Flow Meter
Ultrasonic Flow Meter
Vortex Flow Meter
Positive Displacement Meters
Pitot Tubes:
23.2.6 Temperature
Resistive Temperature Detectors (RTDs)
‘Thermocouples
Thermistors
Other Sensors
23.2.7 Light
Light Dependant Resistors (LDR)
23.2.8 Chemical
pH
Conductivity
23.2.9 Others
233 INPUT ISSUES
234 SENSOR GLOSSARY
235 4 SUMMARY
236 REFERENCES
237 PRACTICE PROBLEMS:
23.8 PRACTICE PROBLEM SOLUTIONS
23.9 ASSIGNMENT PROBLEMS
CONTINUOUS ACTUATORS.
24.1 INTRODUCTION
242 ELECTRIC MOTORS
24.2.1 Basic Brushed DC Motors
24.2.2 AC Motors
24.2.3. Brushless DC Motors
24.2.4 — Stepper Motors
24.2.5 Wound Field Motors
243 HYDRAULICS,
244 OTHER SYSTEMS
24.5 SUMMARY
246 PRACTICE PROBLEMS
247 PRACTICE PROBLEM SOLUTIONS
248 ASSIGNMENT PROBLEMS:
CONTINUOUS CONTROL.
25.1 INTRODUCTION
23.21
23.22
23.23
23.24
23.24
23.24
23.25
23.25
23.25
23.26
23.26
23.28
23.30
23.30
23.30
2331
2331
2331
23.32
23.32
23.35
23.36
23.37
23.37
23.38
23.40
24.1
24.1
24.1
243
24.7
24.15
24.17
24.19
24.23
24.24
24.25
24.25
24.26
24.27
25.1
25.126.
27.
28.
25.2 CONTROL OF LOGICAL ACTUATOR SYSTEMS 25.4
253 CONTROL OF CONTINUOUS ACTUATOR SYSTEMS 25.5
253.1 Block Diagrams 25.5
25.3.2 Feedback Control Systems 256
25.3.3. Proportional Controllers 25.8
25.3.4 PID Control Systems 25.12
254 DESIGN CASES 25.14
254.1 Oven Temperature Control 25.14
25.4.2 Water Tank Level Control 25.17
25.4.3 Position Measurement 25.20
25.5 SUMMARY 25.20
256 PRACTICE PROBLEMS: 25.21
25.7 PRACTICE PROBLEM SOLUTIONS, 25.22
258 ASSIGNMENT PROBLEMS 25.26
FUZZY LOGIC... eec te ec tetereteee terete reeneereeeesneeeres 26,1
26.1 INTRODUCTION 26.1
262 COMMERCIAL CONTROLLERS, 26.7
263 REFERENCES 26.7
264. SUMMARY 267
265 PRACTICE PROBLEMS 268
26.6 PRACTICE PROBLEM SOLUTIONS, 26.8
267 ASSIGNMENT PROBLEMS 268
SERIAL COMMUNICATION.
271 INTRODUCTION
272 SERIAL COMMUNICATIONS 272
272.1 RS-232 215
ASCII Functions 279
273 PARALLEL COMMUNICATIONS 27.13
274 DESIGN CASES 27.14
274.1 PLC Interface To a Robot 27.14
275 SUMMARY 27.15
276 PRACTICE PROBLEMS 27.15
277 PRACTICE PROBLEM SOLUTIONS 27.16
278 ASSIGNMENT PROBLEMS 27.18
NETWORKING... 0. ccccecessceesess ees eesteseeesieseeesessresienessessaesseereen 28,1
28.1 INTRODUCTION 28.1
28.1.1 Topology 28.2
28.1.2 OSI Network Model 28.3
28.1.3 Networking Hardware 28.5
28.1.4 Control Network Issues 28.7
282 NETWORK STANDARDS, 28.829.
282.1 Devicenet
28.22 ‘CANbus
28.23 Controlnet
28.24 Ethernet
28.2.5 Profibus
28.2.6 Sercos,
283 PROPRIETARY NETWORKS
283.1 Data Highway
284 NETWORK COMPARISONS
285 DESIGN CASES.
285.1 Devicenet
28.6 SUMMARY
287 PRACTICE PROBLEMS
288 PRACTICE PROBLEM SOLUTIONS
28.9 ASSIGNMENT PROBLEMS
INTERNET.
29.1 INTRODUCTION
29.1.1 Computer Addresses
IPV6
29.12 Phone Lines
29.13 Mail Transfer Protocols
29.14 FTP - File Transfer Protocol
29.15 HTTP - Hypertext Transfer Protocol
29.16 Novell
29.1.7 Security
Firewall
IP Masquerading
29.1.8 | HTML - Hyper Text Markup Language
29.19 URLs
29.110 Eneryption
29.111 Compression
29.112 Clients and Servers
291.13 Java
29.114 Javascript
29.115 CGI
29.1.16 ActiveX
29.1.17 Graphics
292 DESIGN CASES,
292.1 Remote Monitoring System
293 SUMMARY
294 PRACTICE PROBLEMS:
29.5 PRACTICE PROBLEM SOLUTIONS,
296 ASSIGNMENT PROBLEMS
288
28.12
28.13
28.14
28.15
28.15
28.16
28.16
28.20
28.22
28.22
28.23
28.23
28.24
28.28
wee 29.1
291
29.2
29.3
29.3
293
294
294
29.4
29.5
29.5
29.5
29.5
29.6
29.6
29.7
29.7
299
29.9
29.9
29.9
29.10
29.10
29.10
29.11
29.11
29.11
29.1130.
31
32.
HUMAN MACHINE INTERFACES (HMI).
30.1
30.2
303
304
30.5
30.6
30.7
INTRODUCTION
HMI/MMI DESIGN
DESIGN CASES
SUMMARY
PRACTICE PROBLEMS
PRACTICE PROBLEM SOLUTIONS.
ASSIGNMENT PROBLEMS:
ELECTRICAL DESIGN AND CONSTRUCTION:
31d INTRODUCTION
312 ELECTRICAL WIRING DIAGRAMS
312.1 Selecting Voltages
312.2 Grounding
3123 Wiring
31.24 Suppressors
312.5 PLC Enclosures
312.6 Wire and Cable Grouping
313 FAIL-SAFE DESIGN
314 SAFETY RULES SUMMARY
315. REFERENCES
316 SUMMARY
317 PRACTICE PROBLEMS
318 PRACTICE PROBLEM SOLUTIONS,
319 ASSIGNMENT PROBLEMS:
SOFTWARE ENGINEERING.
32.1 INTRODUCTION
32.1.1 Fail Safe Design
322 DEBUGGING
322.1 Troubleshooting
322.2 Forcing
323 PROCESS MODELLING
324 PROGRAMMING FOR LARGE SYSTEMS
32.4.1 Developing a Program Structure
32.4.2 Program Verification and Simulation
325. DOCUMENTATION
326 COMMISIONING
327 SAFETY
32.7.1 IEC 61508/61511 safety standards
328 LEAN MANUFACTURING
32.9 REFERENCES:
32.10 SUMMARY
30.1
30.1
302
30.3
30.3
304
30.4
304
311
31.1
311
318
319
31.12
31.13
31.14
31.16
3117
3118
31.20
31.20
31.20
31.20
31.20
321
32.1
32.1
32.2
323
323
32.3
32.8
328
32.11
32.12
32.20
32.20
32.21
32.22
32.23
32.2333.
34,
35.
32.11 PRACTICE PROBLEMS 32.23
32.12 PRACTICE PROBLEM SOLUTIONS 32.23
32.13 ASSIGNMENT PROBLEMS 32.23
SELECTING A PLC... ceccsessseeeeeeeensseeenssees
33.1 INTRODUCTION 33.1
33.2 SPECIAL I/O MODULES 336
333 SUMMARY 33.9
33.4 PRACTICE PROBLEMS 33.10
335 PRACTICE PROBLEM SOLUTIONS 33.10
33.6 ASSIGNMENT PROBLEMS 33.10
FUNCTION REFERENCE.... ue cscs
34.1 FUNCTION DESCRIPTIONS 34.1
34.1.1 General Functions 34.1
34.1.2 Program Control 343
34.1.3. Timers and Counters 345
34.1.4 Compare 34.10
34.1.5 Calculation and Conversion 34.14
34.1.6 Logical
34.1.7 Move
34.1.8 File
34.1.9 List
34.1.10 Program Control
34.1.1 Advanced Input/Output
341.12 String
34.2 DATA TYPES
COMBINED GLOSSARY OF TERMS.
35.1 A
35.2 B
353 c
354 D
355 E
356 F
37. «G
358 H
35.9 I
35.10 J
3511 K
3512. L
35.13. M
3514 ON
3515 OPLC REFERENCES ...0.0...0.0cccccscesesseesseseesessseseseseseeseseeenerenreenees
36.1 SUPPLIERS
36.2 PROFESSIONAL INTEREST GROUPS
36.3 PLC/DISCRETE CONTROL REFERENCES
GNU Free Documentation Licemse.......0......cccccccseseeseesesteeseesesenes
37.1 PREAMBLE
37.2 APPLICABILITY AND DEFINITIONS
37.3 VERBATIM COPYING
374 COPYING IN QUANTITY
37.5 MODIFICATIONS
37.6 COMBINING DOCUMENTS
37.7 COLLECTIONS OF DOCUMENTS
37.8 AGGREGATION WITH INDEPENDENT WORKS
37.9 TRANSLATION
37.10 TERMINATION
37.11 FUTURE REVISIONS OF THIS LICENSE
37.12 How to use this License for your documents1.1 TODO LIST
- Finish writing chapters
- fuzzy logic chapter
* - internet chapter
- hmi chapter
- modify chapters
* - electrical wiring chapter
- fix wiring and other issues in the implementation chapter
- software chapter - improve P&ID section
- appendices - complete list of instruction data types in appendix
~ small items
- update serial IO slides
-all chapters
* ~ grammar and spelling check
* ~ add a resources web page with links2. PROGRAMMABLE LOGIC CONTROLLERS
Topics:
+ PLC History
+ Ladder Logic and Relays
+ PLC Programming
+ PLC Operation
+ An Example
Objectives:
+ Know general PLC issues
+ To be able to write simple ladder logic programs
* Understand the operation ofa PLC
2.1 INTRODUCTION
Control engineering has evolved over time. In the past humans were the main
method for controlling a system. More recently electricity has been used for control and
early electrical control was based on relays. These relays allow power to be switched on
and off without a mechanical switch. It is common to use relays to make simple logical
control decisions. The development of low cost computer has brought the most recent rev:
olution, the Programmable Logic Controller (PLC). The advent of the PLC began in the
1970s, and has become the most common choice for manufacturing controls.
PLCs have been gaining popularity on the factory floor and will probably remain
predominant for some time to come. Most of this is because of the advantages they offer.
+ Cost effective for controlling complex systems.
+ Flexible and can be reapplied to control other systems quickly and easily.
+ Computational abilities allow more sophisticated control.
+ Trouble shooting aids make programming easier and reduce downtime.
+ Reliable components make these likely to operate for years before failure.
2.1.1 Ladder Logic
Ladder logic is the main programming method used for PLCs. As mentioned
before, ladder logic has been developed to mimic relay logie. The decision to use the relayple wiring -2.3
input coil
o e
OR —
Oo
|e
eo le
Figure 2.) Simple Relay Layouts and Schematics
Relays are used to let one power source close a switch for another (often high cur-
rent) power source, while keeping them isolated. An example of a relay ina simple control
application is shown in Figure 2.2. In this system the first relay on the left is used as nor-
mally closed, and will allow current to flow until a voltage is applied to the input A. The
second relay is normally open and will not allow current to flow until a voltage is applied
to the input B, If current is flowing through the first two relays then current will flow
through the coil in the third relay, and close the switch for output C. This circuit would
normally be drawn in the ladder logic form. This can be read logically as C will be on if A
is offand B ison.ple wiring -2.5
push buttons —L.
+
power
supply
+24V
com.
inputs
ladder
logic
‘outputs
115Vaq ight
Figure 23 APLC Illustrated With Relays
Many relays also have multiple outputs (throws) and this allows an output relay to
also be an input simultaneously. The circuit shown in Figure 2.4 is an example of this, itis
called a seal in circuit, In this circuit the current can flow through either branch of the cir-
cuit, through the contacts labelled A or B, The input B will only be on when the output B
is on. IfB is off, and A is energized, then B will turn on. If B tums on then the input B will
tum on, and keep output B on even if input A goes off. After B is turned on the output B
will not turn off.2.1.3 PLC Connections
When a process is controlled by a PLC it uses inputs from sensors to make deci-
sions and update outputs to drive actuators, as shown in Figure 2.9. The process is a real
process that will change over time. Actuators will drive the system to new states (or modes
of operation). This means that the controller is limited by the sensors available, if an input
is not available, the controller will have no way to detect a condition
PROCESS
ma a
Feedback from conbeon'a
sensors/switches actuajors
~~] | PLC
Figure 2.9 The Separation of Controller and Process
The control loop is a continuous cycle of the PLC reading inputs, solving the lad-
der logic, and then changing the outputs. Like any computer this does not happen
instantly. Figure 2.10 shows the basic operation cycle of'a PLC. When power is turned on
initially the PLC does a quick sanity check to ensure that the hardware is working prop-
erly. If there is a problem the PLC will halt and indicate there is an error. For example, if
the PLC power is dropping and about to go off this will result in one type of fault. If the
PLC passes the sanity check it will then scan (read) all the inputs. After the inputs values
are stored in memory the ladder logic will be scanned (solved) using the stored values -
not the current values. This is done to prevent logic problems when inputs change during
the ladder logic scan. When the ladder logic scan is complete the outputs will be scannedMastering PLC
Programming
Ebook
\ ra ET
Dstt
Cera DEK
= bois ra
A COMPLETE GUIDE OF
INDUSTRIAL AUTOMATION
THE ENGINEERS GROUP