PLC and HMI Programming (Advanced PLC Training System)
PLC and HMI Programming (Advanced PLC Training System)
Order no.:
20922-10
First Edition
Revision level: 11/2016
By the staff of Festo Didactic
Festo Didactic Lte/Ltd, Quebec, Canada 2015
Internet: www.festo-didactic.com
e-mail: did@de.festo.com
Printed in Canada
All rights reserved
ISBN 978-2-89747-319-8 (Printed version)
ISBN 978-2-89747-320-4 (CD-ROM)
Legal Deposit Bibliothque et Archives nationales du Qubec, 2015
Legal Deposit Library and Archives Canada, 2015
The purchaser shall receive a single right of use which is non-exclusive, non-time-limited and limited
geographically to use at the purchaser's site/location as follows.
The purchaser shall be entitled to use the work to train his/her staff at the purchasers site/location and
shall also be entitled to use parts of the copyright material as the basis for the production of his/her own
training documentation for the training of his/her staff at the purchasers site/location with
acknowledgement of source and to make copies for this purpose. In the case of schools/technical
colleges, training centers, and universities, the right of use shall also include use by school and college
students and trainees at the purchasers site/location for teaching purposes.
The right of use shall in all cases exclude the right to publish the copyright material or to make this
available for use on intranet, Internet and LMS platforms and databases such as Moodle, which allow
access by a wide variety of users, including those outside of the purchasers site/location.
Entitlement to other rights relating to reproductions, copies, adaptations, translations, microfilming and
transfer to and storage and processing in electronic systems, no matter whether in whole or in part, shall
require the prior consent of Festo Didactic.
Information in this document is subject to change without notice and does not represent a commitment on
the part of Festo Didactic. The Festo materials described in this document are furnished under a license
agreement or a nondisclosure agreement.
Festo Didactic recognizes product names as trademarks or registered trademarks of their respective
holders.
All other trademarks are the property of their respective owners. Other trademarks and trade names may
be used in this document to refer to either the entity claiming the marks and names or their products.
Festo Didactic disclaims any proprietary interest in trademarks and trade names other than its own.
Description
DANGER indicates a hazard with a high level of risk which, if not
avoided, will result in death or serious injury.
WARNING indicates a hazard with a medium level of risk which,
if not avoided, could result in death or serious injury.
CAUTION indicates a hazard with a low level of risk which, if not
avoided, could result in minor or moderate injury.
CAUTION used without the Caution, risk of danger sign ,
indicates a hazard with a potentially hazardous situation which,
if not avoided, may result in property damage.
Caution, risk of electric shock
Direct current
Alternating current
III
Description
Protective conductor terminal
Equipotentiality
On (supply)
Off (supply)
Equipment protected throughout by double insulation or
reinforced insulation
In position of a bi-stable push control
IV
Table of Contents
Preface .................................................................................................................. XI
About This Manual .............................................................................................. XIII
To the Instructor .................................................................................................. XV
Introduction PLC Automation Systems ........................................................... 1
DISCUSSION OF FUNDAMENTALS ....................................................... 1
Analogy with the human body ................................................. 2
Sensors vs. senses .................................................................... 2
The PLC is the brain of the mechatronic system ........................ 3
Actuators are the system muscles ............................................. 3
The Advanced PLC Training System and you ........................ 4
PLC compared to a computer.................................................. 8
Examples of PLC utilization ..................................................... 9
Production line ........................................................................... 9
Motors and conveyors ................................................................ 9
Process control ........................................................................ 10
Human-machine interfaces.................................................... 11
Networking ............................................................................. 11
Exercise 1
Table of Contents
Studio 5000 exploration ......................................................... 33
Opening an existing project ...................................................... 33
Examining the Start Page ......................................................... 34
Help menu ................................................................................ 37
Structure of this PLC program .................................................. 39
Downloading the project (to the PLC) ....................................... 42
FactoryTalk View Studio exploration ..................................... 44
Restoring the HMI application .................................................. 45
Displays .................................................................................... 48
Network configuration ............................................................... 52
Creating the runtime file ........................................................... 54
Everything running together .................................................. 57
Loading the HMI application ..................................................... 57
Using the application ................................................................ 58
Analyzing the ladder rungs ....................................................... 60
End of the procedure ............................................................. 62
Exercise 2
Exercise 3
VI
Table of Contents
PROCEDURE .................................................................................. 93
Set up and connections ......................................................... 93
PLC programming.................................................................. 95
Starting a new project .............................................................. 95
Entering instructions................................................................. 97
Transferring the PLC project .................................................. 100
Programming the interface .................................................. 101
Project Settings ...................................................................... 101
Network configuration ............................................................ 102
Arranging tags ........................................................................ 103
Developing the interface ........................................................ 106
Testing the application in FactoryTalk View Studio ................ 120
Transferring the HMI program to the touch screen................. 122
Using the application ........................................................... 122
Troubleshooting ................................................................... 123
End of the procedure ........................................................... 123
Exercise 4
Exercise 5
VII
Table of Contents
Analog devices and values .................................................. 170
Example featuring a level sensor and a pump drive ...............170
Analog value formats ..............................................................171
Analog values and the benefits of function blocks .............. 171
Move instruction .....................................................................172
Comparison instructions .........................................................172
Math instructions ....................................................................173
Scaling ...................................................................................173
PROCEDURE ................................................................................ 175
Preparation (tutorial) ............................................................ 175
Set up and connections ....................................................... 176
Ladder programming activity ............................................... 180
PLC programming ..................................................................180
HMI transfer............................................................................190
Function block programming activity ................................... 192
Troubleshooting ................................................................... 197
End of the procedure ........................................................... 197
Exercise 6
VIII
Table of Contents
Appendix B Glossary of New Terms ........................................................... 233
Appendix C Conversion Table ..................................................................... 235
Appendix D Boolean Algebra and Digital Logic ........................................ 237
Appendix E Exercise Completion Time ...................................................... 243
Appendix F Additional Activities................................................................. 245
Appendix G Fault Insertion .......................................................................... 247
Index .................................................................................................................. 249
Acronyms ........................................................................................................... 251
Bibliography ....................................................................................................... 253
IX
Preface
Programmable logic controllers (PLCs) are at the center of a multitude of
automated systems. Some industries that benefit from these systems include
manufacturing plants, breweries, wastewater treatment plants, mining facilities,
and automotive assembly plants.
This manual introduces students to four PLC programming languages: ladder,
sequential function chart, function block, and structured text. The most common
PLC instructions are used within Rockwells Studio 5000 software environment.
In addition to PLC programming, students learn how to conceive interface
screens with FactoryTalk View Studio and make them work along with the PLC
project.
In terms of hardware, the Advanced PLC Training System uses modern,
industrial-grade equipment that is instrumental in teaching theoretical and handson knowledge required to work in the automation industry. Optional applications
can be purchased and connected to the PLC suitcase to add real-world sensors
and actuators to the setups.
In order to perform the exercises in this manual, the Studio 5000 and the
FactoryTalk View Studio software must be installed on the student's computer.
XI
Safety considerations
Safety symbols that may be used in this manual and on the equipment are listed
in the Safety Symbols table at the beginning of the manual.
Safety procedures related to the tasks that you will be asked to perform are
indicated in each exercise.
Make sure that you are wearing appropriate protective equipment when
performing the tasks. You should never perform a task if you have any reason to
think that a manipulation could be dangerous for you or your teammates.
Reference material
The resource kit DVD-ROM contains the PLC and HMI projects that will be
needed throughout the exercises.
Prerequisite
As a prerequisite to this course, you should have a basic understanding of
electricity. It is assumed that you have a general understanding of these
concepts:
Ohms law
Electrical measurement
Systems of units
Units are expressed using the International System of Units (SI) followed by units
expressed in the U.S. customary system of units (between parentheses).
XIII
To the Instructor
You will find in this Instructor Guide all the elements included in the Student
Manual together with the answers to all questions, results of measurements,
graphs, explanations, suggestions, and, in some cases, instructions to help you
guide the students through their learning process. All the information that applies
to you is placed between markers and appears in red.
Accuracy of measurements
The numerical results of the hands-on exercises may differ from one student to
another. For this reason, the results and answers given in this manual should be
considered as a guide. Students who correctly performed the exercises should
expect to demonstrate the principles involved and make observations and
measurements similar to those given as answers.
XV
Sample Exercise
Extracted from
the Student Manual
and the Instructor Guide
Exercise
DISCUSSION OUTLINE
DISCUSSION
65
66
The two reed switches are located on the left cylinder, as shown in Figure 81.
These single pole, single throw switches are only closed when the plunger inside
the cylinder is close to the switch.
Reed switches are actuated when an applied magnetic field joins the pair of
ferrous metal reed contacts located inside a hermetically sealed envelope.
Terminals
Reed switch
Pneumatic cylinders
A pneumatic cylinder is an actuator that converts fluid energy into straight-line
or linear mechanical energy. Single-acting cylinders generate forces in a single
direction whereas double-acting cylinders generate forces during both extension
and retraction of the rod.
67
Extends
Fluid pressure
Exhaust
Retracts
Exhaust
Fluid pressure
68
the type of valve actuators (also called operators) used to switch the
valve from one position to another
The symbols used for directional control valves indicate the above three
characteristics and also show a simplified flow path for each position. The
symbols do not provide any information about the physical construction of the
valve; they simply indicate the function of the valve.
Let us ignore the valve operators for the moment and consider only the number
of ports and positions of a valve. Most directional control valves have two or
three positions. Each position of the valve provides a different flow path
configuration. Valve types are identified using two numbers of the form m/n
where the first number m is the number of ports and the second number n is the
number of positions.
The symbol for a directional control valve consists of two or more blocks
(sometimes referred to as envelopes). There is a separate block for each position
and each block illustrates a different flow path. Ports are shown as lines
protruding from one of the blocks. The block with lines protruding, or with ports
identified by a letter or a number, shows the flow path through the valve in its
normal position (or return position). The other positions are called operated
positions (or actuated positions or working positions).
As an example, the symbol for a two-port, two-position (2/2) directional control
valve is shown in Figure 85. On the block showing the normal position of the
valve, the ports are numbered. The open (passing) flow path is shown as an
arrow. Ports that are closed (non-passing) are shown using short lines drawn at
right angles.
69
2 positions
2 possible configurations
Open Closed
The devices used to switch the valve from one position (state) to another are
called valve actuators or operators. Different types of valve actuators may be
used. Figure 86 shows a valve with an electrical actuator (a solenoid) and a
spring return. Since this valve is normally open, the normal position shows the
flowpath from port 1 to 2.
Solenoid actuator
(blocks flow from port 1)
Figure 86. 3-port, 2-position, normally open, solenoid operating, spring return valve symbol.
If the rung is true, the OTE instruction becomes true and the output turns
on
If the rung is false, the OTE instruction becomes false and the output
turns off
There are, however, some conditions where an output needs to remain on even
after the conditions that provided the output are no longer true. For example, if
separate start and stop buttons are used, you would not want to hold the start
button for the duration of the activation. In this event, an instruction with a
retentive operation is desired.
70
Abbreviation
Output latch
OTL
Output unlatch
OTU
Symbol
Figure 87. Associated OTL and OUT instructions triggered by two inputs.
Instruction
Previous state
of bit O:0/0
0
OTL
1
1
OTU
0
Rung condition
New state
of bit O:0/1
True
False
True
False
True
False
True
False
71
PROCEDURE OUTLINE
PROCEDURE
72
To avoid air leaking from the connectors, make sure that plastic tubes are cut
clean and inserted deep enough into the connectors. Plastic tubes are
removed by pressing the release button towards the body of the connector
before pulling out the tubing.
Make sure with the students that no fault is inserted to the training system.
73
74
3. Open the Controller Tags window. Click the Edit Tags tab and fill out the
Name and Alias For columns according to Figure 91. That way, you will have
all the necessary tags when writing the logic.
Suggestion: You can remove tags from the version given to the students.
75
76
3. Open the Controller Tags window. Click the Edit Tags tab and verify that the
Name and Alias For columns are as shown in Figure 94. Make some edits if
necessary. That way, you will have all the necessary tags when writing the
logic.
Suggestion: You can remove tags from the version given to the students.
77
78
12. Let us start by having an indicator light turn on whenever the mechanical limit
switch at the bottom of the clamp cylinder is actuated. To do so, you will
need an Examine On (XIC) and an Output Energize (OTE) instruction. First,
add the Examine On instruction by clicking the symbol while rung 0 is
selected (Figure 100).
79
Click here
13. Double-click the question mark (Figure 101). This gives you access to a list
of available tags. Select the alias tag that pertains to the mechanical switch
(SW3).
14. Drag and drop an Output Energize (OTE) instruction as shown in Figure 102.
80
Click here
17. Enter the logic for this rung according to Figure 105. Figure 106 shows where
to go to add a branch. X3 (clamp cylinder solenoid) energizes if one of these
two conditions is fulfilled:
x
81
82
PB2 is pressed
83
84
You may have to open the archived project, modify it, and create a new
runtime application if the PLC address or the version of the touch screen is
different.
85
Test
Yes
No
28. If you answered No to any of the preceding questions, please revise your
project, make some modifications, and download it again to the PLC.
86
CONCLUSION
In this exercise, you opened an incomplete PLC project and you made sure that
the tags were correct. Then you created a ladder routine to control the logic of
the application, using bit instructions. Finally, you transferred and ran your
program and tested it with a physical or simulated clamp and stamp application.
REVIEW QUESTIONS
2. Which output instruction changes status along with the rung status?
Output Energize (OTE)
3. Which output instruction sets the addressed bit to 0 when the rung containing
the instruction is true?
Output Unlatch (OUT)
PB2=1
SW1=0
SW2=1
SW3=1
87
Bibliography
Dunning, Gary, Introduction to the ControlLogix Programmable Automation
Controller with Labs, 2nd ed., Clifton Park, NY: Delmar, Cengage Learning, 2014,
ISBN 978-1-111-53929-0.
Rockwell
Automation,
CompactLogix
1769-UM021D-EN-P, December 2012.
5370
Controllers,
publication
253