INST231 Sec1plc
INST231 Sec1plc
INST231 Sec1plc
Lab
PLC-based motor control system: Question 91 and 92, completed objectives due by the end of day
2, section 2
Exam
Day 3 of next section only a simple calculator may be used!
Specific objectives for the mastery exam:
Electricity Review: Calculate voltages, currents, powers and/or resistances in a DC series-parallel circuit
Sketch proper wire connections for sourcing or sinking PLC I/O points
Determine status of PLC discrete output given discrete input states and a simple RLL program listing
Calculate either the full-load current or the horsepower of an electric motor (either single- or three-phase)
given the line voltage and one of the other parameters
Solve for a specified variable in an algebraic formula
Determine the possibility of suggested faults in a simple PLC circuit given a wiring diagram, RLL
program listing, and reported symptoms
INST240 Review: Calculate ranges for hydrostatic (DP) level-measuring instruments given physical
dimensions and fluid densities
INST250 Review: Convert between different pressure units (PSI, W.C., bar, etc.) showing proper
mathematical cancellation of units (i.e. the unity fraction technique)
INST262 Review: Identify specific instrument calibration errors (zero, span, linearity, hysteresis) from
data in an As-Found table
Recommended daily schedule
Day 1
Theory session topic: Introduction to PLCs
Questions 1 through 20; answer questions 1-10 in preparation for discussion (remainder for practice)
Day 2
Theory session topic: Contact and coil programming
Questions 21 through 40; answer questions 21-30 in preparation for discussion (remainder for practice)
Day 3
Theory session topic: Counter instructions
Questions 41 through 60; answer questions 41-48 in preparation for discussion (remainder for practice)
Day 4
Theory session topic: Counter applications
Questions 61 through 80; answer questions 61-67 in preparation for discussion (remainder for practice)
Feedback questions (81 through 90) are optional and may be submitted for review at the end of the day
Course Syllabus
INSTRUCTOR CONTACT INFORMATION:
Tony Kuphaldt
(360)-752-8477 [office phone]
(360)-752-7277 [fax]
[email protected]
DEPT/COURSE #: INST 231
CREDITS: 3
Lecture Hours: 10
Lab Hours: 50
Work-based Hours: 0
METHODS OF INSTRUCTION: Course structure and methods are intentionally designed to develop
critical-thinking and life-long learning abilities, continually placing the student in an active rather than a
passive role.
Independent study: daily worksheet questions specify reading assignments, problems to solve, and
experiments to perform in preparation (before) classroom theory sessions. Open-note quizzes and work
inspections ensure accountability for this essential preparatory work. The purpose of this is to convey
information and basic concepts, so valuable class time isnt wasted transmitting bare facts, and also to
foster the independent research ability necessary for self-directed learning in your career.
Classroom sessions: a combination of Socratic discussion, short lectures, small-group problem-solving,
and hands-on demonstrations/experiments review and illuminate concepts covered in the preparatory
questions. The purpose of this is to develop problem-solving skills, strengthen conceptual understanding,
and practice both quantitative and qualitative analysis techniques.
Hands-on PLC programming challenges: daily worksheet questions specify realistic scenarios
requiring students to develop real PLC programs on their PLC trainers to implement the desired control
function(s).
Lab activities: an emphasis on constructing and documenting working projects (real instrumentation
and control systems) to illuminate theoretical knowledge with practical contexts. Special projects
off-campus or in different areas of campus (e.g. BTCs Fish Hatchery) are encouraged. Hands-on
troubleshooting exercises build diagnostic skills.
Feedback questions: sets of practice problems at the end of each course section challenge your
knowledge and problem-solving ability in current as as well as first year (Electronics) subjects. These
are optional assignments, counting neither for nor against your grade. Their purpose is to provide you
and your instructor with direct feedback on what you have learned.
STUDENT ASSIGNMENTS/REQUIREMENTS: All assignments for this course are thoroughly
documented in the following course worksheets located at:
http://www.ibiblio.org/kuphaldt/socratic/sinst/index.html
INST231 sec1.pdf
INST231 sec2.pdf
EVALUATION AND GRADING STANDARDS: (out of 100% for the course grade)
Mastery exam and mastery lab objectives = 50% of course grade
Proportional exam = 40%
Lab questions = 10%
Quiz penalty = -1% per failed quiz
Tardiness penalty = -1% per incident (1 free tardy per course)
Attendance penalty = -1% per hour (12 hours sick time per quarter)
Extra credit = +5% per project
All grades are criterion-referenced (i.e. no grading on a curve)
100% A 95%
90% > B+ 86%
80% > C+ 76%
70% > D+ 66%
A graded preparatory quiz at the start of each classroom session gauges your independent learning
prior to the session. A graded summary quiz at the conclusion of each classroom session gauges your
comprehension of important concepts covered during that session. If absent during part or all of a classroom
session, you may receive credit by passing comparable quizzes afterward or by having your preparatory work
(reading outlines, work done answering questions) thoroughly reviewed prior to the absence.
Absence on a scheduled exam day will result in a 0% score for the proportional exam unless you provide
documented evidence of an unavoidable emergency.
If you fail a mastery exam, you must re-take a different version of that mastery exam on a different
day. Multiple re-tries are allowed, on a different version of the exam each re-try. There is no penalty levied
on your course grade for re-taking mastery exams, but failure to successfully pass a mastery exam by the
due date (i.e. by the date of the next exam in the course sequence) will result in a failing grade (F) for the
course.
If any other mastery objectives are not completed by their specified deadlines, your overall grade
for the course will be capped at 70% (C- grade), and you will have one more school day to complete the
unfinished objectives. Failure to complete those mastery objectives by the end of that extra day (except in
the case of documented, unavoidable emergencies) will result in a failing grade (F) for the course.
Lab questions are assessed by individual questioning, at any date after the respective lab objective
(mastery) has been completed by your team. These questions serve to guide your completion of each lab
exercise and confirm participation of each individual student. Grading is as follows: full credit for thorough,
correct answers; half credit for partially correct answers; and zero credit for major conceptual errors. All
lab questions must be answered by the due date of the lab exercise.
Extra credit opportunities exist for each course, and may be assigned to students upon request. The
student and the instructor will first review the students performance on feedback questions, homework,
exams, and any other relevant indicators in order to identify areas of conceptual or practical weakness. Then,
both will work together to select an appropriate extra credit activity focusing on those identified weaknesses,
for the purpose of strengthening the students competence. A due date will be assigned (typically two weeks
following the request), which must be honored in order for any credit to be earned from the activity. Extra
credit may be denied at the instructors discretion if the student has not invested the necessary preparatory
effort to perform well (e.g. lack of preparation for daily class sessions, poor attendance, no feedback questions
submitted, etc.).
file INST231syllabus
7
INST 200 -- 1 wk
Intro. to Instrumentation
Summer quarter
Fall quarter
Winter quarter
Spring quarter
INST 230 -- 3 cr
INST 240 -- 6 cr
INST 250 -- 5 cr
INST 260 -- 4 cr
Motor Controls
Pressure/Level Measurement
INST 231 -- 3 cr
INST 241 -- 6 cr
INST 251 -- 5 cr
INST 262 -- 5 cr
PLC Programming
Temp./Flow Measurement
PID Control
INST 232 -- 3 cr
INST 242 -- 5 cr
INST 252 -- 4 cr
INST 263 -- 5 cr
Loop Tuning
Control Strategies
PLC Systems
Analytical Measurement
INST 233 -- 3 cr
CHEM&161 -- 5 cr
Chemistry
ENGT 122 -- 6 cr
CAD 1: Basics
All courses
completed?
Yes
INST 205 -- 1 cr
Job Prep I
No
INST 206 -- 1 cr
Job Prep II
Graduate!!!
The particular sequence of courses you take during the second year depends on when you complete all
first-year courses and enter the second year. Since students enter the second year of Instrumentation at four
different times (beginnings of Summer, Fall, Winter, and Spring quarters), the particular course sequence
for any student will likely be different from the course sequence of classmates.
Some second-year courses are only offered in particular quarters with those quarters not having to be
in sequence, while others are offered three out of the four quarters and must be taken in sequence. The
following layout shows four typical course sequences for second-year Instrumentation students, depending on
when they first enter the second year of the program:
Summer quarter
Beginning in Fall
Sept.
Intro. to Instrumentation
Intro. to Instrumentation
Intro. to Instrumentation
INST 231 -- 3 cr
INST 240 -- 6 cr
INST 250 -- 5 cr
INST 260 -- 4 cr
PLC Programming
Pressure/Level Measurement
Fall quarter
Dec.
Jan.
INST 251 -- 5 cr
INST 262 -- 5 cr
PID Control
INST 242 -- 5 cr
INST 252 -- 4 cr
INST 263 -- 5 cr
Loop Tuning
Control Strategies
Analytical Measurement
CHEM&161 -- 5 cr
Winter quarter
Intro. to Instrumentation
INST 240 -- 6 cr
INST 250 -- 5 cr
Pressure/Level Measurement
INST 241 -- 6 cr
Mar.
April
Chemistry
Spring quarter
ENGT 122 -- 6 cr
June
July
CAD 1: Basics
Summer quarter
INST 230 -- 3 cr
INST 205 -- 1 cr
Job Prep I
INST 251 -- 5 cr
INST 260 -- 4 cr
INST 231 -- 3 cr
Temp./Flow Measurement
PID Control
PLC Programming
INST 242 -- 5 cr
INST 252 -- 4 cr
INST 262 -- 5 cr
INST 232 -- 3 cr
Loop Tuning
CHEM&161 -- 5 cr
INST 263 -- 5 cr
Chemistry
Control Strategies
Analytical Measurement
Winter quarter
Mar.
April
ENGT 122 -- 6 cr
Spring quarter
June
CAD 1: Basics
Motor Controls
PLC Systems
INST 233 -- 3 cr
Aug.
Sept.
Fall quarter
INST 206 -- 1 cr
Job Prep II
INST 251 -- 5 cr
INST 260 -- 4 cr
INST 230 -- 3 cr
INST 240 -- 6 cr
PID Control
Motor Controls
Pressure/Level Measurement
INST 252 -- 4 cr
INST 262 -- 5 cr
INST 231 -- 3 cr
INST 241 -- 6 cr
Loop Tuning
PLC Programming
Temp./Flow Measurement
CHEM&161 -- 5 cr
INST 263 -- 5 cr
INST 232 -- 3 cr
Chemistry
Control Strategies
Spring quarter
INST 206 -- 1 cr
Job Prep II
July
Summer quarter
INST 230 -- 3 cr
Motor Controls
INST 262 -- 5 cr
DCS and Fieldbus
INST 263 -- 5 cr
INST 232 -- 3 cr
Sept.
Jan.
Analytical Measurement
Winter quarter
INST 206 -- 1 cr
Job Prep II
Fall quarter
INST 250 -- 5 cr
INST 231 -- 3 cr
INST 240 -- 6 cr
INST 251 -- 5 cr
PLC Programming
Pressure/Level Measurement
PID Control
INST 241 -- 6 cr
INST 252 -- 4 cr
Temp./Flow Measurement
Loop Tuning
INST 233 -- 3 cr
Aug.
INST 242 -- 5 cr
Dec.
INST 206 -- 1 cr
Job Prep II
PLC Systems
ENGT 122 -- 6 cr
Graduation!
INST 233 -- 3 cr
Aug.
INST 205 -- 1 cr
Job Prep I
Summer quarter
PLC Systems
CAD 1: Basics
INST 260 -- 4 cr
CAD 1: Basics
July
ENGT 122 -- 6 cr
June
Control Strategies
June
INST 241 -- 6 cr
Temp./Flow Measurement
INST 205 -- 1 cr
Job Prep I
INST 250 -- 5 cr
April
Spring quarter
Motor Controls
INST 205 -- 1 cr
Job Prep I
Mar.
April
INST 200 -- 1 wk
INST 200 -- 1 wk
Jan.
Winter quarter
INST 200 -- 1 wk
INST 233 -- 3 cr
Dec.
Jan.
INST 200 -- 1 wk
PLC Systems
Sept.
Fall quarter
Beginning in Spring
INST 230 -- 3 cr
INST 232 -- 3 cr
Aug.
Beginning in Winter
INST 242 -- 5 cr
Dec.
Graduation!
Analytical Measurement
Graduation!
file sequence
9
CHEM&161 -- 5 cr
Mar.
Chemistry
Graduation!
file expectations
11
file tools
12
Methods of instruction
This course develops self-instructional and diagnostic skills by placing students in situations where they
are required to research and think independently. In all portions of the curriculum, the goal is to avoid a
passive learning environment, favoring instead active engagement of the learner through reading, reflection,
problem-solving, and experimental activities. The curriculum may be roughly divided into two portions:
theory and practical.
Theory
In the theory portion of each course, students independently research subjects prior to entering the
classroom for discussion. This means working through all the days assigned questions as completely as
possible. This usually requires a fair amount of technical reading, and may also require setting up and
running simple experiments. At the start of the classroom session, the instructor will check each students
preparation with a quiz. Students then spend the rest of the classroom time working in groups and directly
with the instructor to thoroughly answer all questions assigned for that day, articulate problem-solving
strategies, and to approach the questions from multiple perspectives. To put it simply: fact-gathering
happens outside of class and is the individual responsibility of each student, so that class time may be
devoted to the more complex tasks of critical thinking and problem solving where the instructors attention
is best applied.
Classroom theory sessions usually begin with either a brief Q&A discussion or with a Virtual
Troubleshooting session where the instructor shows one of the days diagnostic question diagrams while
students propose diagnostic tests and the instructor tells those students what the test results would be
given some imagined (virtual) fault scenario, writing the test results on the board where all can see. The
students then attempt to identify the nature and location of the fault, based on the test results.
Each student is free to leave the classroom when they have completely worked through all problems and
have answered a summary quiz designed to gauge their learning during the theory session. If a student
finishes ahead of time, they are free to leave, or may help tutor classmates who need extra help.
The express goal of this inverted classroom teaching methodology is to help each student cultivate
critical-thinking and problem-solving skills, and to sharpen their abilities as independent learners. While
this approach may be very new to you, it is more realistic and beneficial to the type of work done in
instrumentation, where critical thinking, problem-solving, and independent learning are must-have skills.
13
Lab
In the lab portion of each course, students work in teams to install, configure, document, calibrate, and
troubleshoot working instrument loop systems. Each lab exercise focuses on a different type of instrument,
with a eight-day period typically allotted for completion. An ordinary lab session might look like this:
(1) Start of practical (lab) session: announcements and planning
(a) The instructor makes general announcements to all students
(b) The instructor works with team to plan that days goals, making sure each team member has a
clear idea of what they should accomplish
(2) Teams work on lab unit completion according to recommended schedule:
(First day) Select and bench-test instrument(s)
(One day) Connect instrument(s) into a complete loop
(One day) Each team member drafts their own loop documentation, inspection done as a team (with
instructor)
(One or two days) Each team member calibrates/configures the instrument(s)
(Remaining days, up to last) Each team member troubleshoots the instrument loop
(3) End of practical (lab) session: debriefing where each team reports on their work to the whole class
Troubleshooting assessments must meet the following guidelines:
Troubleshooting must be performed on a system the student did not build themselves. This forces
students to rely on another teams documentation rather than their own memory of how the system was
built.
Each student must individually demonstrate proper troubleshooting technique.
Simply finding the fault is not good enough. Each student must consistently demonstrate sound
reasoning while troubleshooting.
If a student fails to properly diagnose the system fault, they must attempt (as many times as necessary)
with different scenarios until they do, reviewing any mistakes with the instructor after each failed
attempt.
file instructional
14
file distance
15
Metric prefixes
Yotta = 1024 Symbol: Y
Zeta = 1021 Symbol: Z
Exa = 1018 Symbol: E
Peta = 1015 Symbol: P
Tera = 1012 Symbol: T
Giga = 109 Symbol: G
Mega = 106 Symbol: M
Kilo = 103 Symbol: k
Hecto = 102 Symbol: h
Deca = 101 Symbol: da
Deci = 101 Symbol: d
Centi = 102 Symbol: c
Milli = 103 Symbol: m
Micro = 106 Symbol:
Nano = 109 Symbol: n
Pico = 1012 Symbol: p
Femto = 1015 Symbol: f
Atto = 1018 Symbol: a
Zepto = 1021 Symbol: z
Yocto = 1024 Symbol: y
METRIC PREFIX SCALE
T
tera
1012
G
M
giga mega
109
106
k
kilo
103
(none)
100
milli micro
10-3 10-6
16
n
nano
10-9
p
pico
10-12
Conversion equivalencies for common pressure units (either all gauge or all absolute)
1 pound per square inch (PSI) = 2.03602 inches of mercury (in. Hg) = 27.6799 inches of water (in.
W.C.) = 6.894757 kilo-pascals (kPa) = 0.06894757 bar
1 bar = 100 kilo-pascals (kPa) = 14.504 pounds per square inch (PSI)
17
Physical constants
Speed of light in a vacuum (c) = 2.9979 108 meters per second (m/s) = 186,281 miles per second
(mi/s)
Avogadros number (NA ) = 6.022 1023 per mole (mol1 )
Electronic charge (e) = 1.602 1019 Coulomb (C)
Boltzmanns constant (k) = 1.38 1023 Joules per Kelvin (J/K)
Stefan-Boltzmann constant () = 5.67 108 Watts per square meter-Kelvin4 (W/m2 K4 )
Molar gas constant (R) = 8.314 Joules per mole-Kelvin (J/mol-K)
Properties of Water
Freezing point at sea level = 32o F = 0o C
Boiling point at sea level = 212o F = 100o C
Density of water at 4o C = 1000 kg/m3 = 1 g/cm3 = 1 kg/liter = 62.428 lb/ft3 = 1.94 slugs/ft3
Specific heat of water at 14o C = 1.00002 calories/go C = 1 BTU/lbo F = 4.1869 Joules/go C
Specific heat of ice 0.5 calories/go C
Specific heat of steam 0.48 calories/go C
Absolute viscosity of water at 20o C = 1.0019 centipoise (cp) = 0.0010019 Pascal-seconds (Pas)
Surface tension of water (in contact with air) at 18o C = 73.05 dynes/cm
pH of pure water at 25o C = 7.0 (pH scale = 0 to 14)
Properties of Dry Air at sea level
Density of dry air at 20o C and 760 torr = 1.204 mg/cm3 = 1.204 kg/m3 = 0.075 lb/ft3 = 0.00235
slugs/ft3
Absolute viscosity of dry air at 20o C and 760 torr = 0.018 centipoise (cp) = 1.8 105 Pascalseconds (Pas)
Question 0
How to get the most out of academic reading:
Articulate your thoughts as you read (i.e. have a conversation with the author). This will develop
metacognition: active supervision of your own thoughts. Write your thoughts as you read, noting
points of agreement, disagreement, confusion, epiphanies, and connections between different concepts
or applications. These notes should also document important math formulae, explaining in your own
words what each formula means and the proper units of measurement used.
Outline, dont highlight! Writing your own summary or outline is a far more effective way to comprehend
a text than simply underlining and highlighting key words. A suggested ratio is writing one sentence of
your own thoughts per paragraph of text read. Note points of disagreement or confusion, so that you
may explore these later.
Work through all mathematical exercises shown within the text, to ensure you understand all the steps.
Imagine explaining concepts youve just learned to someone else. Teaching forces you to distill concepts
to their essence, thereby clarifying those concepts, revealing assumptions, and exposing misconceptions.
Your goal is to create the simplest explanation that is still technically accurate.
Write your own questions based on what you read, as though you are a teacher preparing to test
students comprehension of the subject matter.
How to effectively problem-solve and troubleshoot:
Study principles, not procedures. Dont be satisfied with merely knowing the steps necessary to compute
solutions challenge yourself to learn why those solutions work. If you cant explain why, you really
havent learned the most important part.
Sketch a diagram to help visualize the problem. When building a real system, always prototype it on
paper and analyze its function before constructing it.
Identify what it is you need to solve, identify all relevant data, identify all units of measurement, identify
any general principles or formulae linking the given information to the solution, and then identify any
missing pieces to a solution. Annotate all diagrams with this data.
Perform thought experiments to explore the effects of different conditions for theoretical problems.
When troubleshooting real systems, perform diagnostic tests rather than visually inspecting for faults.
Simplify the problem and solve that simplified problem to identify strategies applicable to the original
problem (e.g. change quantitative to qualitative, or visa-versa; substitute easier numerical values;
eliminate confusing details; add details to eliminate unknowns; consider simple limiting cases; apply an
analogy). Often you can add or remove components in a malfunctioning system to simplify it as well
and better identify the nature and location of the problem.
Work backward from a hypothetical solution to a new set of given conditions.
How to create more time for study:
Kill your television and video games. Seriously these are incredible wastes of time.
distractions (e.g. cell phone, internet, socializing) in your place and time of study.
Eliminate
Use your in between time productively. Dont leave campus for lunch. Arrive to school early. If you
finish your assigned work early, begin studying the next days material.
Above all, cultivate persistence. Persistent effort is necessary to master anything non-trivial. The keys
to persistence are (1) having the desire to achieve that mastery, and (2) realizing challenges are normal and
not an indication of something gone wrong. A common error is to equate easy with effective: students often
believe learning should be easy if everything is done right. The truth is that mastery never comes easy!
file question0
19
Note: the text on this page is not a license. It is simply a handy reference for understanding the Legal
Code (the full license) - it is a human-readable expression of some of its key terms. Think of it as the
user-friendly interface to the Legal Code beneath. This simple explanation itself has no legal value, and its
contents do not appear in the actual license.
file license
20
Questions
Question 1
Read and outline the introduction and PLC Examples section of the Programmable Logic
Controllers chapter in your Lessons In Industrial Instrumentation textbook. Note the page numbers where
important illustrations, photographs, equations, tables, and other relevant details are found. Prepare to
thoughtfully discuss with your instructor and classmates the concepts and examples explored in this reading.
file i00460
Question 2
Read selected portions of the Siemens SIMATIC S7-200 Programmable Controller System Manual
(document A5E00307987-04, August 2008) and answer the following questions:
Locate the section discussing the PLCs scan cycle and describe the sequence of operations conducted
by the PLC on an ongoing basis.
Locate the section discussing the PLCs memory types (Permanent Memory versus Retentive Data
Memory and such), and describe the functions of each.
A very important aspect to learn about any PLC is how to specify various locations within its memory.
Each manufacturer and model of PLC has its own way of addressing memory locations, analogous to the
different ways each postal system within each country of the world specifies its mailing addresses. Locate
the section of the manual discussing addressing conventions (Accessing the Data of the S7-200), and then
answer these questions:
Identify the proper address notation for a particular bit in the Siemens PLCs memory: bit number 4
of byte 1 within the process-image input register.
Identify the proper address notation for a particular bit in the Siemens PLCs memory: bit number 2
of byte 0 within the process-image output register.
Identify the proper address notation for a double word of data in the Siemens PLCs memory beginning
at byte 105 within the variable memory area. How many bits are contained in a double word?
file i03605
21
Question 3
Read selected portions of the Allen-Bradley MicroLogix 1000 Programmable Controllers (Bulletin 1761
Controllers) user manual (document 1761-6.3, July 1998) and answer the following questions:
Locate the section discussing the PLCs operating cycle otherwise known as a scan cycle and
describe the sequence of operations conducted by the PLC on an ongoing basis.
Locate the section discussing the PLCs memory types (EEPROM and RAM), and describe the functions
of each.
A very important aspect to learn about any PLC is how to specify various locations within its memory.
Each manufacturer and model of PLC has its own way of addressing memory locations, analogous to the
different ways each postal system within each country of the world specifies its mailing addresses. Locate the
section of the manual discussing addressing conventions (Addressing Data Files), and then answer these
questions:
Identify the proper address notation for a particular bit in the Allen-Bradley PLCs memory: bit number
4 of element 1 within the input file.
Identify the proper address notation for a particular bit in the Allen-Bradley PLCs memory: bit number
2 of element 0 within the output file.
Identify the proper address notation for a word of data in the Allen-Bradley PLCs memory: the
accumulator word (ACC) of timer number 6 within data file T4.
file i03604
22
Question 4
In order to learn PLC programming and perform the exercises necessary for exams in this course, you
must have your own PLC trainer consisting of a working PLC and input switches all wired and ready to use.
PLC
Power
I/O
Input switches
Indicator lamps
All components should be securely mounted to a wood board or some other structure making it easy
to transport and use. You must have a terminal block in between the switches, indicators, and PLC I/O
terminals to allow for easy connection and disconnection of external devices to your PLC without wearing out
the screws on the PLCs terminal block prematurely. Separate terminal blocks are easily replaced, whereas
the terminal block on your PLC is likely much more expensive and inconvenient to replace!
Consult the users manual for your PLC in order to determine how all devices should be wired to the
input and output (I/O) terminals. Note that often there are different types of I/O (AC, DC, sourcing,
sinking) available for the same (or similar) model of PLC. Most PLC users manuals give detailed diagrams
showing how to connect devices to discrete I/O points, so be sure to follow the proper diagram for your
specific PLC model!
Once you have your PLC wired, the next step is to install and run the software used to program your
programmable logic controller (PLC), and try to get the two devices communicating with each other. This,
of course, requires you have a special cable connecting your PC to your PLC, with any necessary drivers
installed on your PC to allow it to communicate. Like all serial-based communications, the PC needs to be
properly configured with regard to bit rate, number of data bits, number of stop bits, and parity in order to
communicate with the PLC. The software you will be using should have an auto detect feature which will
sequentially try various combinations of these parameters until it finds one combination that works. Note: on
Allen-Bradley PLCs, you must first install and run software called RSLinx which manages communications
between your PC and PLC, before you start up the programming software (RSLogix).
After that, your next step is to use programming software (installed in a personal computer) to program
your PLC with some simple function consisting of contact and coil instructions. The purpose of a virtual
contact in a PLC program is to read data bits from memory, while the purpose of a virtual coil in a PLC
program is to write data bits to memory. Thus, you will create programs for the PLC using virtual contacts
to read the states of real-world switches connected to inputs on the PLC, and using virtual coils to control
real-world outputs on the PLC to energize loads such as lamps and solenoids. The interconnections and
arrangements of these virtual contacts and coils determine the logic implemented by the PLC: specifying the
conditions necessary to energize real-world devices based on input conditions.
You will find step-by-step instructional tutorials for both Allen-Bradley MicroLogix and Koyo CLICK
PLCs in your Instrumentation Reference (provided by the instructor). Follow these tutorials to establish
communication between your PC and your PLC, and to write a simple contact-and-coil ladder diagram
program, before attempting the exercises that follow. You will also find much pertinent information for
programming Allen-Bradley MicroLogix PLCs in the RSLogix 500 Getting Results Guide, since the SLC 500
23
Toggle switch
24V
DC
COM
I/0
I/1
I/2
I/3
DC
COM
I/4
I/5
DC OUT
Allen-Bradley
Power
Run
MicroLogix
Fault
1000
Force
85-264 VAC
L1
VAC
VDC
L2/N
O/0
VAC
VDC
O/1
VAC
VDC
O/2
VAC
VDC
O/3
I:0
O:0
0
END
Note how Allen-Bradley I/O is labeled in the program: input bits designated by the letter I and output
bits designated by the letter O.
Based on the wiring and program you see for this PLC, identify the switch state combinations resulting
in an energized lamp. Try duplicating this program in your own PLC (even if it is a different brand or model)
and see how it functions. Be sure to activate the color highlighting feature of your programming editor so
you may see the live status of the programs virtual contacts and coil!
24
This example shows a Siemens S7-200 series PLC (model 224XP) wired to two toggle switches and one
LED indicator lamp, complete with a demonstration program:
24 VDC
Toggle switch
1M
SIMATIC
S7-200
1L+
0.0
0.1
0.2
Q0
SF/DIAG
0.3
0.4
2M
2L+
0.5
0.6
0.7
1.0
1.1
DC
CPU 224XP
Q1
.0 .1 .2 .3 .4 .5 .6 .7
L+
DC/DC/DC
.0 .1
RUN
STOP
.0 .1 .2 .3 .4 .5 .6 .7
I0
1M
Port 1
.0 .1 .2 .3 .4 .5
I1
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
2M
1.0
1.1
1.2
1.3
1.4
1.5
L+
Port 0
Q0.0
I0.1
END
Note how Siemens I/O is labeled in the program: input bits designated by the letter I and output bits
designated by the letter Q.
Based on the wiring and program you see for this PLC, identify the switch state combinations resulting
in an energized lamp. Try duplicating this program in your own PLC (even if it is a different brand or model)
and see how it functions. Be sure to activate the color highlighting feature of your programming editor so
you may see the live status of the programs virtual contacts and coil!
25
This example shows a Koyo CLICK PLC (model C0-02DD1-D) wired to two toggle switches and one
LED indicator lamp, complete with a demonstration program:
C0-02DD1-D
CLICK
Koyo
C1
X1
X2
X3
X4
PWR
RUN
ERR
RUN
C2
STOP
Y1
Y2
Y3
PORT 1
TX1
Y4
RX1
+V
AD1V
TX2
AD1I
RX2
AD2V
PORT 2
AD2I
Toggle switch
ACOM
PORT 3 RS-485
DA1V
DA1I
TX3
RX3
DA2V
LG
DA2I
24V
24 VDC
X2
X2
X1
Y1
END
Note how Koyo I/O is labeled in the program: input bits designated by the letter X and output bits
designated by the letter Y.
Based on the wiring and program you see for this PLC, identify the switch state combinations resulting
in an energized lamp. Try duplicating this program in your own PLC (even if it is a different brand or model)
and see how it functions. Be sure to activate the color highlighting feature of your programming editor so
you may see the live status of the programs virtual contacts and coil!
file i04513
26
Question 5
The most basic type of real-world input to a PLC is a discrete (on/off) input. Each discrete input
channel on a PLC is associated with a single bit in the PLCs memory. Use the PLC programming software
on your personal computer to connect to your PLC, then locate the facility within this software that allows
you to monitor the status of your PLCs discrete input bits.
Actuate the switches connected to your PLCs discrete input channels while watching the status of the
respective bits. Based on what you see, what does a 1 bit status signify, and what does a 0 bit status
signify?
Suggestions for Socratic discussion
How does your PLC address discrete input bits? In other words, what is the convention it uses to label
these bits, and distinguish them from each other?
How does the programming software for your PLC provide access to discrete input bit status?
PLC comparison:
Allen-Bradley Logix 5000: the Controller Tags folder (typically on the left-hand pane of the
programming window set) lists all the tag names defined for the PLC project, allowing you to view
the real-time status of them all. Discrete inputs do not have specific input channel tag names, as tag
names are user-defined in the Logix5000 PLC series.
Allen-Bradley PLC-5, SLC 500, and MicroLogix: the Data Files listing (typically on the left-hand pane
of the programming window set) lists all the data files within that PLCs memory. Opening a data
file window allows you to view the real-time status of these data points. Discrete inputs are the I file
addresses (e.g. I:0/2, I:3/5, etc.). The letter I represents input, the first number represents the
slot in which the input card is plugged, and the last number represents the bit within that data element
(a 16-bit word) corresponding to the input card.
Siemens S7-200: the Status Chart window allows the user to custom-configure a table showing the realtime values of multiple addresses within the PLCs memory. Discrete inputs are the I memory addresses
(e.g. I0.1, I1.5, etc.).
Koyo (Automation Direct) DirectLogic and CLICK: the Data View window allows the user to customconfigure a table showing the real-time values of multiple addresses within the PLCs memory. Discrete
inputs are the X memory addresses (e.g. X1, X2, etc.).
file i01876
27
Question 6
The most basic type of real-world output from a PLC is a discrete (on/off) output. Each discrete output
channel on a PLC is associated with a single bit in the PLCs memory. Use the PLC programming software
on your personal computer to connect to your PLC, then locate the facility within this software that allows
you to monitor the status of your PLCs discrete output bits.
Use the force utility in the programming software to force different output bits to a 1 status. Based
on what you see, what does a 1 bit status signify, and what does a 0 bit status signify?
Is there any visual indication that bits have been forced from their normal state(s) in your PLC? Note
that forcing causes the PLC to output the values you specify, whether or not the programming in the PLC
wants those bits to have those forced values!
Suggestions for Socratic discussion
How does your PLC address discrete output bits? In other words, what is the convention it uses to
label these bits, and distinguish them from each other?
How does the programming software for your PLC provide access to discrete output bit status, and the
ability to force them?
Why would anyone ever wish to force an output bit in a PLC, especially if doing so overrides the logic
programmed into the PLC?
PLC comparison:
Allen-Bradley Logix 5000: forces may be applied to specific tag names by right-clicking on the tag (in
the program listing) and selecting the Monitor option. Discrete outputs do not have specific output
channel tag names, as tag names are user-defined in the Logix5000 PLC series.
Allen-Bradley PLC-5, SLC 500, and MicroLogix: the Force Files listing (typically on the left-hand pane
of the programming window set) lists those data files within the PLCs memory liable to forcing by the
user. Opening a force file window allows you to view and set the real-time status of these bits. Discrete
outputs are the O file addresses (e.g. O:0/7, O:6/2, etc.). The letter O represents output, the first
number represents the slot in which the output card is plugged, and the last number represents the bit
within that data element (a 16-bit word) corresponding to the output card.
Siemens S7-200: the Status Chart window allows the user to custom-configure a table showing the realtime values of multiple addresses within the PLCs memory, and enabling the user to force the values
of those addresses. Discrete outputs are the Q memory addresses (e.g. Q0.4, Q1.2, etc.).
Koyo (Automation Direct) DirectLogic and CLICK: the Override View window allows the user to force
variables within the PLCs memory. Discrete outputs are the Y memory addresses (e.g. Y1, Y2, etc.).
file i01877
28
Question 7
All PLCs provide special locations in memory holding values useful to the programmer, such as status
warnings, real-time clock settings, calendar dates, etc. Use the PLC programming software on your personal
computer to connect to your PLC, then locate the facility within this software that allows you to explore
some of these locations in memory.
Identify some of the specific status-related and special memory locations in your PLC, and comment
on those you think might be useful to use in the future. Note the following memory types you may find
associated with these addresses:
Boolean (discrete) = simply on or off (1 or 0)
Integer = whole-numbered values
Floating-point (real) = fractional values
PLC comparison:
Allen-Bradley Logix 5000: various system values are accessed via GSV (Get System Value) and SSV
(Save System Value) instructions.
Allen-Bradley PLC-5, SLC 500, and MicroLogix: the Data Files listing (typically on the left-hand pane
of the programming window set) shows file number 2 as the Status file, in which you will find various
system-related bits and registers.
Siemens S7-200: the Special Memory registers contain various system-related bits and registers. These
are the SM memory addresses (e.g. SM0.1, SMB8, SMW22, etc.).
Koyo (Automation Direct) DirectLogic and CLICK: the Special registers contain various system-related
bits and registers. These are the SP memory addresses (e.g. SP1, SP2, SP3, etc.) in the DirectLogic
PLC series, and the SC and SD memory addresses in the CLICK PLC series.
file i01878
29
Question 8
Read and outline the Relating I/O Status to Virtual Elements subsection of the Logic Programming
section of the Programmable Logic Controllers chapter in your Lessons In Industrial Instrumentation
textbook. Note the page numbers where important illustrations, photographs, equations, tables, and other
relevant details are found. Prepare to thoughtfully discuss with your instructor and classmates the concepts
and examples explored in this reading.
The fundamental concept of relating I/O status to program elements is not necessarily easy to
grasp. For this reason, a Process Switches and PLC Circuits worksheet has been placed in the Socratic
Instrumentation practice worksheet collection. Feel free to use this practice worksheet to supplement your
studies on this critically important topic!
file i04516
30
Question 9
Discrete (on/off) I/O for PLCs often works on AC (alternating current) power. AC input circuitry
usually consists of an optocoupler (LED) with rectification and a large dropping resistor to allow 120 volt
AC operation. AC output circuitry usually consists of TRIACs. Explain how both of these technologies
work.
DC I/O for a PLC generally consists of optocoupled LEDs for inputs and bipolar transistors for outputs.
Some examples are shown in the following schematics. Note carefully the different variations:
X0
Com
X0
X1
X1
X2
X2
X3
Com
X3
Com
Y0
Y0
Y1
Y1
Y2
Y2
Y3
Com
Y3
Determine for each of these input and output module types, whether they would be properly designated
sourcing or sinking.
Suggestions for Socratic discussion
Determine how real input and output devices (e.g. switches, solenoid coils) would need to be connected
to the I/O terminals of these modules.
file i02359
31
Question 10
Have some fun writing simple exploratory or demonstration ladder-diagram PLC programs to
perform different functions. Feel free to explore the following instruction types:
Identify some realistic applications for PLC programs using counters and timers. What sorts of real-life
processes might benefit from a PLC function where something turns on or off after a definite number of
counts applied to the PLC input, or after a certain amount of time has passed?
Note: this simple exercise may seem trivial, but it holds the key to self-instruction on
PLC programming! Having your very own PLC to work with in the classroom is a tremendously powerful
learning tool. Whenever you encounter a new programming instruction (e.g. a timer, a math instruction,
etc.) that you do not yet know how to use, you may explore that instructions properties and behavior
by creating a simple program in your PLC with nothing but that instruction. Your PLCs User Manual
or Instruction Set reference manual will show you the basic syntax of the instruction, which you may copy
verbatim as an example. Once this simple program is loaded into your PLCs memory, you can play with
it to see its live behavior while viewing the program online.
Once you have directly observed how the instruction works, your next step is to add comments to the
program describing how that instruction works in your own words. Be as detailed as possible here, treating
this activity as though you were asked to explain everything to someone who knew absolutely nothing about
the instruction. These comments will serve as notes to yourself later, when you need to refresh your memory
on how a particular instruction functions or what it is used for.
Do not be surprised if your instructor asks you to show your demonstration program(s) for particular
instructions in the future! If you experience difficulty using a particular instruction in a programming
assignment, your instructor may check to see if you have created and run a demonstration program to
learn how that instruction is supposed to function.
Refer to the Answer section of this question to see some examples of what such a demonstration
program might look like.
Suggestions for Socratic discussion
A helpful tip when writing your own demonstration programs is to save each one with a filename that
makes it easy to locate on your personal computer. For example, you might wish to name each of your
demonstration programs beginning with the word Demo and using underscore characters to separate
descriptive words (or instruction names) in the rest of the filename. Some examples are shown here:
Demo contacts coils
Demo upcounter
Demo downcounter
Demo TOF timer
Demo TON timer
Demo ADD instruction
file i00120
32
Question 11
Write a PLC program that accepts two discrete input signals (from two switches), and outputs the
following four discrete outputs:
Output channel #1: The status of input switch #1 (simply repeating input #1)
Output channel #2: The Boolean complement (opposite) of input switch #1
Output channel #3: The AND function of switches #1 and #2
Output channel #4: The OR function of switches #1 and #2
Shown here is a generic RLL listing of such a program:
Input_switch_1
Output_1
Input_switch_1
Output_2
Input_switch_1
Input_switch_2
Input_switch_1
Output_3
Output_4
Input_switch_2
Turn on status highlighting within the programming software environment so that you may see the
virtual power flow through the conductive contacts as you test the program.
33
Question 12
Suppose we have an Allen-Bradley MicroLogix 1000 PLC connected to three momentary-contact
pushbutton switches as shown in this illustration:
24V
DC
COM
I/0
I/1
I/2
I/3
DC
COM
I/4
I/5
DC OUT
Power
Run
Fault
Force
C
85-264 VAC
L1
L2/N
VAC
VDC
O/0
VAC
VDC
O/1
VAC
VDC
O/2
VAC
VDC
O/3
Determine the bit statuses of I:0/0, I:0/1, and I:0/2 when switch A is unpressed (released), switch
B is unpressed (released), and switch C is pressed.
file i01865
34
Question 13
Suppose we have a Siemens S7-200 PLC connected to two process switches as shown in this illustration:
24 VDC
SIEMENS
1M
SIMATIC
S7-200
1L+
0.0
0.1
0.2
Q0
SF/DIAG
0.3
0.4
2M
2L+
0.5
0.6
0.7
1.0
1.1
DC
CPU 224XP
Q1
.0 .1 .2 .3 .4 .5 .6 .7
L+
DC/DC/DC
.0 .1
RUN
STOP
.0 .1 .2 .3 .4 .5 .6 .7
I0
1M
Port 1
.0 .1 .2 .3 .4 .5
I1
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
2M
1.0
1.1
1.2
1.3
1.4
1.5
L+
Port 0
130 oF
12 GPM
Determine the bit statuses of I0.2 and I1.1 when the temperature switch senses 194 o F and the flow
switches senses 19 GPM.
file i01871
35
Question 14
Suppose we have an Allen-Bradley SLC 500 PLC connected to two process switches as shown in this
illustration:
Slot 0
(processor)
Power
supply
120 VAC
power
Processor
Slot 1
Input
0
1
2
3
L1
L2/N
Gnd
Slot 2
Slot 3
Input
4
5
6
7
0
1
2
3
Output
4
5
6
7
0
1
2
3
IN0
IN0
VAC 1
IN1
IN1
OUT0
IN2
IN2
OUT1
IN3
IN3
OUT2
IN4
IN4
OUT3
IN5
IN5
VAC 2
IN6
IN6
OUT4
IN7
IN7
OUT5
COM
COM
OUT6
COM
COM
OUT7
4
5
6
7
3 feet
37 PSI
88 oF
Determine the process conditions necessary to generate the following input bit statuses in the PLCs
memory:
I:1/3 = 1
I:1/5 = 0
file i01872
36
Question 15
Examine this live display of a Siemens S7-300 PLCs program, and from this determine all bit statuses
represented by the color highlighting in this ladder logic program:
I1.1
I0.5
Q0.1
I0.2
I1.1
Q0.6
I0.2 = ???
I0.5 = ???
I1.1 = ???
Q0.1 = ???
Q0.6 = ???
file i01873
37
Question 16
Suppose we have a Koyo CLICK PLC connected to three momentary-contact pushbutton switches as
shown in this illustration:
C0-02DD1-D
CLICK
Koyo
C1
X1
X2
X3
X4
PWR
RUN
ERR
RUN
C2
STOP
Y1
Y2
Y3
PORT 1
TX1
Y4
RX1
+V
AD1V
TX2
AD1I
RX2
AD2V
PORT 2
AD2I
ACOM
PORT 3 RS-485
DA1V
DA1I
TX3
RX3
DA2V
LG
DA2I
24V
24 VDC
Determine the switch actuation statuses (i.e. pressed versus released) given the live display of the
ladder logic program shown here:
X1
X2
X3
Y1
Also, determine the status of the lamp connected to the PLCs Y1 output.
file i01874
38
Question 17
Explain the function of this light-switching circuit, tracing the directions of all currents when the switch
closes:
file i01000
Question 18
A student attempts to build a circuit that will turn a DC motor on and off with a very delicate (low
current rating) pushbutton switch. Unfortunately, there is something wrong with the circuit, because the
motor does not turn on no matter what is done with the switch:
Mtr
Correct the error(s) in this circuit, showing how it must be set up so that the transistor functions as
intended.
file i01001
39
Question 19
Some of the following transistor switch circuits are properly configured, and some are not. Identify
which of these circuits will function properly (i.e. turn on the load when the switch closes) and which of
these circuits are mis-wired:
Circuit 1
Circuit 2
Load
Load
Circuit 3
Circuit 4
Load
Load
file i01002
40
Question 20
Some of the following transistor switch circuits are properly configured, and some are not. Identify
which of these circuits will function properly (i.e. turn on the load when the switch closes) and which of
these circuits are mis-wired:
Circuit 1
Circuit 2
Load
Load
Circuit 3
Circuit 4
Load
Load
file i01003
41
Question 21
Read and outline the Contacts and Coils subsection of the Ladder Diagram (LD) Programming
section of the Programmable Logic Controllers chapter in your Lessons In Industrial Instrumentation
textbook. Note the page numbers where important illustrations, photographs, equations, tables, and other
relevant details are found. Prepare to thoughtfully discuss with your instructor and classmates the concepts
and examples explored in this reading.
Suggestions for Socratic discussion
If you have access to your own PLC for experimentation, I urge you to write a simple demonstration
program in your PLC allowing you to explore the behavior of these PLC instructions. The program
doesnt have to do anything useful, but merely demonstrate what each instruction does. First, read
the appropriate section in your PLCs manual or instruction reference to identify the proper syntax for
that instruction (e.g. which types of data it uses, what address ranges are appropriate), then write the
simplest program you can think of to demonstrate that function in isolation. Download this program
to your PLC, then run it and observe how it functions live by noting the color highlighting in your
editing programs display and/or the numerical values manipulated by each instruction. After playing
with your demonstration program and observing its behavior, write comments for each rung of your
program explaining in your own words what each instruction does.
file i04517
42
Question 22
Suppose a Siemens 545 PLC has the following input bit states:
X1 = 0
X2 = 1
X3 = 0
Sketch color highlighting for the contacts and coils in the PLCs program given these bit statuses, also
determining the status of output bit Y1:
X1
X2
X2
X1
X3
Y1
43
Question 23
Examine this live display of a Siemens S7-300 PLCs program, and from this determine all bit statuses
represented by the color highlighting in this ladder logic program:
I1.1
I0.7
Q0.1
I0.7
I1.1
Q0.3
I0.7 = ???
I1.1 = ???
Q0.1 = ???
Q0.3 = ???
44
Question 24
Suppose we have an Allen-Bradley model SLC 500 PLC connected to a pair of momentary-contact
pushbutton switches and light bulbs as shown in this illustration:
Power
supply
Slot 0
Slot 1
Slot 2
Slot 3
(processor)
(discrete input)
(unused)
(discrete output)
Processor
Input
0
1
2
3
L1
120 VAC
power
L2/N
Gnd
Output
0
1
2
3
4
5
6
7
IN0
VAC 1
IN1
OUT0
IN2
OUT1
IN3
OUT2
IN4
OUT3
IN5
VAC 2
IN6
OUT4
IN7
OUT5
COM
OUT6
COM
OUT7
4
5
6
7
Switch A
Lamp Y
Switch B
Lamp Z
Examine the following relay ladder logic (RLL) program for this Allen-Bradley PLC, determining the
statuses of the two lamps provided neither switch A nor switch B is pressed by a human operator:
I:1
I:1
O:3
I:1
I:1
O:3
Finally, draw color highlighting showing how these contact instructions will appear in an online editor
program given the stated input conditions.
Suggestions for Socratic discussion
Identify the significance of the labels I and O for this PLCs bits.
Identify the significance of the first and second numbers in each bit label (e.g. the numbers 1 and 2
in the bit address I:1/2, for example). What pattern do you see as you compare the I/O connections
with the respective contact instructions in the PLC program?
file i04628
45
Question 25
Suppose we have a Siemens S7-200 PLC connected to a pair of momentary-contact pushbutton switches
and light bulbs as shown in this illustration:
24 VDC
SIEMENS
1M
SIMATIC
S7-200
1L+
0.0
0.1
0.2
0.3
2M
2L+
0.5
0.6
0.7
1.0
1.1
.0 .1 .2 .3 .4 .5 .6 .7
L+
DC
CPU 224XP
Q1
Q0
SF/DIAG
0.4
DC/DC/DC
.0 .1
RUN
STOP
.0 .1 .2 .3 .4 .5 .6 .7
1M
Port 1
.0 .1 .2 .3 .4 .5
I1
I0
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
2M
1.0
1.1
1.2
1.3
1.4
1.5
L+
Port 0
Lamp Y
Switch A
Lamp Z
Switch B
Examine the following relay ladder logic (RLL) program for this Siemens PLC, determining the statuses
of the two lamps provided both switches are simultaneously pressed by a human operator:
I1.2
I0.7
Q0.1
I0.7
I1.2
Q0.3
Finally, draw color highlighting showing how these contact instructions will appear in an online editor
program given the stated input conditions.
file i04664
46
Question 26
Suppose we have a Koyo CLICK PLC connected to three momentary-contact pushbutton switches as
shown in this illustration:
C0-02DD1-D
CLICK
Koyo
C1
X1
X2
X3
X4
PWR
RUN
ERR
RUN
C2
STOP
Y1
Y2
Y3
PORT 1
TX1
Y4
RX1
+V
AD1V
TX2
AD1I
RX2
AD2V
PORT 2
AD2I
ACOM
PORT 3 RS-485
DA1V
DA1I
TX3
RX3
DA2V
LG
DA2I
24V
24 VDC
Determine the necessary switch actuation statuses (i.e. pressed versus unpressed) to turn the lamp on
given the following program running in the PLC:
X1
X3
Y1
X2
47
Question 27
Suppose we have an Allen-Bradley MicroLogix 1000 controller connected to a pair of momentary-contact
pushbutton switches and contactor controlling power to an electric motor as shown in this illustration:
"Start" switch
24V
DC
COM
I/0
I/1
I/2
I/3
DC
COM
I/4
I/5
DC OUT
"Stop" switch
Power
Run
Fault
Force
OL contact
85-264 VAC
L1
L2/N
VAC
VDC
O/0
VAC
VDC
O/1
VAC
VDC
O/2
VAC
VDC
O/3
Contactor coil
This motor control system has a problem, though: the motor refuses to start when the Start
pushbutton is pressed. Examine the live display of the ladder logic program inside this Allen-Bradley PLC
to determine what the problem is, assuming an operator is continuously pressing the Start pushbutton as
you examine the program:
I:0/3
I:0/2
I:0/0
O:0/2
O:0/2
Identify at least two causes that could account for all you see here.
Suggestions for Socratic discussion
Identify what your next troubleshooting step would be if you were tasked with solving this problem.
A helpful problem-solving tip is to annotate each contact in the PLC program to show what its realworld function is. For example, contact I:0/3 may be labeled OL because that is the real-world
switch status it senses. Annotate all contacts in this program and explain how this annotation is helpful
in analyzing the program.
Describe the purpose of the contact labeled O:0/2 in this program, explaining why it is often referred
to as a seal-in contact.
48
file i04662
49
Question 28
Two technicians, Jill and Bob, work on programming Siemens S7-200 PLCs to control the starting and
stopping of electric motors. Both PLCs are wired identically, as shown:
120 VAC
supply
480 VAC 3-
supply
SIEMENS
1M
1L
SIMATIC
S7-200
1L+
0.0
0.1
0.0
0.2
0.1
0.3
0.2
Q0
SF/DIAG
0.3
0.4
2L
0.4
2M
0.5
2L+
0.5
0.6
0.6
0.7
3L
1.0
0.7
1.1
1.0
1.1
N
M
Q1
.0 .1 .2 .3 .4 .5 .6 .7
L+
L1 AC
DC
CPU 224XP
DC/DC/DC
AC/DC/Relay
.0 .1
RUN
STOP
.0 .1 .2 .3 .4 .5 .6 .7
I0
1M
Port 1
.0 .1 .2 .3 .4 .5
I1
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
2M
1.0
1.1
1.2
1.3
1.4
1.5
L+
Port 0
Start
Stop
However, despite being wired identically, the two technicians PLC programs are quite different. Jills
program uses retentive coil instructions (Set and Reset coils) while Bobs uses a seal-in contact
instruction to perform the function of latching the motor on and off:
Jills PLC program
I0.1
Q0.0
I0.1
I0.4
Q0.0
S
I0.4
Q0.0
Q0.0
Explain how both of these PLC programs function properly to control the starting and stopping of the
electric motor.
Suggestions for Socratic discussion
It is ordinarily a bad thing to assign identical bit addresses to multiple coil instructions in a PLC
program. With Jills retentive coil program, however, this is not only permissible but in fact necessary
for its proper operation. Explain why this is.
A common misconception of students first learning PLC programming is to think that the type of
contact instruction used in the PLC program must match the type of switch contact connected to that
input (e.g. A N.O. PLC instruction must go with a N.O. switch). Explain why this is incorrect.
Explain how both PLC programs will react if both the start and stop pushbuttons are
simultaneously pressed.
50
Alter both PLC programs to be fail-safe (i.e. shut the motor off) if ever the stop pushbutton switch
fails circuit open.
file i03674
Question 29
Demonstration Program contact and coil instructions
An important technique for learning any programming language Ladder Diagram PLC programming
included is to write simple demonstration programs showcasing and explaining how particular
instructions and programming constructs are supposed to work. Since you have access to your own personal
PLC, you can explore the elements of your PLCs programming language like a scientist would explore new
specimens: subject them to tests and record how they respond. This is how you will be able to teach
yourself new models of PLC when you are working in your career, when you wont have textbooks to follow
or training to show you exactly what to do.
Write such a demonstration program for your PLCs contact and coil instructions, where discrete
inputs on your PLC control discrete outputs on your PLC. An acceptable demonstration program must
meet these three criteria:
Simple nothing extra included in the program to detract from the fundamental behavior of the
instruction(s) being explored
Complete nothing missing from the program relevant to the fundamental behavior of the
instruction(s) being explored
Clearly documented every rung clearly commented in your own words, every variable named
51
Question 30
Programming Challenge and Comparison Conveyor start/stop control with safety switch
Suppose we wish to control the starting and stopping of a large conveyor belt at a factory using a
PLC. This control system will use a Start pushbutton, a Stop pushbutton, and an emergency shut-down
pull-cable allowing anyone along the conveyors length to stop the belt simply by tugging on a steel cable
(this is akin to the stop cable used on public buses for passengers to signal to the driver their intent to
get off at the next stop).
Inputs
Start pushbutton (momentary NO) pushing this button closes the switch to energize the PLC input
Stop pushbutton (momentary NC) pushing this button opens the switch to de-energize the PLC input
Emergency stop cable (latching NC) tugging on the cable opens the switch to de-energize the PLC
input
Outputs
Motor contactor energizing this PLC output starts the conveyor belt motor
Work individually or in teams to write a PLC program performing this function, and demonstrate its
operation using switches connected to its inputs to simulate the discrete inputs in a real application.
When your program is complete and tested, capture a screen-shot of it as it appears on your computer,
and prepare to present your program solution to the class in a review session for everyone to see and critique.
The purpose of this review session is to see multiple solutions to one problem, explore different programming
techniques, and gain experience interpreting PLC programs others have written. When presenting your
program (either individually or as a team), prepare to discuss the following points:
Identify the tag names or nicknames used within your program to label I/O and other bits in
memory
Follow the sequence of operation in your program, simulating the system in action
Identify any special or otherwise non-standard instructions used in your program, and explain why you
decided to take that approach
Show the comments placed in your program, to help explain how and why it works
How you designed the program (i.e. what steps you took to go from a concept to a working program)
file i02340
52
Question 31
Suppose we have an Allen-Bradley MicroLogix 1000 PLC connected to three momentary-contact
pushbutton switches as shown in this illustration:
24V
DC
COM
I/0
I/1
I/2
I/3
DC
COM
I/4
I/5
DC OUT
Power
Run
Fault
Force
C
85-264 VAC
L1
L2/N
VAC
VDC
O/0
VAC
VDC
O/1
VAC
VDC
O/2
VAC
VDC
O/3
Determine the bit statuses of I:0/0, I:0/1, and I:0/3 when switch A is pressed, switch B is unpressed
(released), and switch C is pressed.
file i04685
53
Question 32
Suppose we have a Siemens S7-200 PLC connected to two process switches as shown in this illustration:
24 VDC
SIEMENS
1M
SIMATIC
S7-200
1L+
0.0
0.1
0.2
Q0
SF/DIAG
0.3
0.4
2M
2L+
0.5
0.6
0.7
1.0
1.1
DC
CPU 224XP
Q1
.0 .1 .2 .3 .4 .5 .6 .7
L+
DC/DC/DC
.0 .1
RUN
STOP
.0 .1 .2 .3 .4 .5 .6 .7
I0
1M
Port 1
.0 .1 .2 .3 .4 .5
I1
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
2M
1.0
1.1
1.2
1.3
1.4
1.5
L+
Port 0
130 oF
12 GPM
Determine the bit statuses of I0.2 and I1.1 when the temperature switch senses 122 o F and the flow
switches senses 15 GPM.
file i04686
54
Question 33
Suppose we have an Allen-Bradley SLC 500 PLC connected to two process switches as shown in this
illustration:
Slot 0
(processor)
Power
supply
120 VAC
power
Processor
Slot 1
Input
0
1
2
3
L1
L2/N
Gnd
Slot 2
Slot 3
Input
4
5
6
7
0
1
2
3
Output
4
5
6
7
0
1
2
3
IN0
IN0
VAC 1
IN1
IN1
OUT0
IN2
IN2
OUT1
IN3
IN3
OUT2
IN4
IN4
OUT3
IN5
IN5
VAC 2
IN6
IN6
OUT4
IN7
IN7
OUT5
COM
COM
OUT6
COM
COM
OUT7
4
5
6
7
2 feet
37 PSI
Determine the bit statuses of I:1/3 and I:1/5 when the level switch senses 3 feet and the pressure
switch senses 14 PSI.
file i04687
55
Question 34
The following PLC program preforms the function of an alarm annunciator, where a discrete input
signal from an alarm switch (e.g. high temperature alarm) first causes a warning light to blink and a siren
to audibly pulse until a human operator presses an acknowledge pushbutton. If the alarm switch signal is
still activated, the light will remain on (steady) instead of blink and the siren will go silent. The light turns
off as soon as the alarm signal goes back to its safe state. A timing diagram shows how this should work:
Alarm
switch
Warning
light
Warning
siren
Acknowledge
pushbutton
Alarm_input
Blink
Light
Latch
Blink
Latch
Acknowledge_input Alarm_input
Siren
Latch
Latch
Take this generic PLC program and enter it into your own PLC, assigning appropriate addresses to
all instructions, and demonstrating its operation.
Suggestions for Socratic discussion
Does the PLC program (as written) expect a closed alarm switch contact to trigger the alarm, or an
open alarm switch contact?
If the real-world alarm switch contact was a pressure switch wired NC (normally-closed), would this
circuit function as a low pressure alarm or as a high pressure alarm?
If the real-world alarm switch contact was a temperature switch wired NO (normally-open), would this
circuit function as a low temperature alarm or as a high temperature alarm?
file i02342
56
Question 35
Some of the following transistor switch circuits are properly configured, and some are not. Identify
which of these circuits will function properly (i.e. turn on the load when the switch closes) and which of
these circuits are mis-wired:
Circuit 1
Circuit 2
Circuit 3
Circuit 4
Circuit 5
Circuit 6
file i01004
57
Question 36
In each of the following circuits, the light bulb will energize when the pushbutton switch is actuated.
Assume that the supply voltage in each case is somewhere between 5 and 30 volts DC (with lamps and
resistors appropriately sized):
Circuit 1
Circuit 2
Circuit 3
Circuit 4
Circuit 5
Circuit 6
However, not all of these circuits are properly designed. Some of them will function perfectly, but others
will function only once or twice before their transistors fail. Identify the faulty circuits, and explain why
they are flawed.
file i01005
58
Question 37
Draw the necessary wire connections so that bridging the two contact points with your finger (creating
a high-resistance connection between those points) will turn the light bulb on:
Contact
points
file i01006
Question 38
Choose the right type of bipolar junction transistor for each of these switching applications, drawing
the correct transistor symbol inside each circle:
+V
+V
+V
Load
Switch sourcing current
to transistor
Transistor sourcing
current to load
Load
file i01007
59
Transistor sinking
current from load
Question 39
Choose the right type of bipolar junction transistor for each of these switching applications, drawing
the correct transistor symbol inside each circle:
+V
+V
+V
Load
Transistor sourcing
current to load
Transistor sinking
current from load
Load
Also, explain why resistors are necessary in both these circuits for the transistors to function without
being damaged.
file i01008
60
Question 40
Suppose we have a Siemens S7-200 PLC connected to a pair of momentary-contact pushbutton switches
and a light bulb as shown in this illustration:
24 VDC
SIEMENS
1M
SIMATIC
S7-200
1L+
0.0
0.1
0.2
Q0
SF/DIAG
0.3
0.4
2M
2L+
0.5
0.6
0.7
1.0
1.1
DC
CPU 224XP
Q1
.0 .1 .2 .3 .4 .5 .6 .7
L+
DC/DC/DC
.0 .1
RUN
STOP
.0 .1 .2 .3 .4 .5 .6 .7
I0
1M
Port 1
.0 .1 .2 .3 .4 .5
I1
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
2M
1.0
1.1
1.2
1.3
1.4
1.5
L+
Port 0
Switch A
Lamp
Switch B
Examine the following relay ladder logic (RLL) program for this Siemens PLC, determining the statuses
of the two lamps provided both switches are simultaneously pressed by a human operator:
I0.7
Q0.1
I1.2
Q0.1
Complete the following truth table showing the status of the light bulb given all possible switch status
combinations:
Switch A
Unpressed
Unpressed
Pressed
Pressed
Switch B
Unpressed
Pressed
Unpressed
Pressed
61
Light Bulb
file i03360
Question 41
Suppose we have a Siemens S7-200 PLC connected to a pair of momentary-contact pushbutton switches
and light bulbs as shown in this illustration:
24 VDC
SIEMENS
1M
SIMATIC
S7-200
1L+
0.0
0.1
0.2
0.3
2M
2L+
0.5
0.6
0.7
1.0
1.1
.0 .1 .2 .3 .4 .5 .6 .7
L+
DC
CPU 224XP
Q1
Q0
SF/DIAG
0.4
DC/DC/DC
.0 .1
RUN
STOP
.0 .1 .2 .3 .4 .5 .6 .7
1M
Port 1
.0 .1 .2 .3 .4 .5
I1
I0
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
2M
1.0
1.1
1.2
1.3
1.4
1.5
L+
Port 0
Lamp Y
Switch A
Lamp Z
Switch B
Examine the following relay ladder logic (RLL) program for this Siemens PLC, determining the statuses
of the two lamps provided switch A is pressed by a human operator and switch B is unpressed:
I1.2
I0.7
Q0.1
I0.7
I1.2
Q0.3
Furthermore, determine whether the inputs and outputs of this particular PLC (as shown) are sourcing
or sinking.
file i04170
62
Question 42
Suppose we have a Koyo CLICK PLC connected to three process switches as shown in this illustration:
C0-02DD1-D
CLICK
Koyo
30 PSI
C1
X1
X2
X3
150 oF
X4
PWR
RUN
ERR
RUN
C2
STOP
Y1
4 inches
Y2
Y3
PORT 1
TX1
Y4
RX1
+V
AD1V
TX2
AD1I
RX2
AD2V
PORT 2
AD2I
ACOM
PORT 3 RS-485
DA1V
DA1I
TX3
RX3
DA2V
LG
DA2I
24V
24 VDC
Determine the switch stimuli (i.e. required pressure, temperature, and level) given the live display of
the ladder logic program shown here:
X1
X2
X3
Y1
Also, determine the status of the lamp connected to the PLCs Y1 output.
Suggestions for Socratic discussion
Identify how you could override the PLC program to force the lamp to energize, if your only tool at
hand was a screwdriver.
file i04667
63
Question 43
Suppose we have an Allen-Bradley SLC 500 controller connected to a pair of momentary-contact
pushbutton switches and contactor controlling power to an electric motor as shown in this illustration:
480 VAC
Power
supply
1
X2
H2
H3
F7
H1
L1
L2/N
F5
F1
F2
F3
Input
0
1
2
3
X1
F6
H4
Processor
Gnd
Output
4
5
6
7
0
1
2
3
Input
4
5
6
7
Start
Analog
IN0
VAC 1
IN 0+
IN 0-
IN1
OUT0
IN2
OUT1
IN3
OUT2
IN4
OUT3
IN5
VAC 2
IN 2+
IN 2-
IN6
OUT4
ANL COM
IN7
OUT5
COM
OUT6
IN 3+
IN 3-
COM
OUT7
ANL COM
IN 1+
IN 1ANL COM
Stop
ANL COM
F4
6
7
8
Contactor
T3 T2 T1
Overload
block
Reset
Motor
This motor control system has a problem, though: the motor refuses to start when the Start
pushbutton is pressed. Closely examine the pictorial diagram (including the status LEDs on the PLCs
I/O cards), then identify at least two faults that could account for the motors refusal to start.
Suggestions for Socratic discussion
A helpful problem-solving tip is to note the PLCs I/O states by examining the LED indicators on each
input and output card on the PLC rack. What do the LED states tell you in this particular example?
file i04069
64
Question 44
A NAND logic function may be built up from a regular AND function plus an inverter function (a NOT gate)
on the output:
AND
NAND
NOT
. . . is equivalent to . . .
The same strategy of building a NAND gate may be done in PLC ladder-diagram programming, by
combining a normally-closed contact instruction with two contacts in series.
Examine these two Allen-Bradley PLC programs, and explain why the left-hand program is wasteful
while the right-hand program makes more efficient use of available bits:
Wasteful
I:0/4
I:0/7
O:2/0
Allen-Bradley MicroLogix/SLC
Efficient
O:2/0
I:0/4
O:2/1
B3:0/0
I:0/7
B3:0/0
O:2/1
Examine these two Siemens S7 PLC programs, and explain why the left-hand program is wasteful
while the right-hand program makes more efficient use of available bits in the same ways the Allen-Bradley
example programs were wasteful/efficient:
Q2.0
I0.7
Efficient
Q2.0
I0.4
Q2.1
M0.0
I0.7
M0.0
Q2.1
Note: many novice PLC programmers commit this error of wasting valuable I/O as they
write their programs!
file i04092
65
Question 45
This Koyo CLICK PLC has been programmed to control the starting and stopping of an electric
motor, including a counter instruction to prevent the motor from being started up more than a specified
number of times:
C0-02DD1-D
CLICK
Koyo
Start
C1
X1
X1
X2
X2
CT1
Y1
Stop
X3
X4
PWR
RUN
RUN
ERR
C2
Y1
STOP
Reset
Y2
PORT 1
Y3
TX1
Y4
RX1
+V
Y1
AD1V
TX2
AD1I
RX2
AD2V
PORT 2
AD2I
ACOM
PORT 3 RS-485
M1
Y1
Contactor
relay coil
Up
DA1V
TX3
DA1I
RX3
DA2V
LG
X3
Counter
CT1
SetPoint
Current
CTD1
CT1
Complete
DA2I
Reset
24V
24 VDC
Identify the counter instruction in the program shown, its input connections, and also how the result
of the counter reaching its pre-set limit forces the motor to stop. Also, determine the maximum number of
times the motor may be started up, assuming the counters current value goes to zero when the Reset button
is pressed.
Finally, determine how to modify this PLC program so that the counter may be manually reset by the
operator without requiring a separate pushbutton labeled Reset.
Suggestions for Socratic discussion
If an operator presses the Start button multiple times while the motor is already running, do these
button-presses get counted by the counter instruction, or do only the real motor start-up events get
counted?
What do you suppose the label CTD1 represents inside the counter instruction?
Note the number of times the bit Y1 is referenced inside this PLC program: once in a coil instruction
and twice in contact instructions. Is there any limit to how many times a bit address may be used in a
PLC program?
Describe the purpose of the first contact instruction labeled Y1 in this program, explaining why it is
often referred to as a seal-in contact.
file i03589
66
Question 46
Read selected portions of the Siemens SIMATIC S7-200 Programmable Controller System Manual
(document A5E00307987-04, August 2008) and answer the following questions:
Identify the different types of SIMATIC counter instructions.
Identify a practical application for a counter instruction programmed into a PLC.
How high can one of these counter instructions count up to? How low can it count down to? Based on
these values, how many bits do you think are used in the register to store a counter instructions current
value?
Sketch a simple ladder-diagram program for a Siemens S7-200 PLC whereby a switch connected to input
I0.5 causes a counter to increment (count up) and then turn on an alarm light output Q0.3 when the count
reaches a value of 5. Also provide a reset function triggered by a normally-open switch contact at input
I0.0 to force the count value back to zero when pressed.
Suggestions for Socratic discussion
If you have access to your own PLC for experimentation, I urge you to write a simple demonstration
program in your PLC allowing you to explore the behavior of these PLC instructions. The program
doesnt have to do anything useful, but merely demonstrate what each instruction does. First, read
the appropriate section in your PLCs manual or instruction reference to identify the proper syntax for
that instruction (e.g. which types of data it uses, what address ranges are appropriate), then write the
simplest program you can think of to demonstrate that function in isolation. Download this program
to your PLC, then run it and observe how it functions live by noting the color highlighting in your
editing programs display and/or the numerical values manipulated by each instruction. After playing
with your demonstration program and observing its behavior, write comments for each rung of your
program explaining in your own words what each instruction does.
file i02245
67
Question 47
Read selected portions of the Allen-Bradley Logix5000 Controllers General Instructions reference
manual (publication 1756-RM0031-EN-P, January 2007) and answer the following questions:
Identify the different types of counter instructions offered in the Logix5000 PLC family.
How high can one of these counter instructions count up to? How low can it count down to? Based on
these values, how many bits do you think are used in the register to store a counter instructions current
value?
Unlike the Siemens S7 family of PLCs, the Allen-Bradley counter instruction box symbols do not
provide a place to connect a reset input. How then is it possible to command a counter instruction to reset
back to zero?
Sketch a simple ladder-diagram program for an Allen-Bradley Logix5000 PLC whereby a hightemperature switch input with the tag-name High Motor Temp causes a counter to increment (count up)
every time a motor overheats, and then turn on an alarm light output (tag-name Alarm Lamp) when the
count reaches a value of 5. Also provide a reset function triggered by a normally-open switch contact
(tag-name Alarm Reset) to force the count value back to zero when pressed.
Suggestions for Socratic discussion
If you have access to your own PLC for experimentation, I urge you to write a simple demonstration
program in your PLC allowing you to explore the behavior of these PLC instructions. The program
doesnt have to do anything useful, but merely demonstrate what each instruction does. First, read
the appropriate section in your PLCs manual or instruction reference to identify the proper syntax for
that instruction (e.g. which types of data it uses, what address ranges are appropriate), then write the
simplest program you can think of to demonstrate that function in isolation. Download this program
to your PLC, then run it and observe how it functions live by noting the color highlighting in your
editing programs display and/or the numerical values manipulated by each instruction. After playing
with your demonstration program and observing its behavior, write comments for each rung of your
program explaining in your own words what each instruction does.
file i02664
68
Question 48
Demonstration Program counter instructions
An important technique for learning any programming language Ladder Diagram PLC programming
included is to write simple demonstration programs showcasing and explaining how particular
instructions and programming constructs are supposed to work. Since you have access to your own personal
PLC, you can explore the elements of your PLCs programming language like a scientist would explore new
specimens: subject them to tests and record how they respond. This is how you will be able to teach
yourself new models of PLC when you are working in your career, when you wont have textbooks to follow
or training to show you exactly what to do.
Write such a demonstration program for your PLCs counter instructions, where discrete inputs on
your PLC control discrete outputs on your PLC. An acceptable demonstration program must meet these
three criteria:
Simple nothing extra included in the program to detract from the fundamental behavior of the
instruction(s) being explored
Complete nothing missing from the program relevant to the fundamental behavior of the
instruction(s) being explored
Clearly documented every rung clearly commented in your own words, every variable named
69
Question 49
Suppose we have a Koyo CLICK PLC connected to three process switches as shown in this illustration:
C0-02DD1-D
CLICK
Koyo
C1
Trip = 135 oF
X1
X2
X3
X4
PWR
RUN
ERR
RUN
C2
STOP
Y1
Trip = 23 inches
Y2
Y3
PORT 1
TX1
Y4
RX1
+V
Trip = 17 PSI
AD1V
TX2
AD1I
RX2
AD2V
PORT 2
AD2I
ACOM
PORT 3 RS-485
DA1V
DA1I
TX3
RX3
DA2V
LG
DA2I
24V
24 VDC
Determine the process conditions (i.e. temperature, level, and pressure values) given the live display
of the ladder logic program shown here:
X1
X2
X3
Y1
Also, determine the status of the lamp connected to the PLCs Y1 output.
file i02144
70
Question 50
Suppose we have a Koyo CLICK PLC connected to three process switches as shown in this illustration:
C0-02DD1-D
CLICK
Koyo
C1
X1
Trip = 32 PSI
X2
X3
X4
PWR
RUN
ERR
RUN
C2
STOP
Y1
Trip = 10 inches
Y2
PORT 1
Y3
TX1
Y4
RX1
+V
Trip = 99 oF
AD1V
TX2
AD1I
RX2
AD2V
PORT 2
AD2I
ACOM
PORT 3 RS-485
DA1V
DA1I
TX3
RX3
DA2V
LG
DA2I
24V
24 VDC
Determine the process conditions (i.e. temperature, level, and pressure values) given the offline display
of the ladder logic program shown here, knowing that the lamp happens to be energized at the present time:
X1
X2
X3
X2
Y1
file i02145
71
Question 51
Programming Challenge Parking garage counter
Suppose we wish to count the number of cars inside a parking garage at any given time, by incrementing
a counter each time a car enters the garage through the entry lane, and decrementing the same counter each
time a car leaves the garage through the exit lane. One discrete input of the PLC will connect to a switch
detecting the passing of each car through the garage entry, and another discrete input of the PLC will
connect to a switch detecting cars passing out the garage exit. The PLC must be equipped with a way to
for the garage attendant to manually reset the counter to zero.
Write a PLC program to perform this function, and demonstrate its operation using switches connected
to its inputs to simulate the discrete inputs in a real application.
Suggestions for Socratic discussion
What type of switches would you recommend to detect cars driving into the parking garage?
How are you able to view the counter instructions current count value as the program runs?
Is there any way to fool this system so that it does not hold an accurate count of cars inside the
garage?
PLC comparison:
Allen-Bradley Logix 5000: CTUD count-up/down instruction
Allen-Bradley SLC 500: CTU and CTD instructions.
Siemens S7-200: CTUD count-up/down instruction
Koyo (Automation Direct) DirectLogic: UDC counter instruction
file i03684
72
Question 52
Question 53
Question 54
Question 55
Question 56
Question 57
Question 58
Question 59
Question 60
73
Question 61
A PLC is being used to monitor the oil pressure for a steam turbine driving an electrical generator,
shutting steam off to the turbine if ever the oil pressure drops below a 10 PSI limit. The turbines lubrication
oil pump is driven by the turbine shaft itself, supplying itself with pressurized lubricating oil to keep all the
turbine bearings properly lubricated and cooled:
Start
PLC
PSL
Stop
Oil pump
Turbine
Generator
20 PSI
air supply
(vent)
ATO
Steam supply
Another technician programmed the PLC for the start/stop function, but this program has a problem:
Discrete output
card
"Start" pushbutton
IN_switch_Start
Solenoid coil
OUT_valve
"Stop" pushbutton
IN_switch_Stop
PLC program
IN_switch_Start
IN_switch_Stop
IN_oil_press
OUT_valve
OUT_valve
Identify what this problem is, and fix it! Hint: the oil pump is driven by the turbine, and as such cannot
generate any oil pressure until the turbine begins to spin.
file i00189
74
Question 62
This Siemens S7-200 PLC is supposed to count the number of cars entering a parking garage, using a
pressure-sensitive switch that the cars drive over when entering the garage. The car-count value is sent to
a computer in the main office via a network cable plugged into the PLC. The parking attendant is able to
reset the count to 0 at the end of his shift, using a key-switch:
...
Network cable
to main office display
SIEMENS
1M
SIMATIC
S7-200
1L+
0.0
0.1
0.2
Q0
SF/DIAG
0.3
0.4
2M
2L+
0.5
0.6
0.7
1.0
1.1
DC
CPU 224XP
Q1
.0 .1 .2 .3 .4 .5 .6 .7
L+
DC/DC/DC
.0 .1
RUN
STOP
.0 .1 .2 .3 .4 .5 .6 .7
I0
1M
Port 1
.0 .1 .2 .3 .4 .5
I1
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
2M
1.0
1.1
1.2
1.3
1.4
1.5
L+
Port 0
Unfortunately, there is something wrong with this system. Although it worked just fine yesterday, today
the counters current value as displayed on the main office computer seems to be stuck at 574 no matter
how many more cars drive over the pressure switch and enter the garage. Explain how you would go about
diagnosing the problem in this system, justifying each step you would take.
Suggestions for Socratic discussion
A useful troubleshooting strategy is to mentally divide this system into three major portions, and try
to determine which portion the problem lies within: (1) the switches and wiring connected to the PLC,
(2) the PLC itself, and (3) the network cable and computer in the main office.
How important is the fact that this system worked fine yesterday? Does this knowledge help you in
your troubleshooting?
Are there any LED indicators on the face of the PLC that might be helpful in providing diagnostic data
for you to pinpoint the location of the problem?
file i03683
75
Question 63
This Siemens S7-200 PLC has been programmed to count the number of people in a room, by
incrementing a counter every time a person enters through the doorway, and decrementing that same
counter whenever someone exits through the same doorway. The two optical switches activate whenever
their respective light beams are broken by someone passing through. Their horizontal separation is just a
couple of inches much less than the girth of a persons torso. The operating status of each switch is that
it energizes the PLC input when the light beam is broken:
Light sources
Entering
Photo-switches
PLC
SIEMENS
1M
SIMATIC
S7-200
1L+
0.0
0.1
0.2
Q0
SF/DIAG
0.3
0.4
2M
2L+
0.5
0.6
0.7
1.0
1.1
L+
DC
CPU 224XP
Q1
.0 .1 .2 .3 .4 .5 .6 .7
DC/DC/DC
.0 .1
RUN
STOP
.0 .1 .2 .3 .4 .5 .6 .7
I0
1M
Port 1
.0 .1 .2 .3 .4 .5
I1
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
2M
1.0
1.1
1.2
1.3
1.4
1.5
L+
Port 0
Examine the program in this PLC for counting people, and determine how it is able to differentiate
between a person entering the room and a person leaving the room:
I1.0
I1.3
P
I1.3
CU
CTUD
I1.0
P
CD
QU
QD
LD
PV
CV
file i00185
77
Question 64
A PLC is used to count the number of cans traveling by on a conveyor belt in a fish canning factory.
An optical proximity switch detects the passage of each can, sending a discrete (on/off) signal to one of the
PLCs input channels. The PLC then counts the number of pulses to determine the number of cans that
have passed by:
Power
supply
Input
Processor
0
1
2
3
Input
4
5
6
7
DC sourcing
24 VDC
L1
120 VAC
L2/N
Gnd
2
3
4
DC sinking
Output
4
5
6
7
0
1
2
3
DC sinking
IN0
IN0
VDC
IN1
IN1
OUT0
IN2
IN2
OUT1
IN3
IN3
OUT2
IN4
IN4
OUT3
IN5
IN5
OUT4
IN6
IN6
OUT5
IN7
IN7
OUT6
COM
COM
OUT7
COM
COM
COM
TB-20
TB-23
1
0
1
2
3
Grn
4
5
6
7
Cable 45
Red
Blu
Org
Counter
reset
TB-31
Wht
Blk
Red
DC sinking
One day the canning line operator tells you the PLC has stopped counting even though cans continue to
run past the proximity switch as the conveyor belt moves. Identify what you would do to begin diagnosing
this problem, justifying each step you would take.
Suggestions for Socratic discussion
Identify different areas or components within this system that could possibly be at fault, as a prelude
to identifying specific diagnostic steps.
Are there any ways you could diagnose this problem without the use of test equipment (e.g. multimeter)?
Explain the significance of the sourcing and sinking labels on the I/O cards as well as the proximity
switch.
file i02428
78
Question 65
The manufacturing company you work for installs a PLC control system on its assembly line, counting
the number of components produced every shift. For quite a while, the system works without any problems
whatsoever, and then one day management decides to scrap a run of product mid-shift and start over. This
is when they discover the system integrator they contracted to build and program the PLC system provided
no way to reset the shift production counter except to wait until the shift is over.
An operations manager summons you to reset the counter for them. Identify at least two different ways
you could reset the counter to meet their needs, as quickly as possible.
file i00182
79
Question 66
An important pump in a chemical process is turned by an electric motor, and operators want to have
visual indication in the control room that the pump is indeed turning. There is no way to attach a speed
switch to the pump shaft (that would be too easy!). Instead, someone has installed a proximity switch near
the pump shaft, situated to pick up the passing of a keyway in the shaft with each rotation. Thus, the
proximity switch will output a pulse signal when the pump shaft is spinning:
Motor
Pump
Proximity switch
Signal cable
to PLC input
I:3/2
Operators wanted the indicator light in the control room to blink when the pump is running, for an
indication of shaft motion. The problem is, the shaft turns much too fast (approximately 1750 RPM) to
directly drive the indicator with the proximity switch signal, and so an Allen-Bradley PLC was programmed
to produce a slower blink using this program:
I:3/2
CTU
Count Up
Counter
Preset
Accum
C5:0.ACC/13
CU
C5:0
DN
32767
0
O:1/5
C5:0/DN
C5:0
RES
Explain how this program works to fulfill the function of a frequency divider, converting the high-speed
pulse signal of the proximity switch into a low-speed blink for the operator light.
Suggestions for Socratic discussion
Explain how a frequency divider circuit built out of J-K flip-flop integrated circuits functions, and then
describe how this PLC program is similar in principle.
Explain how to speed up the blinking rate of the light for any given motor shaft speed.
80
file i03838
81
Question 67
Programming Challenge and Comparison Mixer motor auto-stop
A batch mixing process in a manufacturing facility uses a mixer motor and a large paddlewheel to
mix liquid ingredients to make a final product. A PLC needs to run this motor for exactly 1500 turns of
the paddlewheel and then automatically stop. The motor needs to be able to start back up if the Start
button is pressed again for the next batch:
Power
cable
Liquid
Prox. switch
Mixing vessel
Sensor
cable (to PLC)
Paddlewheel
Inputs
Start pushbutton (momentary NO) pushing this button closes the switch to energize the PLC input
Stop pushbutton (momentary NC) pushing this button opens the switch to de-energize the PLC input
Proximity switch (NO) one pulse per paddle revolution
Outputs
Motor contactor energizing this PLC output starts the mixing motor
Work individually or in teams to write a PLC program performing this function, and demonstrate its
operation using switches connected to its inputs to simulate the discrete inputs in a real application.
When your program is complete and tested, capture a screen-shot of it as it appears on your computer,
and prepare to present your program solution to the class in a review session for everyone to see and critique.
The purpose of this review session is to see multiple solutions to one problem, explore different programming
techniques, and gain experience interpreting PLC programs others have written. When presenting your
program (either individually or as a team), prepare to discuss the following points:
Identify the tag names or nicknames used within your program to label I/O and other bits in
memory
Follow the sequence of operation in your program, simulating the system in action
Identify any special or otherwise non-standard instructions used in your program, and explain why you
decided to take that approach
Show the comments placed in your program, to help explain how and why it works
How you designed the program (i.e. what steps you took to go from a concept to a working program)
Question 68
Programming Challenge Hour/Minute/Second timer
Many PLCs provide a range of special contacts to the programmer. Among these special contacts is
typically one that cycles on and off at a rate of once per second, like a 1 Hz clock pulse.
Research the special contact for this function in your PLC, then write a PLC program for an
Hour/Minute/Second timer using three counter instructions: one to count seconds (0 to 59), one to count
minutes (0 to 59), and one to count hours.
Suggestions for Socratic discussion
What is the address of the special contact in your PLC for the 1 Hz clock pulse?
How do you make three counters count in the correct sequence, so that one represents seconds, the next
minutes, and the next hours?
PLC comparison:
Allen-Bradley SLC 500: status bit S:4/0 is a free-running clock pulse with a period of 20 milliseconds,
which may be used to clock a counter instruction up to 50 to make a 1-second pulse (because 50 times
20 ms = 1000 ms = 1 second).
Siemens S7-200: Special Memory bit SM0.5 is a free-running clock pulse with a period of 1 second.
Koyo (Automation Direct) DirectLogic: Special relay SP4 is a free-running clock pulse with a period of
1 second.
file i03691
83
Question 69
Question 70
Question 71
Question 72
Question 73
Question 74
Question 75
Question 76
Question 77
Question 78
Question 79
Question 80
84
Question 81
Suppose we have an Allen-Bradley MicroLogix 1000 PLC connected to a temperature switch and a flow
switch:
Trip = 15 GPM
24V
DC
COM
I/0
I/1
I/2
I/3
DC
COM
I/4
I/5
DC OUT
Power
Trip = 200 oF
Run
Fault
Force
85-264 VAC
L1
L2/N
VAC
VDC
O/0
VAC
VDC
O/1
VAC
VDC
O/2
VAC
VDC
O/3
120 VAC
We wish for the lamp to come on when the temperature is below 200 degrees F and when the flow rate
is below 15 GPM. Write a RLL program for the PLC (complete with correct address labels for each of the
virtual contacts) to fulfill this function:
O:0
file i02375
85
Question 82
Analyze this Allen-Bradley PLC program and explain what it is supposed to do:
Motor
O:1
CTU
Count Up
Counter
CU
C5:2
Preset
17
Accum
Start
I:0
Stop
I:0
C5:2
DN
DN
Motor
O:1
0
Motor
O:1
0
Reset
I:0
C5:2
RES
file i02377
86
Question 83
In relay ladder logic (RLL) programming, it is considered bad practice to have multiple instances of an
identical (standard) relay coil in a program:
Timer_01
Level_low
Pump_run
Switch_hand
OL_contact
Sump_wet
...
...
Identical coils!
Pump_run
Explain why this is considered poor practice in PLC programming. Next, determine the status of the
Pump run output channel given the following bit states:
Timer 01 = 1
Level low = 1
Switch hand = 0
OL contact = 0
Sump wet = 0
file i02376
87
Question 84
Sketch the wires necessary to connect two pressure switches and two relay coils to the following AllenBradley MicroLogix 1000 PLC (model 1761-L10BWA, with 6 discrete DC inputs either sourcing or sinking,
and 4 discrete relay contact outputs). Be sure to wire the two switches so they source current to the PLCs
inputs (the low-pressure switch to I/2 and the high-pressure switch to I/5, normally-open contacts on both)
and wire the relay coils so the PLC sources current to them (O/0 and O/1):
Com
NC
24V
NO
DC
COM
I/0
I/1
I/2
I/3
DC
COM
I/4
I/5
DC OUT
Power
PSH
Run
Fault
Force
Com
NC
NO
85-264 VAC
L1
L2/N
VAC
VDC
O/0
VAC
VDC
O/1
VAC
VDC
PSL
file i02379
88
O/2
VAC
VDC
O/3
Question 85
Analyze this Siemens S7-200 PLC program (for controlling a motor) and explain what it is supposed to
do:
T6
M0.2
+50
Start
I0.4
IN
TON
PT
100 ms
Stop
I0.5
M0.2
M0.2
T6
Low speed
Q0.0
M0.2
T6
High speed
Q0.1
M0.2
Include an explanation of the motor contactor wiring, based on an analysis of the PLC program.
file i02255
89
Question 86
Calculate all voltages, currents, and total power in this balanced Y-Y system:
Source
Load
7
27
580
Eline =
Iline =
Ephase(source) =
Iphase(source) =
Ephase(load) =
Iphase(load) =
Ptotal =
file i02421
90
Question 87
The following circuit senses temperature using a thermistor with a positive temperature coefficient (i.e.
resistance increases as temperature increases):
10 VDC
1k
Cable 1
(80 mA current-limited)
Cable 2
Voltmeter
+To
1k
(at room temp)
First, determine the voltage we should read at the voltmeter with the thermistor at or near room
temperature.
Next, identify the likelihood of each specified fault for this circuit, supposing the voltmeter registers 0
volts with the thermistor at room temperature, and a voltage measurement taken between terminals D and
F registers 10 volts. Consider each fault one at a time (i.e. no coincidental faults), determining whether or
not each fault could independently account for all measurements and symptoms in this circuit.
Fault
Thermistor failed open
Fixed resistor failed open
Wire A-D failed open
Wire F-J failed open
Wire E-H failed open
Thermistor failed shorted
Fixed resistor failed shorted
Short between terminals G-H
Short between terminals E-F
Short between terminals D-E
file i02924
91
Possible
Impossible
Question 88
Determine all component voltages and currents in this circuit, being sure to mark directions of all
currents (conventional flow notation) and polarities of all voltages:
2.2 k
1.8 k
4.7 k
1.5 mA
1 k
file i02525
92
Question 89
Suppose a single-phase AC load draws a current of 16.5 amps at 237 volts (RMS). If the measured power
factor of this load is 0.85, calculate the true power (P ) dissipated by the load as well as its apparent power
(S). Be sure to include the proper unit of measurement (e.g. VA, VAR, or W) with each answer!
P =
S=
file i02422
93
Question 90
In this 480 volt AC induction motor control circuit (sometimes referred to as a bucket), a three-pole
relay (typically called a contactor) is used to switch power on and off to the motor. The contactor itself is
controlled by a smaller switch, which receives 120 volts AC from a step-down transformer to energize the
contactors magnetic coil. Although this motor control circuit used to work just fine, today the motor refuses
to start.
L1
L2
L3
L1
L2
L3
Schematic diagram
Fuses
Transformer
X2
H1
H3
H2
H4
X1
Contactor
H1
H3
H2
H4
Transformer
Contactor
A1
X1
A2
A2
T3
A1
Switch
motor
Switch
T1 T2
X2
Motor
T1 T2 T3
Using your AC voltmeter, you measure 476 volts AC between L1 and L2, 477 volts AC between L2 and
L3, and 475 volts AC between L1 and L3. You also measure 477 volts between transformer terminals H1
and H4. With the switch in the on position, you measure 0.5 volts AC between terminals X1 and X2 on
the transformer. From this information, identify the following:
Two components or wires in the circuit that you know cannot be failed either open or shorted, besides
the 480 volt AC source which is obviously operational.
Two different component or wire failures in the circuit, either one of which could account for the problem
and all measured values, and the types of failures they would be (either open or shorted).
file i03174
94
Question 91
Lab Exercise introduction
Your teams task is to construct a system controlled by a PLC. The system you choose to build shall
use (at minimum) discrete input(s), discrete output(s), and either counter or timer functions. This system
will be expanded during the next course to include a three-pole contactor, so designing the system with this
in mind (or simply installing the contactor in this exercise) will save you time later. Project ideas include:
Air compressor control, with high and low air pressure switches
Water sump pump control, with high and low water level switches
Other alternatives? Must be pre-approved by instructor!
In addition to functioning properly, the PLC program must be fully documented and edited for
cleanliness and good programming form. This includes labels (aliases, or symbolic names) for all inputs
and outputs, and comments for each and every rung of logic explaining the rungs functions. Although
there will be only one program submitted by each team, completion of this objective is individual, with each
student explaining (at least) a part of the PLC program to the instructor.
Objective completion table:
Performance objective
Prototype sketch (before building the system!)
Circuit design challenge
Complete I/O list
Prototype PLC program (before programming!)
Final wiring diagram and system inspection
Demonstration of working system
Final PLC program inspection
Lab question: Selection/testing
Lab question: Commissioning
Lab question: Mental math
Lab question: Diagnostics
Grading
mastery
mastery
mastery
mastery
mastery
mastery
mastery
proportional
proportional
proportional
proportional
Team
The only proportional scoring in this activity are the lab questions, which are answered by each student
individually. A listing of potential lab questions are shown at the end of this worksheet question. The lab
questions are intended to guide your labwork as much as they are intended to measure your comprehension,
and as such the instructor may ask these questions of your team day by day, rather than all at once (on a
single day).
It is essential that your team plans ahead what to accomplish each day. A short (10
minute) team meeting at the beginning of each lab session is a good way to do this, reviewing
whats already been done, whats left to do, and what assessments you should be ready for.
There is a lot of work involved with building, documenting, and troubleshooting these working
instrument systems!
As you and your team work on this system, you will invariably encounter problems. You should always
attempt to solve these problems as a team before requesting instructor assistance. If you still require
instructor assistance, write your teams color on the lab whiteboard with a brief description of what you
need help on. The instructor will meet with each team in order they appear on the whiteboard to address
these problems.
95
96
PLC
24V
DC
COM
I/0
I/1
I/2
I/3
Relay socket
DC
COM
I/4
Terminal strip
I/5
DC OUT
Relay
Power
Run
Fault
Force
Diode
85-264 VAC
L1
L2/N
VAC
VDC
O/0
VAC
VDC
O/1
VAC
VDC
O/2
VAC
VDC
O/3
The following components and materials will be available to you: assorted ice cube relays with DCrated coils and matching sockets ; terminal strips ; 1N400X rectifying diodes ; lengths of hook-up wire.
You will be expected to supply your own screwdrivers and multimeter for assembling and testing the circuit
at your desk.
Start switch to input:
PLC program (instructor chooses):
97
Relay to output:
Retentive coils
I/O type
24 VDC discrete input
Tagname
START PB
STOP PB
E STOP
MTR TEMP
CONTACTOR
98
Notes
Black pushbutton,
momentary NO contacts
Red pushbutton,
momentary NC contacts
Red pushbutton,
latching NC contacts
Current signal scaled
0 to 150 deg F
To terminal A1
99
Identify
Identify
Identify
Identify
Identify
all
all
all
all
all
The importance of identifying and naming all relevant variables is paramount to clean programming.
This is especially true when an HMI (Human-Machine Interface) is to be connected to the PLC, and all
relevant variables must be named there as well.
A reasonable approach to developing a robust program prototype is to create your prototype in your
own personal (brick) PLC, de-bugging it there with all the switches in place to simulate input signals.
Even if your personal PLC is a different model (or manufacture) than the project PLC, this is a very helpful
exercise. Furthermore, it allows you to continue program development outside of school when you do not
have access to the project PLC.
Only after a prototype program is developed should you begin programming the project PLC. I
recommend the following steps:
The final program should be well-documented, clean, and as simple as possible. All members of the
team should have a hand in designing the program, and everyone must thoroughly understand how it works.
Common mistakes:
Waiting too long after writing the program code to insert comments. This is best done immediately,
while everything makes sense and is fresh in your memory!
Insufficient commenting only makes sense to the person who did the programming
Students working on portions of the program in isolation, not sharing with their teammates what they
did and how. It is important that the whole team learns all aspects of their system!
100
Creating and inspecting accurate wiring diagrams should take no more than one full lab
session (3 hours) if the team is working efficiently!
101
Lab questions
Diagnostics
Virtual Troubleshooting referencing their systems diagram(s), students propose diagnostic tests
(e.g. ask the instructor what a meter would measure when connected between specified points; ask the
instructor how the system responds if test points are jumpered) while the instructor replies according
to how the system would behave if it were faulted. Students try to determine the nature and location
of the fault based on the results of their own diagnostic tests.
Demonstrate how to verify a sinking discrete inputs status using a voltmeter
Demonstrate how to verify a sourcing discrete inputs status using a voltmeter
Demonstrate how to verify a sinking discrete outputs status using a voltmeter
Demonstrate how to verify a sourcing discrete outputs status using a voltmeter
Examine a PLC program and identify any mistakes in it.
Identify status of a discrete input field device (e.g. switch) by examining the status of its corresponding
contact instruction in the PLC program (colored versus uncolored)
Determine whether or not a given diagnostic test will provide useful information, given a set of symptoms
exhibited by a failed system.
Identify at least two plausible faults given the results of a diagnostic test and a set of symptoms exhibited
by a failed system.
102
Connection points
All terminal blocks properly labeled.
All terminals shown in proper order on diagram.
All I/O cards and points fully labeled (complete with program addresses).
All wires are numbered.
All electrically-common points in the circuit shall bear the same wire number.
All wire colors shown next to each terminal.
Connection points
All terminals properly labeled.
All terminal blocks properly labeled.
All junction (field) boxes shown as distinct sections of the loop diagram, and properly labeled.
All control panels shown as distinct sections of the loop diagram, and properly labeled.
All wire colors shown next to each terminal.
All terminals on devices labeled as they appear on the device (so that anyone reading the diagram will
know which device terminal each wire goes to).
Energy sources
All power source intensities labeled (e.g. 24 VDC, 120 VAC, 480 VAC 3-phase)
All shutoff points labeled (e.g. Breaker #5, Valve #7)
103
PB-5
Reset
PSH-10
Field
NO
COM
NC
Blk
Red
Blk
Red
Cable PB-5
Cable PSH-10
Blk
Red
Blk
Red
12
11
TB-43
Grn
Gry
Org
Blu
Blu
Blu
Blu
Blu
Blu
Blu
Blu
104
Gry
Red
Red
24VDC
Power supply
COM
L2
L1
Slot 4
120 VAC
Bkr #3
24VDC sinking
1746-IB8
Discrete input
Red
Blk
COM
IN7
IN6
IN5
IN4
IN3
IN2
IN1
IN0
Red
(1 amp each)
Fuse block
TB-7
PLC cabinet
PAH-20
Alarm lamp
Trip solenoid
PY-3
Field
Blk
Red
Cable PAH-20
Blk
Red
Blk
Blk
TB-44
Red
Red
Cable PY-3
Wht
Blk
Blk
Wht
Blk
Blk
Wht
Blu
Blu
Blu
Blu
TB-11
file i01880
105
Blk
Blk
Blk
Blk
(1 amp each)
Fuse block
OUT7
OUT6
OUT5
OUT4
VAC2
OUT3
OUT2
OUT1
OUT0
VAC1
Wht
Blk
120 VAC
Bkr #1
Slot 1
1746-OA8
Discrete output
PLC cabinet
Answers
Answer 1
Answer 2
Input register, byte 1, bit 4: I1.4
Output register, byte 0, bit 2: Q0.2
Variable memory double word, starting at byte 105: VD105 (a double-word consisting of 4 bytes, or 32
bits)
Answer 3
Input file, element 1, bit 4: I:1/4
Output file, element 0, bit 2: O:0/2
Timer 6 accumulator word: T4:6.ACC
Answer 4
For the Allen-Bradley MicroLogix example, the lamp will energize only when switch 0 is turned off and
switch 1 is turned on.
For the Siemens S7-200 example, the lamp will energize when switch 0 is turned on or if switch 1 is
turned off, or both conditions occur simultaneously.
For the Koyo example, the lamp will energize according to the Exclusive-OR function with switch 1 and
switch 2. The lamp energizes when switch 1 is on and switch 2 is off, or when switch 1 is off and switch 2 is
on.
Answer 5
Answer 6
Answer 7
Answer 8
Answer 9
106
Answer 10
Demonstration program showing some basic bit instructions in an Allen-Bradley MicroLogix
PLC:
When the switch connected to input 0 is turned on, the input bit I:0/0 goes from 0 to 1, and this contact becomes colored
on my laptop PCs screen. That color is sent to the coil instruction, where it turns on output bit O:0/1. This makes output
channel 1 turn on, energizing the light bulb wired to that output. When I turn off input switch 0, the contact un-colors and
so does the output coil O:0/1. This program rung makes output O:0/1 be the same state as input I:0/0.
I:0/0
O:0/1
When the same switch on input 0 is turned on, the input bit I:0/0 goes from 0 to 1, and this contact becomes un-colored.
This makes the output bit O:0/2 turn off, so that O:0/2 is always the opposite state of I:0/0.
I:0/0
O:0/2
Placing these two contact instruction in "series" with each other makes it so the coil only gets colored if both of the
contacts become colored. O:0/3 turns on only if switch 4 is on and switch 5 is off.
I:0/4
I:0/5
O:0/3
107
The CTU instruction is a counter that counts in the "up" direction when its input is toggled. When the "Preset" count value
reached, the "Done" bit (DN) activates.
I:0/0
CTU
Count Up
Counter
CU
C5:0
Preset
12
Accum
DN
The CTD instruction is a counter that counts in the "down" direction when its input is toggled. When the "Preset" count value
reached, the "Done" bit (DN) activates. Note how both the CTU and CTD counter instructions reference the exact same
counter structure in memory (C5:0). Thus, the two instructions both act on the same accumulated value.
I:0/1
CTD
Count Down
Counter
CD
C5:0
Preset
12
Accum
DN
When the counter C5:0 accumulator value equals or exceeds the "Preset" value, contact C5:0/DN becomes colored,
passing color to the coil O:0/0 to turn on a light bulb connected to output channel 0.
C5:0/DN
O:0/0
Allen-Bradley counter instructions can only be reset by external commands, in this case a special coil instruction sharing
the same address as the counter instruction (C5:0). Activating the I:0/1 input causes the RES coil to become colored,
which then resets the CTU instructions "Accumulated" value back to zero.
C5:0
I:0/2
RES
108
The TON instruction is a timer. Its "Accum" value starts at 0 and counts up (1...2...3...4...) whenever the input contact is
colored. When the "Accum" value reaches 5, the DN coil becomes colored. The "Time Base" value of 1.0 means that
each count of the "Accum" is 1.0 seconds worth of time. If I make the "Time Base" something different, the timer will
count faster.
I:0/0
TON
Timer On Delay
Timer
Time Base
Preset
EN
T4:0
DN
1.0
5
Accum
When the timer T4:0 reaches the "done" condition, the contact T4:0/DN becomes colored, passing color to the coil O:0/0
to turn on a light bulb connected to output 0.
T4:0/DN
O:0/0
Answer 11
Answer 12
Bit statuses:
I:0/0 = 1
I:0/1 = 0
I:0/2 = 1
Answer 13
Bit statuses:
I0.2 = 1
I1.1 = 0
Answer 14
L > 3 feet, P > 37 PSI, and T < 88o F
109
Answer 15
I0.2
I0.5
I1.1
Q0.1
Q0.6
=
=
=
=
=
0
1
0
1
0
Answer 16
Switch statuses:
Switch A = released
Switch B = pressed
Switch C = released
The lamp will be energized.
Answer 17
Mtr
110
Answer 19
Circuit 1
Circuit 2
Load
Circuit 3
Load
Circuit 4
Load
Load
111
Answer 20
Circuit 1
Circuit 2
Load
Load
Circuit 3
Circuit 4
Load
Load
112
Answer 21
Demonstration program showing some basic bit instructions in an Allen-Bradley MicroLogix
PLC:
When the switch connected to input 0 is turned on, the input bit I:0/0 goes from 0 to 1, and this contact becomes colored
on my laptop PCs screen. That color is sent to the coil instruction, where it turns on output bit O:0/1. This makes output
channel 1 turn on, energizing the light bulb wired to that output. When I turn off input switch 0, the contact un-colors and
so does the output coil O:0/1. This program rung makes output O:0/1 be the same state as input I:0/0.
I:0/0
O:0/1
When the same switch on input 0 is turned on, the input bit I:0/0 goes from 0 to 1, and this contact becomes un-colored.
This makes the output bit O:0/2 turn off, so that O:0/2 is always the opposite state of I:0/0.
I:0/0
O:0/2
Placing these two contact instruction in "series" with each other makes it so the coil only gets colored if both of the
contacts become colored. O:0/3 turns on only if switch 4 is on and switch 5 is off.
I:0/4
I:0/5
O:0/3
Note: your own demonstration program should contain some retentive coil instruction as well, in order
for you to be able to observe what these instructions do and how their operation differs from that of regular
coil instructions!
Answer 22
X1
X2
X2
X1
X3
Y1 = 1
113
Y1
Answer 23
I0.7
I1.1
Q0.1
Q0.3
=
=
=
=
0
1
0
1
Answer 24
Neither output will activate to energize either lamp.
Answer 25
Neither output will activate, resulting in both lamps de-energized.
Answer 26
Necessary switch statuses:
Switch A = released or Switch B = pressed
Switch C = pressed
Answer 27
Some possible problems to account for what we are seeing:
Answer 28
Answer 29
There are no answers provided here! For help, consult the instruction set reference manual for your
PLC, which will describe in detail how each type of instruction is supposed to function in your PLC.
Answer 30
Answer 31
Bit statuses:
I:0/0 = 0
I:0/1 = 0
I:0/3 = 1
Answer 32
Bit statuses:
I0.2 = 0
I1.1 = 0
114
Answer 33
Bit statuses:
I:1/3 = 1
I:1/5 = 0
Answer 34
Answer 35
Remember that a bipolar transistor requires current through the base-emitter junction in order to turn
on, and thereby let load current pass between collector and emitter.
Circuit 2
Circuit 4
Circuit 3
Circuit 6
Circuit #3 is different from the other bad circuits. While the other bad circuits lamps do not energize
at all, the lamp in circuit #3 energizes weakly when the pushbutton switch is open (not actuated). This is
due to the fact that lamp current will naturally pass through the base-collector PN junction as though it
were a simple diode, regardless of the switchs state.
Answer 36
Circuits 3, 5, and 6 are flawed, because the emitter-base junctions of their transistors are overpowered
every time the switch closes.
Hint: draw the respective paths of switch and lamp current for each circuit!
115
Answer 37
Contact
points
116
Answer 38
+V
+V
+V
Load
NPN
Switch sourcing current
to transistor
Transistor sourcing
current to load
Transistor sinking
current from load
PNP
Load
Follow-up question: explain why neither of the following transistor circuits will work. When the
pushbutton switch is actuated, the load remains de-energized:
+V
+V
+V
Load
Load
117
Answer 39
+V
+V
Switch sinking current
from transistor
+V
Load
PNP
Transistor sinking
current from load
Transistor sourcing
current to load
NPN
Load
Follow-up question: explain why neither of the following transistor circuits will work. When the
pushbutton switch is actuated, the load remains de-energized:
+V
+V
+V
Load
Load
118
Answer 40
Switch A
Unpressed
Unpressed
Pressed
Pressed
Switch B
Unpressed
Pressed
Unpressed
Pressed
Light Bulb
Off
Off
On
On
Note how Switch B has no effect on the PLCs output status! The reason for this is the placement of the
two identically-addresses coils in the PLC program: each rung writes either a 0 or a 1 to the same output bit
Q0.1, but only the last rungs state is in effect when the PLC finishes its scan of the program and updates
the output registers to actually turn its output channels on or off.
This is why it is a bad idea to assign the same address to multiple coils in a PLC program, the only
exception to this rule being when the coils in question are retentive (i.e. Set and Reset or Latch
and Unlatch coils) in which case complementary coil pairs bearing the same address is proper. Regular,
non-retentive coil instructions, however, will conflict with one another in a PLC program if they bear the
same bit address.
Answer 41
Hint: to identify whether an I/O point is sourcing or sinking, sketch arrows showing the direction of
electric current (using conventional flow notation) where wires connect to the I/O channel terminals. If the
arrow shows current exiting the PLC channel and headed toward an external device, then that I/O channel
is sourcing current to that device. If the arrow shows current entering the PLC channel from an external
device, then that I/O channel is sinking current from that device.
Answer 42
Switch statuses:
Pressure switch = less than 30 PSI
Temperature switch = cooler than 150 deg F
Level switch = greater than 4 inches
The lamp will be de-energized.
Answer 43
Answer 44
Each wasteful program uses an output bit as the intermediary bit between the AND and NOT functions
when there is no need.
Answer 45
This PLC program allows the motor to start up 7 times. If you thought the correct number of start-ups
was eight, consider the fact that the counters output bit (CT1) gets set when the counters current value
equals the SetPoint value, not when it exceeds the SetPoint value.
Answer 46
Answer 47
Answer 48
There are no answers provided here! For help, consult the instruction set reference manual for your
PLC, which will describe in detail how each type of instruction is supposed to function in your PLC.
119
Answer 49
Temperature = below 135 o F
Level = above 23 inches
Pressure = below 17 PSI
Answer 50
If the lamp is energized, we know that the top two virtual contacts (X1 and X2) are colored, and/or the
bottom two virtual contacts (X3 and X2) are colored.
For the top two virtual contacts to be colored, X1 must be 0 and X2 must be 1. This equates to a
pressure less than 32 PSI and a level less than 10 inches.
For the bottom two virtual contacts to be colored, X3 must be 1 and X2 must be 0. This equates to a
temperature greater than 99 o F and a level greater than 10 inches.
Answer 51
Answer 52
Answer 53
Answer 54
Answer 55
Answer 56
Answer 57
Answer 58
Answer 59
Answer 60
Answer 61
This is one possible fix for the problem:
PLC program
IN_switch_Start
OUT_valve
IN_switch_Stop
IN_oil_press
120
OUT_valve
Answer 62
Answer 63
Hint: the P contact instructions are positive transition instructions, activating whenever their
respective bits transition from 0 to 1, but returning to an inactive state whenever the bit value holds at
either 0 or 1.
Answer 64
Answer 65
Answer 66
Hint: the contact address C5:0.ACC/13 refers to the 13th bit of the counters accumulator register,
which is a 16-bit binary number. The 15th bit would be the MSB, while the 0th bit is the LSB.
Answer 67
Answer 68
Answer 69
Answer 70
Answer 71
Answer 72
Answer 73
Answer 74
Answer 75
Answer 76
Answer 77
Answer 78
Answer 79
Answer 80
Answer 81
This is a graded question no answers or hints given!
Answer 82
This is a graded question no answers or hints given!
Answer 83
This is a graded question no answers or hints given!
121
Answer 84
This is a graded question no answers or hints given!
Answer 85
This is a graded question no answers or hints given!
Answer 86
This is a graded question no answers or hints given!
Answer 87
This is a graded question no answers or hints given!
Answer 88
This is a graded question no answers or hints given!
Answer 89
This is a graded question no answers or hints given!
Answer 90
This is a graded question no answers or hints given!
Answer 91
Answer 92
Your loop diagram will be validated when the instructor inspects the loop with you and the rest of your
team.
122