Sei sulla pagina 1di 209

INST 231 (PLC Programming), section 1

Lab
PLC-based motor control system: Question 91 and 92, completed objectives due by the end of day
2, section 3

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
Problem-solving intro activity: review INST230 x1 exam.
Theory session topic: Introduction to PLCs
Questions 1 through 20; answer questions 1-10 in preparation for discussion (remainder for practice)

Day 2
Problem-solving intro activity: identifying color highlighting for an online PLC program with given
switch states (e.g. i04628 and/or i04664 with different switch actuation states)
Theory session topic: Contact and coil programming
Questions 21 through 40; answer questions 21-27 in preparation for discussion (remainder for practice)

Day 3
Problem-solving intro activity: identifying switch states from the color highlighting displayed in an
online PLC program
Theory session topic: Counter instructions
Questions 41 through 60; answer questions 41-47 in preparation for discussion (remainder for practice)

1
Day 4
Problem-solving intro activity: identifying switch states from the color highlighting displayed in an
online PLC program
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

2
Course Syllabus

INSTRUCTOR CONTACT INFORMATION:


Tony Kuphaldt
(360)-752-8477 [office phone]
(360)-752-7277 [fax]
tony.kuphaldt@btc.ctc.edu

DEPT/COURSE #: INST 231

CREDITS: 3 Lecture Hours: 10 Lab Hours: 50 Work-based Hours: 0

COURSE TITLE: PLC Programming

COURSE DESCRIPTION: In this course you will learn how to wire, program, and configure
programmable logic controllers (PLCs) to perform discrete control functions including combinational logic,
counters, and timers. Pre/Corequisite course: INST 230 (Motor Controls) Prerequisite course:
MATH&141 (Precalculus 1) with a minimum grade of “C”

COURSE OUTCOMES: Construct, program, and efficiently diagnose control systems incorporating
programmable logic controllers (PLCs).

COURSE OUTCOME ASSESSMENT: PLC wiring, programming, and configuration outcomes are
ensured by measuring student performance against mastery standards, as documented in the Student
Performance Objectives. Failure to meet all mastery standards by the next scheduled exam day will result
in a failing grade for the course.

3
STUDENT PERFORMANCE OBJECTIVES:
• Without references or notes, within a limited time (3 hours total for each exam session), independently
perform the following tasks. Multiple re-tries are allowed on mastery (100% accuracy) objectives, each
with a different set of problems:
→ Calculate voltages, currents, powers, and/or resistances in a DC series-parallel circuit, with 100%
accuracy (mastery)
→ Sketch proper wire connections for sourcing or sinking PLC I/O points given schematic or pictorial
diagrams of the components, with 100% accuracy (mastery)
→ Determine status of a PLC discrete output given input states and a simple RLL program, with 100%
accuracy (mastery)
→ 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 specified variables in algebraic formulae, with 100% accuracy (mastery)
→ Determine the possibility of suggested faults in a simple PLC circuit given measured values (voltage,
current), a schematic diagram, and reported symptoms, with 100% accuracy (mastery)
→ Program a PLC to fulfill a specified control system function
• In a team environment and with full access to references, notes, and instructor assistance, perform the
following tasks:
→ Demonstrate proper use of safety equipment and application of safe procedures while using power
tools, and working on live systems
→ Communicate effectively with teammates to plan work, arrange for absences, and share responsibilities
in completing all labwork
→ Construct and commission a motor start/stop system using a PLC as the control element
→ Generate an accurate wiring diagram compliant with industry standards documenting your team’s
motor control system
• Independently perform the following tasks with 100% accuracy (mastery). Multiple re-tries are allowed
with different specifications/conditions each time:
→ Program a start/stop function in a PLC and wire it to control an electromechanical relay

COURSE OUTLINE: A course calendar in electronic format (Excel spreadsheet) resides on the Y:
network drive, and also in printed paper format in classroom DMC130, for convenient student access. This
calendar is updated to reflect schedule changes resulting from employer recruiting visits, interviews, and
other impromptu events. Course worksheets provide comprehensive lists of all course assignments and
activities, with the first page outlining the schedule and sequencing of topics and assignment due dates.
These worksheets are available in PDF format at http://www.ibiblio.org/kuphaldt/socratic/sinst
• INST231 Section 1 (PLC contact, coil, and counter programming): 4 days theory and labwork
• INST231 Section 2 (PLC timer and sequence programming): 2 days theory and labwork + 1 day for
mastery/proportional Exams

4
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 isn’t 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. BTC’s 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

5
EVALUATION AND GRADING STANDARDS: (out of 100% for the course grade)
• Completion of all mastery objectives = 50%
• Mastery exam score (first attempt) = 10%
• Proportional exam score = 30%
• 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 (assigned by instructor based on individual learning needs)

All grades are criterion-referenced (i.e. no grading on a “curve”)


100% ≥ A ≥ 95% 95% > A- ≥ 90%
90% > B+ ≥ 86% 86% > B ≥ 83% 83% > B- ≥ 80%
80% > C+ ≥ 76% 76% > C ≥ 73% 73% > C- ≥ 70% (minimum passing course grade)
70% > D+ ≥ 66% 66% > D ≥ 63% 63% > D- ≥ 60% 60% > F

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 student’s 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 student’s 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 instructor’s 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.).

6
REQUIRED STUDENT SUPPLIES AND MATERIALS:
• Course worksheets available for download in PDF format
• Lessons in Industrial Instrumentation textbook, available for download in PDF format
→ Access worksheets and book at: http://www.ibiblio.org/kuphaldt/socratic/sinst
• Spiral-bound notebook for reading annotation, homework documentation, and note-taking.
• Instrumentation reference CD-ROM (free, from instructor). This disk contains many tutorials and
datasheets in PDF format to supplement your textbook(s).
• Tool kit (see detailed list)
• Simple scientific calculator (non-programmable, non-graphing, no unit conversions, no numeration
system conversions), TI-30Xa or TI-30XIIS recommended
• Portable personal computer with Ethernet port and wireless. Windows OS strongly preferred, tablets
discouraged.
• Small “brick” PLC and HMI panel (Automation Direct option):
→ Automation Direct CLICK PLC model C0-00DD1-D (price ≈ $70) 8 discrete (DC) inputs, 6 discrete
(DC) outputs
→ or Automation Direct CLICK PLC model C0-02DD1-D (price ≈ $130) 4 discrete (DC) inputs, 4
discrete (DC) outputs, 2 analog inputs, 2 analog outputs, RS-485 Modbus communications port,
real-time clock and calendar
→ Automation Direct CLICK 24 VDC power supply model C0-00AC (price ≈ $30) 24 VDC at 0.5
amp maximum output
→ Automation Direct C-More Micro HMI panel 3 inch EA1-S3ML-N (price ≈ $150)
→ optional Automation Direct C-More Micro touch-screen HMI panel 3 inch EA1-S3ML (price ≈
$190)
→ Automation Direct USB/serial adapter and cable part EA-MG-PGM-CBL (price ≈ $40) necessary
for programming the C-More Micro HMI panel (also works for programming the PLC)
→ Note: We have found the Autmoation Direct software works equally well through a 9-pin serial
port as through a USB port (with converter), and is very “friendly” to use.
• Small “brick” PLC and HMI panel (Allen-Bradley option):
→ Rockwell (Allen-Bradley) MicroLogix 1000 model 1761-L10BWA (price ≈ $85 with BTC student
discount at North Coast Electric) 6 discrete (DC) inputs, 4 discrete (relay) outputs
→ or Rockwell (Allen-Bradley) MicroLogix 1100 model 1763-L16BWA (price ≈ $240 with BTC student
discount at North Coast Electric) 10 discrete (DC) inputs, 6 discrete (DC) outputs, 2 analog inputs,
RS-485 communication port, 10 Mbit/s Ethernet communication port, embedded web server for
remote monitoring of data points (series A or B programmable using free MicroLogix Lite software)
→ Rockwell (Allen-Bradley) cable part 1761-CBL-PM02 (price ≈ $30 with BTC student discount at
North Coast Electric)
→ Automation Direct C-More Micro HMI panel 3 inch EA1-S3ML-N (price ≈ $150)
→ optional Automation Direct C-More Micro touch-screen HMI panel 3 inch EA1-S3ML (price ≈
$190)
→ Automation Direct cable part EA-MLOGIX-CBL (price ≈ $30) and adapter part EA-MG-SP1
(price ≈ $50) necessary for connecting the C-More Micro HMI panel to an Allen-Bradley MicroLogix
1000 PLC
→ Automation Direct USB/serial adapter and cable part EA-MG-PGM-CBL (price ≈ $40) necessary
for programming the C-More Micro HMI panel
→ Note: Programming Allen-Bradley PLCs is best done using a PC with a 9-pin serial port. We
have found trying to use a USB-to-serial adapter very troublesome with Allen-Bradley software!

7
ADDITIONAL INSTRUCTIONAL RESOURCES:
• The BTC Library hosts a substantial collection of textbooks and references on the subject of
Instrumentation, as well as links in its online catalog to free Instrumentation e-book resources available
on the Internet.
• “BTCInstrumentation” channel on YouTube (http://www.youtube.com/BTCInstrumentation), hosts
a variety of short video tutorials and demonstrations on instrumentation.
• Instrumentation student club meets regularly to set up industry tours, raise funds for scholarships, and
serve as a general resource for Instrumentation students.
• ISA website (http://www.isa.org) provides all of its standards in electronic format, many of which
are freely available to ISA members.
• Cad Standard (CadStd) or similar AutoCAD-like drafting software (useful for sketching loop and
wiring diagrams). Cad Standard is a simplified clone of AutoCAD, and is freely available at:
http://www.cadstd.com

CAMPUS EMERGENCIES: If an emergency arises, your instructor may inform you of actions to
follow. You are responsible for knowing emergency evacuation routes from your classroom. If police or
university officials order you to evacuate, do so calmly and assist those needing help. You may receive
emergency information alerts via the building enunciation system, text message, email, or BTC’s webpage
(http://www.btc.ctc.edu), Facebook or Twitter. Refer to the emergency flipchart in the lab room (located
on the main control panel) for more information on specific types of emergencies.

ACCOMMODATIONS: If you think you could benefit from classroom accommodations for a disability
(physical, mental, emotional, or learning), please contact our Accessibility Resources office. Call (360)-752-
8345, email ar@btc.ctc.edu, or stop by the AR Office in the Admissions and Student Resource Center
(ASRC), Room 106, College Services Building

file INST231syllabus

8
Sequence of second-year Instrumentation courses

Core Electronics -- 3 qtrs


including MATH 141 (Precalculus 1)

(Only if 4th quarter was Summer: INST23x)

INST 200 -- 1 wk Offered 1st week of


Prerequisite for all INST24x,
Fall, Winter, and
INST25x, and INST26x courses Intro. to Instrumentation Spring quarters

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 Final Control Elements Data Acquisition Systems

INST 231 -- 3 cr INST 241 -- 6 cr INST 251 -- 5 cr INST 262 -- 5 cr


PLC Programming Temp./Flow Measurement PID Control DCS and Fieldbus

INST 232 -- 3 cr INST 242 -- 5 cr INST 252 -- 4 cr INST 263 -- 5 cr


PLC Systems Analytical Measurement Loop Tuning Control Strategies

INST 233 -- 3 cr CHEM&161 -- 5 cr ENGT 134 -- 5 cr


Protective Relays (elective) Chemistry CAD 1: Basics

Prerequisite for INST206

INST 205 -- 1 cr
All courses
Job Prep I
Offered 1st week of
completed?
No Fall, Winter, and
Yes INST 206 -- 1 cr
Spring quarters

Job Prep II
Graduate!!!

9
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:

Possible course schedules depending on date of entry into 2nd year


Beginning in Summer Beginning in Fall Beginning in Winter Beginning in Spring

July Summer quarter Sept. Fall quarter Jan. Winter quarter April Spring quarter
INST 230 -- 3 cr INST 200 -- 1 wk INST 200 -- 1 wk INST 200 -- 1 wk
Motor Controls 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 Final Control Elements Data Acquisition Systems

INST 232 -- 3 cr INST 241 -- 6 cr INST 251 -- 5 cr INST 262 -- 5 cr


PLC Systems Temp./Flow Measurement PID Control DCS and Fieldbus

INST 233 -- 3 cr INST 242 -- 5 cr INST 252 -- 4 cr INST 263 -- 5 cr


Protective Relays (elective) Analytical Measurement Loop Tuning Control Strategies
Aug. Dec.
CHEM&161 -- 5 cr ENGT 134 -- 5 cr
Sept. Fall quarter Jan. Winter quarter Chemistry CAD 1: Basics
Mar. June
INST 200 -- 1 wk INST 205 -- 1 cr
Intro. to Instrumentation Job Prep I April Spring quarter July Summer quarter
INST 240 -- 6 cr INST 250 -- 5 cr INST 205 -- 1 cr INST 230 -- 3 cr
Pressure/Level Measurement Final Control Elements Job Prep I Motor Controls

INST 241 -- 6 cr INST 251 -- 5 cr INST 260 -- 4 cr INST 231 -- 3 cr


Temp./Flow Measurement PID Control Data Acquisition Systems PLC Programming

INST 242 -- 5 cr INST 252 -- 4 cr INST 262 -- 5 cr INST 232 -- 3 cr


Analytical Measurement Loop Tuning DCS and Fieldbus PLC Systems
Dec.
CHEM&161 -- 5 cr INST 263 -- 5 cr INST 233 -- 3 cr
Jan. Winter quarter Chemistry Control Strategies Protective Relays (elective)
Mar. Aug.
INST 205 -- 1 cr
Job Prep I ENGT 134 -- 5 cr
April Spring quarter CAD 1: Basics Sept. Fall quarter
June
INST 250 -- 5 cr INST 206 -- 1 cr INST 205 -- 1 cr
Final Control Elements Job Prep II July Summer quarter Job Prep I

INST 251 -- 5 cr INST 260 -- 4 cr INST 230 -- 3 cr INST 240 -- 6 cr


PID Control Data Acquisition Systems Motor Controls Pressure/Level Measurement

INST 252 -- 4 cr INST 262 -- 5 cr INST 231 -- 3 cr INST 241 -- 6 cr


Loop Tuning DCS and Fieldbus PLC Programming Temp./Flow Measurement

CHEM&161 -- 5 cr INST 263 -- 5 cr INST 232 -- 3 cr INST 242 -- 5 cr


Chemistry Control Strategies PLC Systems Analytical Measurement
Mar. Dec.
ENGT 134 -- 5 cr INST 233 -- 3 cr
April Spring quarter CAD 1: Basics Protective Relays (elective) Jan. Winter quarter
June Aug.
INST 206 -- 1 cr INST 206 -- 1 cr
Job Prep II July Summer quarter Sept. Fall quarter Job Prep II
INST 260 -- 4 cr INST 230 -- 3 cr INST 206 -- 1 cr INST 250 -- 5 cr
Data Acquisition Systems Motor Controls Job Prep II Final Control Elements

INST 262 -- 5 cr INST 231 -- 3 cr INST 240 -- 6 cr INST 251 -- 5 cr


DCS and Fieldbus PLC Programming Pressure/Level Measurement PID Control

INST 263 -- 5 cr INST 232 -- 3 cr INST 241 -- 6 cr INST 252 -- 4 cr


Control Strategies PLC Systems Temp./Flow Measurement Loop Tuning

ENGT 134 -- 5 cr INST 233 -- 3 cr INST 242 -- 5 cr CHEM&161 -- 5 cr


CAD 1: Basics Protective Relays (elective) Analytical Measurement Chemistry
June Aug. Dec. Mar.

Graduation! Graduation! Graduation! Graduation!

file sequence

10
General Values and Expectations

Success in this career requires: professional integrity, resourcefulness, persistence, close attention to
detail, and intellectual curiosity. Poor judgment spells disaster in this career, which is why employer
background checks (including social media and criminal records) and drug testing are common. The good
news is that character and clear thinking are malleable traits: unlike intelligence, these qualities can be
acquired and improved with effort. This is what you are in school to do – increase your “human capital”
which is the sum of all knowledge, skills, and traits valuable in the marketplace.

Mastery: You must master the fundamentals of your chosen profession. “Mastery” assessments challenge
you to demonstrate 100% competence (with multiple opportunities to re-try). Failure to complete any
mastery objective(s) by the deadline date caps your grade at a C−. Failure to complete by the end of the
next school day results in a failing (F) grade.

Punctuality and Attendance: You are expected to arrive on time and be “on-task” all day just as you
would for a job. Each student has 12 hours of “sick time” per quarter applicable to absences not verifiably
employment-related, school-related, weather-related, or required by law. Each student must confer with the
instructor to apply these hours to any missed time – this is not done automatically. Students may donate
unused “sick time” to whomever they specifically choose. You must contact your instructor and lab team
members immediately if you know you will be late or absent or must leave early. Absence on an exam day
will result in a zero score for that exam, unless due to a documented emergency.

Time Management: You are expected to budget and prioritize your time, just as you will be on the job.
You will need to reserve enough time outside of school to complete homework, and strategically apply your
time during school hours toward limited resources (e.g. lab equipment). Frivolous activities (e.g. games,
social networking, internet surfing) are unacceptable when work is unfinished. Trips to the cafeteria for food
or coffee, smoke breaks, etc. must not interfere with team participation.

Independent Study: This career is marked by continuous technological development and ongoing change,
which is why self-directed learning is ultimately more important to your future success than specific
knowledge. To acquire and hone this skill, all second-year Instrumentation courses follow an “inverted”
model where lecture is replaced by independent study, and class time is devoted to addressing your questions
and demonstrating your learning. Most students require a minimum of 3 hours daily study time outside of
school. Arriving unprepared (e.g. homework incomplete) is unprofessional and counter-productive. Question
0 of every worksheet lists practical study tips.

Independent Problem-Solving: The best instrument technicians are versatile problem-solvers. General
problem-solving is arguably the most valuable skill you can possess for this career, and it can only be built
through persistent effort. This is why you must take every reasonable measure to solve problems on your own
before seeking help. It is okay to be perplexed by an assignment, but you are expected to apply problem-
solving strategies given to you (see Question 0) and to precisely identify where you are confused so your
instructor will be able to offer targeted help. Asking classmates to solve problems for you is folly – this
includes having others break the problem down into simple steps. The point is to learn how to think on your
own. When troubleshooting systems in lab you are expected to run diagnostic tests (e.g. using a multimeter
instead of visually seeking circuit faults), as well as consult the equipment manual(s) before seeking help.

Initiative: No single habit predicts your success or failure in this career better than personal initiative, which
is why your instructor will demand you do for yourself rather than rely on others to do for you. Examples
include setting up and using your BTC email account to communicate with your instructor(s), consulting
manuals for technical information before asking for help, regularly checking the course calendar and
assignment deadlines, avoiding procrastination, fixing small problems before they become larger problems,
etc. If you find your performance compromised by poor understanding of prior course subjects, re-read those
textbook sections and use the practice materials made available to you on the Socratic Instrumentation
website – don’t wait for anyone else to diagnose your need and offer help.

11
General Values and Expectations (continued)

Safety: You are expected to work safely in the lab just as you will be on the job. This includes wearing
proper attire (safety glasses and closed-toed shoes in the lab at all times), implementing lock-out/tag-out
procedures when working on circuits with exposed conductors over 30 volts, using ladders to access elevated
locations, and correctly using all tools. If you need to use an unfamiliar tool, see the instructor for directions.

Orderliness: You are expected to keep your work area clean and orderly just as you will be on the job.
This includes discarding trash and returning tools at the end of every lab session, and participating in all
scheduled lab clean-up sessions. If you identify failed equipment in the lab, label that equipment with a
detailed description of its symptoms.

Teamwork: You will work in instructor-assigned teams to complete lab assignments, just as you will work
in teams to complete complex assignments on the job. As part of a team, you must keep your teammates
informed of your whereabouts in the event you must step away from the lab or will be absent for any reason.
Any student regularly compromising team performance through lack of participation, absence, tardiness,
disrespect, or other disruptive behavior(s) will be removed from the team and required to complete all
labwork individually for the remainder of the quarter. The same is true for students found relying on
teammates to do their work for them.

Cooperation: The structure of these courses naturally lends itself to cooperation between students. Working
together, students significantly impact each others’ learning. You are expected to take this role seriously,
offering real help when needed and not absolving classmates of their responsibility to think for themselves or
to do their own work. Solving problems for classmates and/or explaining to them what they can easily read
on their own is unacceptable because these actions circumvent learning. The best form of help you can give
to your struggling classmates is to share with them your tips on independent learning and problem-solving,
for example asking questions leading to solutions rather than simply providing solutions for them.

Grades: Employers prize trustworthy, hard working, knowledgeable, resourceful problem-solvers. The grade
you receive in any course is but a partial measure of these traits. What matters most are the traits
themselves, which is why your instructor maintains detailed student records (including individual exam
scores, attendance, tardiness, and behavioral comments) and will share these records with employers if
you have signed the FERPA release form. You are welcome to see your records at any time, and to
compare calculated grades with your own records (i.e. the grade spreadsheet available to all students).
You should expect employers to scrutinize your records on attendance and character, and also challenge you
with technical questions when considering you for employment.

Representation: You are an ambassador for this program. Your actions, whether on tours, during a
jobshadow or internship, or while employed, can open or shut doors of opportunity for other students. Most
of the job opportunities open to you as a BTC graduate were earned by the good work of previous graduates,
and as such you owe them a debt of gratitude. Future graduates depend on you to do the same.

Responsibility For Actions: If you lose or damage college property (e.g. lab equipment), you must find,
repair, or help replace it. If you represent BTC poorly to employers (e.g. during a tour or an internship),
you must make amends. The general rule here is this: “If you break it, you fix it!”

Non-negotiable terms: disciplinary action, up to and including immediate failure of a course, will
result from academic dishonesty (e.g. cheating, plagiarism), willful safety violations, theft, harassment,
intoxication, destruction of property, or willful disruption of the learning (work) environment. Such offenses
are grounds for immediate termination in this career, and as such will not be tolerated here.

file expectations

12
General tool and supply list

Wrenches
• Combination (box- and open-end) wrench set, 1/4” to 3/4” – the most important wrench sizes are 7/16”,
1/2”, 9/16”, and 5/8”; get these immediately!
• Adjustable wrench, 6” handle (sometimes called “Crescent” wrench)
• Hex wrench (“Allen” wrench) set, fractional – 1/16” to 3/8”
• Optional: Hex wrench (“Allen” wrench) set, metric – 1.5 mm to 10 mm
• Optional: Miniature combination wrench set, 3/32” to 1/4” (sometimes called an “ignition wrench” set)
Note: when turning any threaded fastener, one should choose a tool engaging the maximum amount of
surface area on the fastener’s head in order to reduce stress on that fastener. (e.g. Using box-end wrenches
instead of adjustable wrenches; using the proper size and type of screwdriver; never using any tool that mars
the fastener such as pliers or vise-grips unless absolutely necessary.)

Pliers
• Needle-nose pliers
• Tongue-and-groove pliers (sometimes called “Channel-lock” pliers)
• Diagonal wire cutters (sometimes called “dikes”)

Screwdrivers
• Slotted, 1/8” and 1/4” shaft
• Phillips, #1 and #2
• Jeweler’s screwdriver set
• Optional: Magnetic multi-bit screwdriver (e.g. Klein Tools model 70035)

Electrical
• Multimeter, Fluke model 87-IV or better
• Alligator-clip jumper wires
• Soldering iron (10 to 40 watt) and rosin-core solder
• Resistor, potentiometer, diode assortments (from first-year lab kits)
• Package of insulated compression-style fork terminals (14 to 18 AWG wire size, #10 stud size)
• Wire strippers/terminal crimpers for 10 AWG to 18 AWG wire and insulated terminals
• Optional: ratcheting terminal crimp tool (e.g. Paladin 1305, Ferrules Direct FDT10011, or equivalent)

Safety
• Safety glasses or goggles (available at BTC bookstore)
• Earplugs (available at BTC bookstore)

Miscellaneous
• Simple scientific calculator (non-programmable, non-graphing, no conversions), TI-30Xa or TI-30XIIS
recommended. Required for some exams! Demonstrate to each and every student how to use
the memory functions (STO, RCL) on their calculators!
• Portable personal computer with Ethernet port and wireless. Windows OS strongly preferred, tablets
discouraged.
• Masking tape (for making temporary labels)
• Permanent marker pen
• Teflon pipe tape
• Utility knife
• Tape measure, 12 feet minimum
• Flashlight

An inexpensive source of tools is your local pawn shop. Look for tools with unlimited lifetime guarantees
(e.g. Sears “Craftsman” brand). Check for BTC student discounts as well!

13
file tools

14
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 day’s 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 student’s
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 instructor’s 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 day’s 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.
Quizzes are an effective tool for preparation assessment. “Prep” quizzes should be simple
and concept-related (not too many quantitative calculations). The goal is to test whether
or not students have spent significant time researching the material, not necessarily their
mastery of it. Each quiz should be designed so that any hard-working student should be able
to get it right even if they have not yet mastered the concept. Since each student is strongly
encouraged to keep a notebook for reading annotation, answering of assigned questions, and
classroom notes, each student may reference their notebook while taking the quizzes.
Quizzes also work well at the end of each classroom session to assess student engagement
during discussion. I recommend making these “Summary” quizzes more challenging than the
homework preparation quizzes.

15
SOCRATIC DIALOGUE TIPS FOR THE INSTRUCTOR:
• Ask students to demonstrate how they applied specific tips listed in Question 0 to the
subject and/or problems at hand.
• Ask students to articulate the principles applicable to the subject and/or problems at
hand. Most students exhibit the tendency to focus on procedures rather than principles,
which is why they struggle at solving novel problems. One of your main tasks as an
instructor is to get them thinking in terms of general principles, asking “why” questions
instead of “how” or “what” questions.
• Have students use the whiteboard to post questions they or their group has on specific
problems. This allows other students to see where their classmates need help, encouraging
peer tutoring.
• Pose “thought experiment” problems, asking students to predict what will happen in a
scenario if some variable is changed.
• Pose “Virtual Troubleshooting” problems, asking students to specify tests they would do
on a faulted system to identify the problem. The instructor’s role during this type of
exercise is to keep a fault scenario in mind while replying to students what the result(s)
of each test would be. Ask students what each test result tells them about the nature
and location of the fault, and also ask them what it would mean if the test result(s) were
different.
• If students get “stuck” during a large-group discussion, have all the students break into
teams of 2 or 3 to share solution ideas to the problem (or to a similar problem posed
Socratically by the instructor). This almost never fails to resolve the difficulty and re-
start the classroom dialogue.
• Another way to help students get “un-stuck” on a problem is to slowly and silently solve
the problem yourself on the whiteboard (or on paper in a small group), pausing after each
step to give students time to analyze your steps and explain to you the rationale behind
each one.
• Ask student teams to write their explanation of a concept in their own words or to explain
using their own diagrams, then ask other student teams to critique those explanations.
The goal here is to identify ways to improve each explanation, because there is always a
way to improve something!

16
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 day’s 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 team’s 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.
The same structure of having one student perform a task while the other members of the
team observe may also be applied to calibration. One student calibrates the instrument while
the other members of the team observe the steps, take notes, and check instrument calibration
by calculating and/or sketching error percentages. This way, the observing students get to
watch calibration technique(s), see how to operate the calibration equipment multiple times,
and practice determining instrument calibration errors (e.g. zero shifts, span shifts, and
nonlinearities) based on numerical data.
I strongly recommend having students work as a team to inspect their loop and loop
diagram accuracies. This is a much more time-efficient way to check their construction and
documentation work than to inspect their loop diagrams individually. When all team members
have their loop diagrams complete, take those diagrams and do a “walk through” of the loop,
inspecting quality of assembly and diagram accuracy. If any problems are noted, bring it to
the attention of the whole group and have them correct the problems before doing another
walk-through with you.
Lab questions are answered by students individually, and may be asked at any point along
the lab exercise schedule where appropriate. The point of these questions is not just to measure
student learning, but also to serve as a guide for students regarding the skills and concepts
they should be mastering as they progress through the lab exercise.

file instructional

17
Distance delivery methods

Sometimes the demands of life prevent students from attending college 6 hours per day. In such cases,
there exist alternatives to the normal 8:00 AM to 3:00 PM class/lab schedule, allowing students to complete
coursework in non-traditional ways, at a “distance” from the college campus proper.
For such “distance” students, the same worksheets, lab activities, exams, and academic standards still
apply. Instead of working in small groups and in teams to complete theory and lab sections, though, students
participating in an alternative fashion must do all the work themselves. Participation via teleconferencing,
video- or audio-recorded small-group sessions, and such is encouraged and supported.
There is no recording of hours attended or tardiness for students participating in this manner. The pace
of the course is likewise determined by the “distance” student. Experience has shown that it is a benefit for
“distance” students to maintain the same pace as their on-campus classmates whenever possible.
In lieu of small-group activities and class discussions, comprehension of the theory portion of each course
will be ensured by completing and submitting detailed answers for all worksheet questions, not just passing
daily quizzes as is the standard for conventional students. The instructor will discuss any incomplete and/or
incorrect worksheet answers with the student, and ask that those questions be re-answered by the student
to correct any misunderstandings before moving on.
Labwork is perhaps the most difficult portion of the curriculum for a “distance” student to complete,
since the equipment used in Instrumentation is typically too large and expensive to leave the school lab
facility. “Distance” students must find a way to complete the required lab activities, either by arranging
time in the school lab facility and/or completing activities on equivalent equipment outside of school (e.g.
at their place of employment, if applicable). Labwork completed outside of school must be validated by a
supervisor and/or documented via photograph or videorecording.

Conventional students may opt to switch to “distance” mode at any time. This has proven to be a
benefit to students whose lives are disrupted by catastrophic events. Likewise, “distance” students may
switch back to conventional mode if and when their schedules permit. Although the existence of alternative
modes of student participation is a great benefit for students with challenging schedules, it requires a greater
investment of time and a greater level of self-discipline than the traditional mode where the student attends
school for 6 hours every day. No student should consider the “distance” mode of learning a way to have
more free time to themselves, because they will actually spend more time engaged in the coursework than
if they attend school on a regular schedule. It exists merely for the sake of those who cannot attend during
regular school hours, as an alternative to course withdrawal.

file distance

18
Metric prefixes and conversion constants
• 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 = 10−1 Symbol: d
• Centi = 10−2 Symbol: c
• Milli = 10−3 Symbol: m
• Micro = 10−6 Symbol: µ
• Nano = 10−9 Symbol: n
• Pico = 10−12 Symbol: p
• Femto = 10−15 Symbol: f
• Atto = 10−18 Symbol: a
• Zepto = 10−21 Symbol: z
• Yocto = 10−24 Symbol: y

METRIC PREFIX SCALE


T G M k m µ n p
tera giga mega kilo (none) milli micro nano pico
1012 109 106 103 100 10-3 10-6 10-9 10-12

102 101 10-1 10-2


hecto deca deci centi
h da d c

• Conversion formulae for temperature


o
• F = (o C)(9/5) + 32
o
• C = (o F - 32)(5/9)
o
• R = o F + 459.67
• K = o C + 273.15

Conversion equivalencies for distance


1 inch (in) = 2.540000 centimeter (cm)
1 foot (ft) = 12 inches (in)
1 yard (yd) = 3 feet (ft)
1 mile (mi) = 5280 feet (ft)

19
Conversion equivalencies for volume
1 gallon (gal) = 231.0 cubic inches (in3 ) = 4 quarts (qt) = 8 pints (pt) = 128 fluid ounces (fl. oz.)
= 3.7854 liters (l)

1 milliliter (ml) = 1 cubic centimeter (cm3 )

Conversion equivalencies for velocity


1 mile per hour (mi/h) = 88 feet per minute (ft/m) = 1.46667 feet per second (ft/s) = 1.60934
kilometer per hour (km/h) = 0.44704 meter per second (m/s) = 0.868976 knot (knot – international)

Conversion equivalencies for mass


1 pound (lbm) = 0.45359 kilogram (kg) = 0.031081 slugs

Conversion equivalencies for force


1 pound-force (lbf) = 4.44822 newton (N)

Conversion equivalencies for area


1 acre = 43560 square feet (ft2 ) = 4840 square yards (yd2 ) = 4046.86 square meters (m2 )

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)

Conversion equivalencies for absolute pressure units (only)


1 atmosphere (Atm) = 14.7 pounds per square inch absolute (PSIA) = 101.325 kilo-pascals absolute
(kPaA) = 1.01325 bar (bar) = 760 millimeters of mercury absolute (mmHgA) = 760 torr (torr)

Conversion equivalencies for energy or work


1 british thermal unit (Btu – “International Table”) = 251.996 calories (cal – “International Table”)
= 1055.06 joules (J) = 1055.06 watt-seconds (W-s) = 0.293071 watt-hour (W-hr) = 1.05506 x 1010
ergs (erg) = 778.169 foot-pound-force (ft-lbf)

Conversion equivalencies for power


1 horsepower (hp – 550 ft-lbf/s) = 745.7 watts (W) = 2544.43 british thermal units per hour
(Btu/hr) = 0.0760181 boiler horsepower (hp – boiler)

Acceleration of gravity (free fall), Earth standard


9.806650 meters per second per second (m/s2 ) = 32.1740 feet per second per second (ft/s2 )

20
Physical constants
Speed of light in a vacuum (c) = 2.9979 × 108 meters per second (m/s) = 186,281 miles per second
(mi/s)

Avogadro’s number (NA ) = 6.022 × 1023 per mole (mol−1 )

Electronic charge (e) = 1.602 × 10−19 Coulomb (C)

Boltzmann’s constant (k) = 1.38 × 10−23 Joules per Kelvin (J/K)

Stefan-Boltzmann constant (σ) = 5.67 × 10−8 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/g·o C = 1 BTU/lb·o F = 4.1869 Joules/g·o C

Specific heat of ice ≈ 0.5 calories/g·o C

Specific heat of steam ≈ 0.48 calories/g·o C

Absolute viscosity of water at 20o C = 1.0019 centipoise (cp) = 0.0010019 Pascal-seconds (Pa·s)

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 × 10−5 Pascal-
seconds (Pa·s)

file conversion constants

21
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, don’t 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 one sentence of your
own thoughts per paragraph of text read. Note points of disagreement or confusion to explore later.
• Work through all mathematical exercises shown within the text, to ensure you understand all the steps.
• Imagine explaining concepts you’ve 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. Don’t be satisfied with merely knowing how to compute solutions –
learn why those solutions work. In mathematical problem-solving this means being able to identify the
practical meaning (and units of measurement) of every intermediate calculation. In other words, every
step of your solution should make logical sense.
• 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. Eliminate
distractions (e.g. cell phone, internet, socializing) in your place and time of study.
• Use your “in between” time productively. Don’t leave campus for lunch. Arrive to school early. If you
finish your assigned work early, begin studying the next day’s 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

22
Suggestions for Socratic discussion following a reading assignment

• Show your outline of today’s reading (i.e. a summary written in your own words of what the text says).
(Instructor: probe the students’ understanding in any areas you see under-represented in their outlines.)
• Identify which part(s) of the reading assignment make perfect sense to you.
• Identify the most challenging part(s) of the reading assignment, and explain why.
• Identify any part(s) of the reading assignment you found surprising, and why you found them so.

• Students and instructor both practice the “Think Aloud” active reading technique on a section of
particularly challenging text. Instructor: this is where the reader reads out loud, verbalizing their
interpretation of the text as they go. Model this for your students, demonstrating your own approach.
• Summarize the essence of today’s reading in one succinct paragraph.
• Identify concepts in today’s reading that seemed non-intuitive, and explain why that was so.
• Identify over-arching themes in today’s reading, especially where you see connections between what
you’ve learned today and what you’ve learned previously (e.g. concepts and facts from previous courses).
• Imagine explaining what you have learned today to a precocious child (i.e. a person sufficiently mature
in their thinking but lacking the background knowledge you possess).

• Formulate your own question based on the reading, where the answer is found verbatim in the text.
Explain what makes this question a good one for students to ponder.
• Formulate your own question based on the reading, where the answer requires you to combine multiple
statements or concepts found in different portions of today’s reading. Explain what makes this question
a good one for students to ponder (i.e. why it prompts critical thinking).
• Formulate your own question based on the reading, where the answer requires you to combine facts or
concepts found in today’s reading with information learned at some other time. Explain what makes
this question a good one for students to ponder (i.e. why it prompts critical thinking).
• Formulate your own question based on the reading, where the answer is open-ended (i.e. where there
may be multiple different yet correct answers).
• Devise a scientific experiment to test a principle articulated in today’s reading. Challenge students to
identify what result(s) would constitute disproof of the principle.

Suggestions for Socratic discussion following a problem-solving assignment

• Apply any one of the problem-solving strategies listed in Question 0 to one of today’s assigned problems.
• Identify any first principles applicable to this problem, such as Conservation Laws of physics, general
principles of electric circuits, principles of algebra or calculus, etc. (Instructor note: every chapter in
the LIII textbook ends with a section listing some of the fundamental principles applied in that section.)
• Explain how you were able to identify relevant data to solve the problem, and show how to annotate
any illustrations or schematics provided in the problem with this relevant data.
• Identify the most challenging aspect of the problem, and then remove that challenging aspect from the
problem so that it becomes simpler to solve. Instructor: this is often a very useful technique when
someone is “stuck” on a problem and doesn’t know how to tackle it.
• Devise your own “thought experiment” useful for understanding this problem.
• Identify any “limiting cases” (i.e. altering conditions to extremes) that simplify the problem.
• Identify any misconceptions you discovered while solving this problem, and explain how you were able
to identify them as such.
• Sketch a diagram that makes the problem easier to grasp.
• Show how different mathematical formulae link together to give answers to this problem.
• Identify the meaning of all intermediate calculations in your mathematical solution. Each and every
such calculated result should be identifiable in terms of both units of measurement and application to
the problem at hand.
• Instructor: suggest a “thought experiment” for students to perform on the problem at hand.

23
Question 1
Read and outline the introduction and “PLC Examples” sections 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

Answer 1

Notes 1
PLCs are programmable controllers, useful for many different control applications. Originally designed
to replace networks of electromechanical relays. Analog I/O and control capability now common for PLCs in
addition to discrete I/O and control. Ladder Diagram programming resembles electrical schematic diagrams,
to ease the digital transition for electricians who would install and use PLCs.

Some PLCs have modular construction, with circuit “cards” plugging into a rack, while others are
“monolithic” having all I/O built-in to the main body of the unit. Modular construction lends itself to
easy replacement and upgrade of I/O. Semi-modular construction has I/O built into the main unit, plus the
ability to expand I/O by plugging in additional I/O cards. Both processor and I/O typically have visual
indications of mode and status.
PLC hardware is very rugged and reliable, which means it is common to find obsolete PLCs still in use
controlling industrial processes!

Suggestions for Socratic discussion

• Explain what a PLC is, and what one might be good for.
• Describe the difference(s) between a “monolithic” PLC and a “modular” PLC.
• Identify some of the practical PLC control applications mentioned in the book.
→ Wastewater treatment trash rack control (Siemens 505)
→ Gas compressor control (Allen-Bradley PLC-5)
→ High-purity water treatment system (Allen-Bradley SLC 500)
→ Cereal processing system (Allen-Bradley ControlLogix 5000)
→ Hydro power generator control (General Electric Series One)

24
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 PLC’s scan cycle and describe the sequence of operations conducted
by the PLC on an ongoing basis.

Locate the section discussing the PLC’s 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 PLC’s 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 PLC’s 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 PLC’s memory beginning
at byte 105 within the variable memory area. How many bits are contained in a double word?
file i03605

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)

25
Notes 2
The scan cycle is discussed on page 24 (execution of the control program may be halted by placing the
PLC into “Stop” mode):
• Read discrete inputs (analog inputs will be read on scan cycle if filtering enabled, otherwise will be read
immediately within program execution)
• Execute control program
• Communication processing
• Self-diagnostic checks
• Write discrete outputs (analog outputs written immediately within program execution)
A generic scan is shown in graphical form on page 24. A much more detailed diagram of a PLC’s scan
is shown on page 26. Detailed explanations of these steps are found on pages 25 through 27.

Retentive Data Memory used to retain program parameters through a power cycle. Parameters such
as Timer and Counter values may be made retentive. Permanent Memory is also retained through a power
cycle, and stores such data as the user’s program, system values, etc. Interestingly, a memory cartridge may
be installed in the S7-200 PLC to store such things as documentation files (e.g. Adobe .pdf documents!).

The section titled “Accessing the Data of the S7-200” begins on page 27 and ends on page 36. Memory
areas include:
• I = input register
• Q = output register
• V = variable memory
• M = bit memory
• T = timer memory
• C = counter memory
• HC = high-speed counter memory
• AC = accumulator memory
• SM = special memory
• L = local memory (similar to V memory, but with local rather than global scope)
• AI = analog input register
• AQ = analog output register
• S = sequence control memory

A special pair of registers inside the S7-200 PLC (SMB31 and SMW32) can instruct the PLC to save
one value stored in V memory to Permanent memory (the same place where the program is stored).

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)

Suggestions for Socratic discussion

• Page 26 of this manual shows a timing diagram for a typical scan cycle. Examine this diagram and
identify some of the events taking place in this particular scan.
• Explain what an interrupt event is according to the timing diagram shown on page 26.
• How many bits comprise a byte in the S7-200 PLC’s memory?
• How many bits comprise a word in the S7-200 PLC’s memory?
• How many bits comprise a double word in the S7-200 PLC’s memory?

26
• Identify the proper address notation for a “word” of data in the Siemens PLC’s memory beginning at
byte 81 within the variable memory area. VW81
• Identify the proper address notation for a particular bit in the Siemens PLC’s memory: bit number 5
of byte 17 within the variable memory area. V17.5
• Identify the proper address notation for a particular bit in the Siemens PLC’s memory: the output bit
of timer instruction number 2. T2
• Identify the proper address notation for a “word” of data in the Siemens PLC’s memory: the current
value of timer instruction number 44. T44
• Identify the proper address notation for a particular bit in the Siemens PLC’s memory: the output bit
of counter instruction number 8. C8
• Identify the proper address notation for a “word” of data in the Siemens PLC’s memory: the current
value of counter instruction number 12. C12
• Identify the proper address notation for a “word” of data in the Siemens PLC’s memory beginning at
byte 2 within the special memory area. SMB2
• Identify the proper address notation for a particular bit in the Siemens PLC’s memory: bit number 6
of byte 65 within the special memory area. SM65.6

27
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 PLC’s 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 PLC’s 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 PLC’s memory: bit number
4 of element 1 within the input file.

Identify the proper address notation for a particular bit in the Allen-Bradley PLC’s 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 PLC’s memory: the
accumulator word (ACC) of timer number 6 within data file T4.
file i03604

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

28
Notes 3
The scan cycle is discussed on page 4-3 (execution of the control program may be halted by placing the
PLC into “Stop” mode):
• Input scan
• Execute control program
• Output scan
• Communication processing
• Overhead

Page 4-6 discussed EEPROM and RAM memory. EEPROM is non-volatile, storing data such as
retentive data and program files. RAM is volatile, storing both retentive and program data as well as
CPU workspace data, storing data to and reading data from EEPROM memory when necessary.

The section titled “Addressing Data Files” begins on page 4-10 and ends on page 4-14. Memory areas
include:
• O = Output
• I = Input
• S = Status
• B = Bit
• T = Timer
• C = Counter
• R = Control
• N = Integer
A colon symbol (:) is used to delimit files. A period (.) is used to delimit elements within a memory
structure such as a timer file. A forward slash (/) is used to delimit bits within a word.

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

Suggestions for Socratic discussion

• How does the Allen-Bradley PLC’s operating scan differ from the Siemens PLC’s scan cycle?
• Describe the flow of information to/from and within the PLC during such events as powering up, normal
operation, powering down, downloading a program, etc.
• Identify similar memory locations between the Siemens S7-200 PLC and the Allen-Bradley MicroLogix
1000 PLC.
→ Input bits: I for both Siemens and Allen-Bradley
→ Output bits: Q for Siemens and O for Allen-Bradley
→ Internal bits: M for Siemens and B for Allen-Bradley
→ Timer data: T for both Siemens and Allen-Bradley
→ Counter data: C for both Siemens and Allen-Bradley
→ Special data: SM for Siemens and S for Allen-Bradley
• Identify the proper address notation for a particular bit in the Allen-Bradley PLC’s memory: bit number
12 of element 5 within the integer file. N7:5/12
• Identify the proper address notation for a particular bit in the Allen-Bradley PLC’s memory: the “Done”
bit within timer instruction number 2. T4:2/DN
• Identify the proper address notation for a particular word in the Allen-Bradley PLC’s memory: the
“Accumulator” value within timer instruction number 9. T4:9.ACC

29
• Identify the proper address notation for a particular word in the Allen-Bradley PLC’s memory: the
“Accumulator” value within counter instruction number 15. C5:15.ACC

30
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 PLC’s 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 user’s 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 user’s 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

31
line of Allen-Bradley PLCs program so similarly to the MicroLogix line.
This example shows an Allen-Bradley MicroLogix 1000 series PLC (model 1761-L10BWA) wired to two
toggle switches and one LED indicator lamp, complete with a demonstration program. Note that line power
(120 VAC) wire connections to power the PLC have been omitted, so the focus is solely on the I/O wiring:

Toggle switch
24V DC I/0 I/1 I/2 I/3 DC I/4 I/5
COM COM
DC OUT

Allen-Bradley
Power
Run
Fault MicroLogix
1000
Force

85-264 VAC

VAC VAC VAC VAC


L1 L2/N VDC O/0 VDC O/1 VDC O/2 VDC O/3

LED (with dropping resistor)

Ladder-Diagram program written to PLC:

I:0 I:0 O:0

0 1 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 program’s virtual contacts and coil!

32
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

LED (with dropping resistor)

Toggle switch SIEMENS


SIMATIC 1M 1L+ 0.0 0.1 0.2 0.3 0.4 2M 2L+ 0.5 0.6 0.7 1.0 1.1 M L+ DC
S7-200

CPU 224XP
Q0 Q1
DC/DC/DC
SF/DIAG .0 .1 .2 .3 .4 .5 .6 .7 .0 .1
RUN
STOP

.0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .2 .3 .4 .5
I0 I1

1M 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 M L+
Port 1 Port 0

Ladder-Diagram program written to PLC:

I0.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 program’s virtual contacts and coil!

33
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
PWR X4
RUN
RUN C2 LED (with dropping resistor)
ERR STOP Y1
Y2
PORT 1 Y3
TX1 Y4
RX1 +V
AD1V
TX2
RX2
AD1I Toggle switch
AD2V
PORT 2 AD2I
ACOM
PORT 3 RS-485
DA1V
TX3 DA1I
RX3 DA2V
LG
DA2I

0 24V

24 VDC

Ladder-Diagram program written to PLC:

X1 X2 Y1

X2 X1

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 program’s virtual contacts and coil!
file i04513

34
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.

Notes 4
It is recommended that the instructor note which brand and model of PLC each of their students uses
to build their trainer. Future assessments will require students program PLCs different from their own!

Virtual Troubleshooting
This question is a good candidate for a “Virtual Troubleshooting” exercise. Presenting the diagram to
students, you first imagine in your own mind a particular fault in the system. Then, you present one or more
symptoms of that fault (something noticeable by an operator or other user of the system). Students then
propose various diagnostic tests to perform on this system to identify the nature and location of the fault, as
though they were technicians trying to troubleshoot the problem. Your job is to tell them what the result(s)
would be for each of the proposed diagnostic tests, documenting those results where all the students can see.
During and after the exercise, it is good to ask students follow-up questions such as:
• What does the result of the last diagnostic test tell you about the fault?
• Suppose the results of the last diagnostic test were different. What then would that result tell you about
the fault?
• Is the last diagnostic test the best one we could do?
• What would be the ideal order of tests, to diagnose the problem in as few steps as possible?

35
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 PLC’s 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 PLC’s discrete input bits.

Actuate the switches connected to your PLC’s 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 PLC’s 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 real-
time values of multiple addresses within the PLC’s 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 custom-
configure a table showing the real-time values of multiple addresses within the PLC’s memory. Discrete
inputs are the X memory addresses (e.g. X1, X2, etc.).
file i01876

36
Answer 5

Notes 5

37
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 PLC’s 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 PLC’s 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 PLC’s 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 real-
time values of multiple addresses within the PLC’s 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 PLC’s memory. Discrete outputs are the Y memory addresses (e.g. Y1, Y2, etc.).
file i01877

38
Answer 6

Notes 6

39
Question 7
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

Answer 7

Notes 7

• Each input bit in the PLC’s memory will be a “1” when its input channel is powered, and
will be a “0” when its input channel is unpowered
• Each virtual contact shown in the program actuates whenever it reads a “1” state in its
respective bit, and will be at rest whenever it reads a “0” state in its respective bit
• A colored contact is closed (passes virtual power in the PLC program), while an un-colored
contact is open (blocks virtual power in the PLC program)

Contact type

Normally-open Normally-closed

0 (Normal)
(open) (closed)
Bit state
1 (Actuated)
(closed) (open)

An input bit in a PLC’s memory is set to 1 when it is electrically energized. De-energized input bits
are cleared to a value of 0. Therefore, any PLC program contact whose real-world input is de-energized will
be in its resting state.
A chain of causation exists from real-world input energization to contact coloring: energization causes bit
state, which in turn causes virtual contact actuation, which in turn causes colorization (virtual continuity).

PLC program coil colorization works similar: a colored coil writes a 1 to the output bit, turning that
channel on. An un-colored coil writes a 0 to the output bit, turning that channel off.

In the high-pressure alarm system, the PLC performs a “latching” function using a seal-in contact Y5
to keep the alarm lamp energized even after the high-pressure event passes.

40
Suggestions for Socratic discussion

• Challenge students to identify input bit states for any of the illustrations in the book by convering up
the portion of the diagram showing the I/O lamp statuses and switch states, and only showing students
the “live” program view.
• For each of the common misconceptions listed in the book, provide a practical example where that
misconception is proven to be false.
• Explain the functioning of the pressure alarm system PLC program through each step of the system’s
operation (pressure high, pressure low, reset button pressed, etc.).
• Explain why it makes sense to label a virtual contact instruction (in the pressure alarm system) with
an output bit address (Y5).
• Examining the high-pressure alarm PLC system shown near the end of this section, identify the effects
of the Reset switch failing shorted.
• Examining the high-pressure alarm PLC system shown near the end of this section, identify the effects
of the Pressure switch failing open.

41
Prep Quiz:
Suppose two momentary-contact switches are connected to separate input channels of a PLC – a
normally-open switch connected to input X3 and another normally-open switch connected to input X5.
Given the following program running in the PLC, determine the states of output channels Y1 and Y2 with
neither pushbutton pressed:

120 VAC "line" power


L1 L2

X1 L1 L2 Y1
X2 Y2
X3 Y3
(NO contacts) X4 PLC Y4
X5 Y5
(NO contacts) X6 Y6
Programming
Common Source
port

X3 X3 Y1
Personal
computer
display
(Ladder Diagram program)
X5

X3 X5 Y2

No status highlighting shown!

42
Prep Quiz:
Suppose two momentary-contact switches are connected to separate input channels of a PLC – a
normally-open switch connected to input X3 and another normally-open switch connected to input X5.
Given the following program running in the PLC, determine the states of output channels Y1 and Y2 with
neither pushbutton pressed:

120 VAC "line" power


L1 L2

X1 L1 L2 Y1
X2 Y2
X3 Y3
(NO contacts) X4 PLC Y4
X5 Y5
(NO contacts) X6 Y6
Programming
Common Source
port

X3 X3 Y1
Personal
computer
display
(Ladder Diagram program)
X5

X3 X5 Y2

No status highlighting shown!

43
Prep Quiz:
Suppose two momentary-contact switches are connected to separate input channels of a PLC – a
normally-open switch connected to input X3 and another normally-open switch connected to input X5.
Given the following program running in the PLC, determine the states of output channels Y1 and Y2 with
neither pushbutton pressed:

120 VAC "line" power


L1 L2

X1 L1 L2 Y1
X2 Y2
X3 Y3
(NO contacts) X4 PLC Y4
X5 Y5
(NO contacts) X6 Y6
Programming
Common Source
port

X3 X3 Y1
Personal
computer
display
(Ladder Diagram program)
X5

X3 X5 Y2

No status highlighting shown!

44
Question 8
Analyze the status of all relay contacts and lamps in this hard-wired relay “ladder logic” control circuit:

L1 120 VAC L2

PBNO "A" CR1

Pressure switch CR2

Selector switch CR3


Left Right

CR2 CR1 CR4

CR3 CR2 Red

CR1

CR4 CR3 Green

Assume the following input conditions:


• Pushbutton switch unpressed
• Pressure above trip threshold
• Selector switch in its right-hand position

45
Now, analyze the status of this PLC-controlled system assuming the same input conditions. Note the
distinction between the 120 VAC circuitry and the “virtual circuit” in the blue-shaded area representing the
program executed by the PLC’s microprocessor:

L1 120 VAC L2

PBNO "A" X1

PLC input card X2


Pressure switch

Selector switch X3
Left Right

X2 X1 C4

X3 X2 Y1

X1
PLC program

C4 X3 Y2

Y1 Red

PLC output card

Y2 Green

• Pushbutton switch unpressed


• Pressure above trip threshold
• Selector switch in its right-hand position
How is the PLC-controlled system similar to the hard-wired relay control system? How is it different?

file i02605

46
Answer 8
A good problem-solving technique to apply in both diagrams is annotation, where you indicate the
presence of continuity and power versus non-continuity/unpowered. In PLC programs this usually appears
in the form of color-highlighting surrounding each instruction symbol (virtual contact or virtual coil).

Notes 8
Analysis of hard-wired relay control circuit:

L1 120 VAC L2

PBNO "A" (unpressed) CR1


= continuity/power

= no continuity / no power
Pressure switch (high pressure) CR2

Selector switch (right) CR3


Left Right

CR2 CR1 CR4

CR3 CR2 Red


(LIT)

CR1

CR4 CR3 Green


(UNLIT)

47
Analysis of PLC-controlled circuit:

L1 120 VAC L2

PBNO "A" (unpressed) X1


= continuity/power

(high pressure) = no continuity / no power


PLC input card X2
Pressure switch

Selector switch (right) X3


Left Right

X2 X1 C4

X3 X2 Y1
(color) = virtual continuity/power

(no color) = no virtual continuity/


X1 no virtual power
PLC program

C4 X3 Y2

Y1 Red
(LIT)

PLC output card

Y2 Green
(UNLIT)

48
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:

Discrete input module Discrete input module

X0 Com
X0

X1
X1

X2
X2

X3
Com X3

Discrete output module Discrete output module

Com Y0
Y0

Y1
Y1

Y2
Y2

Y3
Y3 Com

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

49
Answer 9

Notes 9
Optocouplers use LEDs and phototransistors to couple discrete data from input to output optically,
so there is no galvanic connection between input and output circuits. This is useful in a PLC, so that the
sensitive circuitry of a PLC’s processor shares no electrical connections with the real-world inputs.
TRIACs are thyristor devices used to switch AC power. Once triggered, they latch “on” until the
current is externally halted, such as when current passes through 0 every half-cycle of an AC waveform.

The key to understanding each designation is to draw an arrow for conventional flow at each I/O terminal
(excluding the “Common” terminal). An outward-pointing arrow (away from the module) represents sourcing
I/O. An inward-pointing arrow (toward the module) represents sinking I/O.

Discrete input module Discrete input module

X0 Com
X0

X1
X1

X2
X2

X3
Com X3

Sinking Sourcing

Discrete output module Discrete output module

Com Y0
Y0

Y1
Y1

Y2
Y2

Y3
Y3 Com

Sourcing Sinking

A sourcing module needs to connect to a sinking device, and vice-versa.

50
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:
• Contacts and coils
• Counters (up, down, up/down)
• Timers (on-delay, off-delay, retentive)
• Sequencing instructions
• Math instructions (add, subtract, multiply, divide)
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 instruction’s properties and behavior
by creating a simple program in your PLC with nothing but that instruction. Your PLC’s 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 PLC’s 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

51
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 PC’s 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

52
Demonstration program showing “up” and “down” counter instructions in an Allen-Bradley
MicroLogix PLC:

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 CU

Counter C5:0
DN
Preset 12
Accum 5

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 CD

Counter C5:0
DN
Preset 12
Accum 5

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 instruction’s "Accumulated" value back to zero.

I:0/2 C5:0
RES

53
Demonstration program showing an on-delay timer instruction in an Allen-Bradley MicroLogix
PLC:

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 EN

Timer T4:0
DN
Time Base 1.0
Preset 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

Notes 10

54
Summary Quiz:
This exercise makes an excellent summary quiz: having the student show at least one of their new
demonstration programs, fully commented and operating. Encourage them to be verbose in their comments,
making the rung comments so clear and illustrative that anyone reading it will be able to learn how that
instruction functions. Ask them to literally demonstrate what they have learned about the various instructions
by running their programs and narrating what they see the instructions doing when viewed online (with status
coloring and numerical values shown live).

Remind students that you (as the instructor) will have them refer to their demonstration programs if
they ever encounter trouble using a particular instruction in the future. The point of doing this is to instill
the good habit of writing demonstration programs for self-directed PLC learning as well as ensure that their
demonstration programs are documented completely enough to be useful in addressing future questions and
problems they may have.

In my experience as a teacher, most students strongly resist writing demontration programs, thinking
such exercises are a waste of time, and that they will learn better by having someone simply tell them how
a particular PLC instruction functions. What actually happens if an instructor directly tells a student how
to use an instruction, however, is that the student(s) almost always return to the instructor asking for the
same help again in the future (because they didn’t really learn the last time). When students have learned
to write their own demonstration programs, they have learned how to teach themselves PLC programming,
which is a far more valuable and longer-lasting acquisition than any targeted programming help you as their
instructor could possibly dispense to them.

55
Question 11
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

Suggestions for Socratic discussion

• Describe some of the “special” memory locations you find in your search, and comment on how some
of them might be useful.
• One of the useful bits provided by many PLCs is a “flashing” bit that simply turns on and off at regular
intervals. How many of these bits can you find in your PLC’s memory, and how rapidly does each one
oscillate?

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

56
Answer 11

Notes 11

57
Question 12
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 Output_3

Input_switch_1 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.

Suggestions for Socratic discussion

• How are discrete input and output points associated with contacts and coils in the ladder-logic program?
• How do you draw vertical connecting lines in the ladder-logic program?
• How do you assign “alias” names to inputs and outputs for easier program readability? For example,
how do you assign an English name to the input I:2/4 (Input channel 4 on card 2) on an Allen-Bradley
SLC 500 PLC so that it reads as “Input switch 4” in the program instead of “I:2/4” in the programming
software’s display?
• Where is the software function (pull-down menu option, button, hot-key, etc.) located that allows you
to turn on contact status highlighting in the PLC programming software?
file i03667

58
Answer 12

Notes 12
I strongly recommend students save all their “exploratory” PLC programs for future reference,
commenting them liberally and saving them with special filenames for easy searching at a later date!

I also recommend presenting these “exploratory” programs as problems for students to work on in class
for a short time period, then soliciting screenshot submissions from students (on flash drive, email, or some
other electronic file transfer method) when that short time is up. The purpose of this is to get students
involved in PLC programming, and also to have them see other students’ solutions to the same problem.
These screenshots may be emailed back to students at the conclusion of the day so they have other students’
efforts to reference for further study.

59
Question 13
Suppose we have an Allen-Bradley MicroLogix 1000 PLC connected to three momentary-contact
pushbutton switches as shown in this illustration:

A 24V DC I/0 I/1 I/2 I/3 DC I/4 I/5


COM COM
DC OUT

B Power
Run
Fault
Force
C
85-264 VAC

VAC VAC VAC VAC


L1 L2/N VDC O/0 VDC O/1 VDC O/2 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

Answer 13
Bit statuses:
• I:0/0 = 1
• I:0/1 = 0
• I:0/2 = 1

Notes 13

60
Question 14
Suppose we have a Siemens S7-200 PLC connected to two process switches as shown in this illustration:

24 VDC

SIEMENS
SIMATIC 1M 1L+ 0.0 0.1 0.2 0.3 0.4 2M 2L+ 0.5 0.6 0.7 1.0 1.1 M L+ DC
S7-200

CPU 224XP
Q0 Q1
DC/DC/DC
SF/DIAG .0 .1 .2 .3 .4 .5 .6 .7 .0 .1
RUN
STOP

.0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .2 .3 .4 .5
I0 I1

1M 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 M L+
Port 1 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

Answer 14
Bit statuses:
• I0.2 = 1
• I1.1 = 0

Notes 14

61
Question 15
Suppose we have an Allen-Bradley SLC 500 PLC connected to two process switches as shown in this
illustration:

Slot 0 Slot 1 Slot 2 Slot 3


(processor) (discrete input) (discrete input) (discrete output)

Processor Input Input Output


Power 0 4 0 4 0 4

supply 1
2
3
5
6
7
1
2
3
5
6
7
1
2
3
5
6
7

IN0 IN0 VAC 1


IN1 IN1 OUT0
IN2 IN2 OUT1
IN3 IN3 OUT2
IN4 IN4 OUT3
IN5 IN5 VAC 2

120 VAC L1 IN6 IN6 OUT4


IN7 IN7 OUT5
power L2/N
COM COM OUT6
Gnd COM COM OUT7

3 feet

37 PSI 88 oF

Determine the process conditions necessary to generate the following input bit statuses in the PLC’s
memory:
• I:1/3 = 1

• I:1/5 = 0
file i01872

Answer 15
L > 3 feet, P > 37 PSI, and T < 88o F

Notes 15

62
Question 16
Examine this “live” display of a Siemens S7-300 PLC’s 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

Answer 16

• I0.2 = 0
• I0.5 = 1
• I1.1 = 0
• Q0.1 = 1
• Q0.6 = 0

Notes 16

63
Question 17
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 A
X1
X2
X3 B
PWR X4
RUN C2
RUN
ERR STOP Y1
Y2 C
PORT 1 Y3

TX1 Y4

RX1 +V
AD1V
TX2 AD1I
RX2 AD2V
PORT 2 AD2I
ACOM
PORT 3 RS-485
DA1V

TX3 DA1I

RX3 DA2V
LG
DA2I

0 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 PLC’s Y1 output.
file i01874

Answer 17
Switch statuses:
• Switch A = released
• Switch B = pressed
• Switch C = released
The lamp will be energized.

Notes 17

64
Question 18
Explain the function of this light-switching circuit, tracing the directions of all currents when the switch
closes:

file i01000

Answer 18

All currents shown using


conventional flow notation

Notes 18

65
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

66
Answer 19

Circuit 1 This will work! Circuit 2 This will work!

Load Load

Circuit 3 This circuit is bad Circuit 4 This circuit is bad

Load

Load

Notes 19

67
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

68
Answer 20

Circuit 1 This circuit is bad Circuit 2 This will work!

Load

Load

Circuit 3 This circuit is bad Circuit 4 This will work!

Load

Load

Notes 20

Virtual Troubleshooting
This question is a good candidate for a “Virtual Troubleshooting” exercise. Presenting the diagram to
students, you first imagine in your own mind a particular fault in the system. Then, you present one or more
symptoms of that fault (something noticeable by an operator or other user of the system). Students then
propose various diagnostic tests to perform on this system to identify the nature and location of the fault, as
though they were technicians trying to troubleshoot the problem. Your job is to tell them what the result(s)
would be for each of the proposed diagnostic tests, documenting those results where all the students can see.
During and after the exercise, it is good to ask students follow-up questions such as:
• What does the result of the last diagnostic test tell you about the fault?
• Suppose the results of the last diagnostic test were different. What then would that result tell you about
the fault?
• Is the last diagnostic test the best one we could do?
• What would be the ideal order of tests, to diagnose the problem in as few steps as possible?

69
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
doesn’t have to do anything useful, but merely demonstrate what each instruction does. First, read
the appropriate section in your PLC’s 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 program’s 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

70
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 PC’s 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!

71
Notes 21
Contacts and coils in a Ladder Diagram PLC program are instructions to the PLC’s processor to read and
write discrete data, respectively. These instructions must be referenced to locations in the PLC’s memory.
We may refer to I/O memory registers by hardware location references, or by symbolic addresses where we
get to name each input and output according to its real-world function.

Series-connected contacts perform an AND function, while parallel-connected contacts form an OR


function.

Two-out-of-Three (2oo3) flame sensor program example. Motor starter control program example.

It is perfectly okay to use a contact instruction on an output memory bit, since a contact is nothing
more than a command for the PLC to read that bit in memory. What would be odd is to try to associate a
coil (wrote instruction) with an input bit.

PLCs scan their Ladder Diagrams from left to right, top to bottom, like reading English on a page. All
inputs to a function must be evaluated by the PLC before setting the output status.

“Fail safe” motor control requires that the Stop pushbutton be physically wired normally-closed (NC),
with its corresponding program contact drawn as normally-open (NO). The NO contact instruction will be
typically colored, because the NC Stop pushbutton is typically unpressed and therefore typically sending
power to the input of the PLC (thus setting that bit to 1 and actuating the virtual contact in the program).

Another “fail safe” feature is to wire an auxiliary contact to its own input on the PLC, then use that
input bit to seal-in the logic. This way, if anything happens in the physical circuit to de-energize the contactor
(e.g. an OL tripping, a wire coming loose), the PLC program will unlatch and stop trying to energize the
contactor. This way, when the problem is fixed the motor won’t immediately start up again, but rather will
wait until the operator presses the “Start” button.

Retentive coil instructions (Set and Reset) write to their memory bits when colored, but do nothing
when uncolored, allowing the bit to latch in its last state. These may be used to make a motor start/stop
program without using a seal-in contact for latching. While multiple coil (write) instructions bearing the
same address is typically a bad idea, it’s necessary when the coils in question are retentive.
PLCs typically energize their real-world outputs at the very end of the program scan, so only that last
bit states written to memory will be sent to the real outputs. This is important when considering the effects
of multiple coil instructions addressed to the same bit, all colored. Multiple contact instructions with the
same address are perfectly okay, because there will be no memory conflict by reading multiple times.

Transition-sensing contact instructions are like one-shot monostable multivibrator circuits: they act for
one scan of the program only, either on a positive transition (from 0 to a 1) or on a negative transition (from
1 to a 0). PLC scan times are typically in the millisecond range.

72
Suggestions for Socratic discussion

• Explain how the 2oo3 flame detection system shown in the book works.
• Explain how you could alter this 2oo3 flame detection system to make it a 1oo3 detection system instead
(requiring only one sensor to detect flame in order to energize the lamp).
• Explain how you could alter this 2oo3 flame detection system to make it a 3oo3 detection system instead
(requiring all three sensors to detect flame in order to energize the lamp).
• Explain how you could alter this 2oo3 flame detection system to equip it with one more output, indicating
if any of the three sensors failed to detect a flame (as a maintenance alert).
• Explain why the stop pushbutton in the “fail-stop” motor control system shown in the book is wired
normally-closed (NC) instead of normally-open (NO), and how the PLC program’s corresponding virtual
contact complements the real-life switch.
• Identify the misconception in this statement: “PLC contact instructions are always associated with
discrete inputs and PLC output instructions always with discrete outputs.”
• Explain why the final version of this motor control system connects an auxiliary contact from the starter
to an input on the PLC, using that as the seal-in rather than an internal bit in the PLC’s memory as
the seal-in.
• Explain how retentive (latching) coil instructions behave differently from non-retentive coil instructions.
• What happens in a PLC if identically-addressed coils are activated such that they attempt to write
conflicting bit states to the same address?
• If you have access to your own PLC for experimentation, demonstrate the function of retentive coil
instructions in your own “demonstration” program.
• Explain how a “transition-sensing” PLC contact instruction works, and why we might wish to use one.

73
Prep Quiz:
The reason most motor control PLC systems use a normally-closed “Stop” pushbutton switch combined
with a corresponding normally-open contact instruction in the program is so that:
• The PLC program will be easier for a technician to understand and diagnose
• Any “open” wiring fault in the Stop pushbutton circuit will keep the motor running
• The system will be less likely to fail, resulting in less down-time
• Any “shorted” wiring fault will not result in an unsafe operating condition
• Any “open” wiring fault in the Stop pushbutton circuit will stop the motor
• The motor control will successfully “seal in” and latch when started up

74
Prep Quiz:
The purpose of wiring an auxiliary contact on a motor contactor to one if the input channels of a PLC
controlling that motor, and using that auxiliary contact signal as a “seal-in” is to ensure:
• There will never be a condition when multiple coils in the program conflict with each other
• Any “open” wiring fault in the Stop pushbutton circuit will keep the motor running
• Any “open” wiring fault in the Stop pushbutton circuit will immediately stop the motor
• The PLC’s output will remain “on” even if the motor loses three-phase electrical power
• The “forward” and “reverse” contactors may never be simultaneously energized by the PLC
• The PLC’s output will not latch “on” if the contactor fails to energize for any reason

75
Prep Quiz:
The purpose of a retentive coil instruction is to:
• “Remember” the last state of the overload contact in a motor control program
• Write a bit state when activated, and allow that bit to remain latched when not
• Prevent the possibility of two coil instructions writing to the same address
• Always write to a bit in memory, whether activated or not by “virtual power”
• Permit multiple contact instructions to reference the exact same bit in memory
• Provide a way to “reset” an abnormal fault code in the PLC’s memory

76
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 PLC’s program given these bit statuses, also
determining the status of output bit Y1:

X1 X2 X3 Y1

X2 X1

Suggestions for Socratic discussion

• PLC training expert Ron Beaufort teaches students to think of a “normally-open” PLC program contact
instruction as a command to the PLC’s processor to “Go look for a 1”. Conversely, he teaches students
to think of a “normally-closed” instruction as a command to “Go look for a 0”. Explain what Mr.
Beaufort means by these phrases, and how this wisdom relates to this particular problem. Incidentally,
Mr. Beaufort’s excellent instructional videos (available freely on YouTube) are quite valuable to watch!
• Identify the significance of the labels “X” and “Y” for this PLC’s bits. What do you suppose “X”
signifies? What do you suppose “Y” signifies?
• Sketch a logic gate diagram implementing the same function as this PLC program.
file i04688

Answer 22

X1 X2 X3 Y1

X2 X1

• Y1 = 1

Notes 22

77
Question 23
Examine this “live” display of a Siemens S7-300 PLC’s 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 = ???

Suggestions for Socratic discussion

• PLC training expert Ron Beaufort teaches students to think of a “normally-open” PLC program contact
instruction as a command to the PLC’s processor to “Go look for a 1”. Conversely, he teaches students
to think of a “normally-closed” instruction as a command to “Go look for a 0”. Explain what Mr.
Beaufort means by these phrases, and how this wisdom relates to this particular problem. Incidentally,
Mr. Beaufort’s excellent instructional videos (available freely on YouTube) are quite valuable to watch!
• Identify the significance of the labels “I” and “Q” for this PLC’s bits. What do you suppose “I” signifies?
What do you suppose “Q” signifies?
file i04689

Answer 23

• I0.7 = 0
• I1.1 = 1
• Q0.1 = 0
• Q0.3 = 1

Notes 23

78
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:

Slot 0 Slot 1 Slot 2 Slot 3


(processor) (discrete input) (unused) (discrete output)

Processor Input Output


Power 0 4 0 4

supply 1
2
3
5
6
7
1
2
3
5
6
7

IN0 VAC 1
IN1 OUT0
IN2 OUT1
IN3 OUT2
IN4 OUT3
IN5 VAC 2

120 VAC L1 IN6 OUT4


IN7 OUT5
power L2/N
COM OUT6
Gnd COM OUT7

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

2 6 0

I:1 I:1 O:3

2 6 4
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 PLC’s 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

79
Answer 24
Neither output will activate to energize either lamp.

Notes 24

I:1 I:1 O:3

2 6 0

I:1 I:1 O:3

2 6 4

80
Question 25
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 I/0 I/1 I/2 I/3 DC I/4 I/5


COM COM
DC OUT

"Stop" switch Power


Run
Fault
Force
OL contact
85-264 VAC

VAC VAC VAC VAC


L1 L2/N VDC O/0 VDC O/1 VDC O/2 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 real-
world 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.

81
file i04662

Answer 25
Here are just a couple of possible problems to account for what we are seeing. There are definitely more
possible faults than what are listed here:
• Overload contact tripped (open)
• Wire connecting “Stop” switch to OL contact failed open

Notes 25
The missing color in this PLC program is contact I:0/3, which is associated with the overload contact.
Since the NO virtual contact is uncolored, its bit state must be 0. This means the real-world OL contact
must be open (tripped), or some other open fault in the circuit causing that input to be de-energized.

Here is a more comprehensive list of possible faults:


• Overload contact tripped (open)
• Wire connecting OL contact to I:0/3 failed open
• Wire connecting “Stop” switch to OL contact failed open
• Input channel I:0/3 defective on the PLC

82
Question 26
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
480 VAC 3-θ supply
supply SIEMENS
SIMATIC 1M
1L 1L+
0.0 0.1
0.0 0.2
0.1 0.3
0.2 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 L+
L1 AC
DC
S7-200

CPU 224XP
Q0 Q1
DC/DC/DC
AC/DC/Relay
SF/DIAG .0 .1 .2 .3 .4 .5 .6 .7 .0 .1
RUN
STOP

.0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .2 .3 .4 .5
I0 I1

1M 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 M L+
Port 1 Port 0

Start Stop

However, despite being wired identically, the two technicians’ PLC programs are quite different. Jill’s
program uses retentive coil instructions (“Set” and “Reset” coils) while Bob’s uses a “seal-in” contact
instruction to perform the function of latching the motor on and off:

Jill’s PLC program Bob’s PLC program


I0.1 Q0.0 I0.1 I0.4 Q0.0
S

I0.4 Q0.0 Q0.0


R

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 Jill’s 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.

83
• 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

Answer 26

Notes 26
Jill’s program uses retentive coil instructions (Set and Reset), while Bob’s program uses standard coil
instructions.

84
Question 27
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 PLC’s 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 won’t have textbooks to follow
or training to show you exactly what to do.

Write such a “demonstration” program for your PLC’s 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. For a contact and coil demonstration program, this includes normally-
open and normally-closed contact instructions, as well as regular and retentive coil instructions.
• Clearly documented – every rung clearly commented in your own words, every variable named
Your instructor will challenge you to use this demonstration program to illustrate what you have learned
about PLC counter instructions.

Suggested questions your demonstration program should answer:

• Identify the different contact instruction types offered on your PLC. Describe how each of them functions.
• Identify the different coil instruction types offered on your PLC. Describe how each of them functions.
• What happens when two contact instructions are linked to the same bit address in the PLC’s memory?
Do these contact instructions operated differently, or identically?
• What happens when two coil instructions are linked to the same bit address in the PLC’s memory, but
driven to different states (e.g. one “energized” and the other “de-energized”)?
• Does your PLC offer a special type of contact or other bit-level instruction to detect the transistion of
a bit from one state to another? If so, how is this instruction used?
• Where in the PLC’s memory are the single-bit registers (e.g. input registers, output registers, and
internal bit registers) located? What symbol(s) are used to address each one?
• Where in the PLC programming editor can you view the “live” status of contact and coil bits?
• Experiment with using the force utility in your PLC to force certain bits to fixed values regardless of
program operation. How will the operation of your program be affected if a particular input bit is
forced? How will the operation of your program be affected if a particular output bit is forced? How
can you tell from the live program display that bits have been forced to fixed values?
file i03354

Answer 27
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.

85
Notes 27
Summary Quiz:
The recommended summary quiz is to have each student demonstrate their PLCs running this
demonstration program. Demonstration programs should not be accepted unless and until they meet all three
criteria listed in the question: they need to be simple (no extraneous features), complete (demonstrating all
the necessary instructions), and thoroughly documented in the student’s own words (every rung commented
intelligently, every variable named).

When checking students’ demonstation programs, have them run the programs with their laptop PCs
in online mode so they can view status highlighting and numerical values live, and ask them to provide a
running commentary of what they see the instructions doing. If their commentary is lacking, challenge them
to explore instruction behaviors that they have not yet done. Refer to the “suggested questions” for specific
ideas on instruction behavior that may be explored in a demonstration program.

This is by far the most important PLC program students will write today. If there are other programs
assigned in this day’s plan, prioritize this one. This point bears mentioning because a common error students
make is to disregard the importance of a well-written demo program, instead tending to treat it as “busywork”
and move on to “more important” assignments. As the instructor your task is to explain why demonstration
programs are important and to ensure students take them seriously:
• Demonstration programs are a powerful tool for self-instruction later when graduates will be challenged
to learn some new PLC system.
• Demonstration programs may be re-run at a later date, which makes them ideal tools for review near
the conclusion of the course.
• Demonstration programs require students to scientifically observe the PLC’s programmed behavior,
learning by experiment rather than learning by direct instruction.
• Well-written comments demand critical reflection on the part of the student, and also serve as practice
for technical expression.

86
Sample demonstration program for coil and contact instructions: (for an Allen-Bradley MicroLogix
PLC, showing only basic XIO, XIC, and OUT instructions; no retentive coils or special contacts shown)

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 PC’s 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

87
Question 28
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
SIMATIC 1M 1L+ 0.0 0.1 0.2 0.3 0.4 2M 2L+ 0.5 0.6 0.7 1.0 1.1 M L+ DC
S7-200

CPU 224XP
Q0 Q1
DC/DC/DC
SF/DIAG .0 .1 .2 .3 .4 .5 .6 .7 .0 .1
RUN
STOP

.0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .2 .3 .4 .5
I0 I1

1M 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 M L+
Port 1 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

88
Answer 28
If both switches are pressed, switch A will be closed (I1.2 = 1) and switch B will be open (I0.7 = 0),
leading to this condition of the program:

I1.2 I0.7 Q0.1

I0.7 I1.2 Q0.3

Neither output will activate, resulting in both lamps de-energized.

Notes 28

89
Question 29
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 A
X1
X2
X3 B
PWR X4
RUN C2
RUN
ERR STOP Y1
Y2 C
PORT 1 Y3

TX1 Y4

RX1 +V
AD1V
TX2 AD1I
RX2 AD2V
PORT 2 AD2I
ACOM
PORT 3 RS-485
DA1V

TX3 DA1I

RX3 DA2V
LG
DA2I

0 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

Suggestions for Socratic discussion

• Identify the significance of the labels “X” and “Y” for this PLC’s bits. What do you suppose “X”
signifies? What do you suppose “Y” signifies?
file i04638

90
Answer 29
In order for the lamp to energize, virtual coil Y1 must be colored. In order to color this coil instruction,
virtual contact X3 must be colored, and either virtual contacts X1 or X2 must be colored. Since the X3
contact is NO and both X1 and X2 contacts are NC, this requires input X3 to be powered, and either input
X1 or X2 to be unpowered.

Thus, NO pushbutton “C” must be pressed, and either NO pushbutton “A” released or NC pushbutton
“B” pressed:
• Switch A = released or Switch B = pressed
• Switch C = pressed

Notes 29

91
Question 30
Suppose we have an Allen-Bradley MicroLogix 1000 PLC connected to three momentary-contact
pushbutton switches as shown in this illustration:

A 24V DC I/0 I/1 I/2 I/3 DC I/4 I/5


COM COM
DC OUT

B Power
Run
Fault
Force
C
85-264 VAC

VAC VAC VAC VAC


L1 L2/N VDC O/0 VDC O/1 VDC O/2 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

Answer 30
Bit statuses:
• I:0/0 = 0
• I:0/1 = 0
• I:0/3 = 1

Notes 30

92
Question 31
Suppose we have a Siemens S7-200 PLC connected to two process switches as shown in this illustration:

24 VDC

SIEMENS
SIMATIC 1M 1L+ 0.0 0.1 0.2 0.3 0.4 2M 2L+ 0.5 0.6 0.7 1.0 1.1 M L+ DC
S7-200

CPU 224XP
Q0 Q1
DC/DC/DC
SF/DIAG .0 .1 .2 .3 .4 .5 .6 .7 .0 .1
RUN
STOP

.0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .2 .3 .4 .5
I0 I1

1M 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 M L+
Port 1 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

Answer 31
Bit statuses:
• I0.2 = 0
• I1.1 = 0

Notes 31

93
Question 32
Suppose we have an Allen-Bradley SLC 500 PLC connected to two process switches as shown in this
illustration:

Slot 0 Slot 1 Slot 2 Slot 3


(processor) (discrete input) (discrete input) (discrete output)

Processor Input Input Output


Power 0 4 0 4 0 4

supply 1
2
3
5
6
7
1
2
3
5
6
7
1
2
3
5
6
7

IN0 IN0 VAC 1


IN1 IN1 OUT0
IN2 IN2 OUT1
IN3 IN3 OUT2
IN4 IN4 OUT3
IN5 IN5 VAC 2

120 VAC L1 IN6 IN6 OUT4


IN7 IN7 OUT5
power L2/N
COM COM OUT6
Gnd COM COM OUT7

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

Answer 32
Bit statuses:
• I:1/3 = 1
• I:1/5 = 0

Notes 32

94
Question 33
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 Siren

Acknowledge_input Alarm_input 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

95
Answer 33

Notes 33
I strongly recommend students save all their PLC programs for future reference, commenting them
liberally and saving them with special filenames for easy searching at a later date!

I also recommend presenting these programs as problems for students to work on in class for a short time
period, then soliciting screenshot submissions from students (on flash drive, email, or some other electronic
file transfer method) when that short time is up. The purpose of this is to get students involved in PLC
programming, and also to have them see other students’ solutions to the same problem. These screenshots
may be emailed back to students at the conclusion of the day so they have other students’ efforts to reference
for further study.

96
Question 34
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 conveyor’s 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
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)

Suggestions for Socratic discussion

• How do you keep the motor “latched” on when the momentary “Start” switch is released?
• Which is simpler: implementing this function using normal program coils, or implementing this function
using retentive coils (“set” and “reset”, or “latch” and “unlatch”)?

file i02340

97
Answer 34
Two different program solutions:

Stop_switch Start_switch Estop_cable_switch Motor_run

Motor_run

Start_switch Motor_run

Stop_switch Motor_run

Estop_cable_switch

Notes 34

98
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

99
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 1 This circuit will work! Circuit 2 This circuit is bad Circuit 3 This circuit is bad

Circuit 4 This circuit is bad Circuit 5 This circuit will work! Circuit 6 This circuit is bad

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 switch’s state.

Notes 35

Virtual Troubleshooting
This question is a good candidate for a “Virtual Troubleshooting” exercise. Presenting the diagram to
students, you first imagine in your own mind a particular fault in the system. Then, you present one or more
symptoms of that fault (something noticeable by an operator or other user of the system). Students then
propose various diagnostic tests to perform on this system to identify the nature and location of the fault, as
though they were technicians trying to troubleshoot the problem. Your job is to tell them what the result(s)
would be for each of the proposed diagnostic tests, documenting those results where all the students can see.
During and after the exercise, it is good to ask students follow-up questions such as:
• What does the result of the last diagnostic test tell you about the fault?
• Suppose the results of the last diagnostic test were different. What then would that result tell you about
the fault?
• Is the last diagnostic test the best one we could do?
• What would be the ideal order of tests, to diagnose the problem in as few steps as possible?

100
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

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!

Notes 36

101
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

Answer 37

Contact
points

Notes 37

102
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
Transistor sinking
Switch sinking current current from load
Switch sourcing current Transistor sourcing from transistor
to transistor current to load

Load

file i01007

103
Answer 38

+V +V +V

Load
NPN Transistor sinking
Switch sinking current current from load
Switch sourcing current Transistor sourcing from transistor
to transistor current to 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

Notes 38

104
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

Transistor sourcing
+V Switch sinking current current to load
Load from transistor

Switch sourcing current Transistor sinking


to transistor current from load
Load

Also, explain why resistors are necessary in both these circuits for the transistors to function without
being damaged.
file i01008

105
Answer 39

+V +V

Switch sinking current


+V from transistor
Load
Transistor sinking PNP
current from load
Transistor sourcing
current to load
NPN
Switch sourcing current Load
to transistor

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

Notes 39

106
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
SIMATIC 1M 1L+ 0.0 0.1 0.2 0.3 0.4 2M 2L+ 0.5 0.6 0.7 1.0 1.1 M L+ DC
S7-200

CPU 224XP
Q0 Q1
DC/DC/DC
SF/DIAG .0 .1 .2 .3 .4 .5 .6 .7 .0 .1
RUN
STOP

.0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .2 .3 .4 .5
I0 I1

1M 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 M L+
Port 1 Port 0

Lamp Switch A

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 Switch B Light Bulb


Unpressed Unpressed
Unpressed Pressed
Pressed Unpressed
Pressed Pressed

107
file i03360

Answer 40

Switch A Switch B Light Bulb


Unpressed Unpressed Off
Unpressed Pressed Off
Pressed Unpressed On
Pressed Pressed On

Note how Switch B has no effect on the PLC’s 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 rung’s 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.

Notes 40

108
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
SIMATIC 1M 1L+ 0.0 0.1 0.2 0.3 0.4 2M 2L+ 0.5 0.6 0.7 1.0 1.1 M L+ DC
S7-200

CPU 224XP
Q0 Q1
DC/DC/DC
SF/DIAG .0 .1 .2 .3 .4 .5 .6 .7 .0 .1
RUN
STOP

.0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .2 .3 .4 .5
I0 I1

1M 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 M L+
Port 1 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

109
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.

Notes 41
Output Q0.3 will activate to energize lamp Z, but the other output (and lamp) will remain off.

The inputs on this Siemens S7-200 PLC are sinking, while the outputs are sourcing.

110
Prep Quiz:
Determine the statuses of the blue and yellow lamps, assuming pushbuttons A and B are being pressed,
and pushbutton C is not. Note that this is an “offline” display of the PLC’s program, where no status
highlighting is shown:

Pictorial wiring diagram


Ladder-diagram PLC program
C0-02DD1-D
CLICK
Koyo
C1 A
X1
X2 X1 X3 Y1
X3 B
PWR X4
RUN C2
RUN
ERR STOP Y1
Y2 C
PORT 1 Y3

TX1 Y4
+V X2 X1 Y2
RX1
AD1V
Blue
TX2 AD1I
RX2 AD2V
PORT 2 AD2I Yellow
ACOM
PORT 3 RS-485
DA1V

TX3 DA1I
RX3 DA2V
LG
DA2I

0 24V

24 VDC

111
Prep Quiz:
Determine the statuses of the blue and yellow lamps, assuming pushbuttons A and C are being pressed,
and pushbutton B is not. Note that this is an “offline” display of the PLC’s program, where no status
highlighting is shown:

Pictorial wiring diagram


Ladder-diagram PLC program
C0-02DD1-D
CLICK
Koyo
C1 A
X1
X2 X1 X3 Y1
X3 B
PWR X4
RUN C2
RUN
ERR STOP Y1
Y2 C
PORT 1 Y3

TX1 Y4
+V X2 X1 Y2
RX1
AD1V
Blue
TX2 AD1I
RX2 AD2V
PORT 2 AD2I Yellow
ACOM
PORT 3 RS-485
DA1V

TX3 DA1I
RX3 DA2V
LG
DA2I

0 24V

24 VDC

112
Prep Quiz:
Determine the statuses of the blue and yellow lamps, assuming pushbuttons B and C are being pressed,
and pushbutton A is not. Note that this is an “offline” display of the PLC’s program, where no status
highlighting is shown:

Pictorial wiring diagram


Ladder-diagram PLC program
C0-02DD1-D
CLICK
Koyo
C1 A
X1
X2 X1 X3 Y1
X3 B
PWR X4
RUN C2
RUN
ERR STOP Y1
Y2 C
PORT 1 Y3

TX1 Y4
+V X2 X1 Y2
RX1
AD1V
Blue
TX2 AD1I
RX2 AD2V
PORT 2 AD2I Yellow
ACOM
PORT 3 RS-485
DA1V

TX3 DA1I
RX3 DA2V
LG
DA2I

0 24V

24 VDC

113
Question 42
Suppose we have a Koyo “CLICK” PLC connected to three process switches as shown in this illustration:

C0-02DD1-D
CLICK
Koyo
C1 30 PSI
X1
X2
X3
150 oF
PWR X4
RUN C2
RUN
ERR STOP Y1
Y2 4 inches
PORT 1 Y3

TX1 Y4

RX1 +V
AD1V
TX2 AD1I
RX2 AD2V
PORT 2 AD2I
ACOM
PORT 3 RS-485
DA1V

TX3 DA1I

RX3 DA2V
LG
DA2I

0 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 PLC’s 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

Answer 42
Partial answer:
• Temperature switch = cooler than 150 deg F

114
Notes 42

• 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.

115
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 Processor Input Output Input


Start
Power 0 4 0 4

supply 1
2
3
5
6
7
1
2
3
5
6
7
1 2 3 4 Analog

IN0 VAC 1 IN 0+
IN1 OUT0 IN 0-
X2 X1 ANL COM
IN2 OUT1 IN 1+
F6 F7 IN3 OUT2 IN 1-
ANL COM
H4 H2 H3 H1 IN4 OUT3
IN 2+
IN5 VAC 2 IN 2- Stop
L1 IN6 OUT4 ANL COM

IN7 OUT5 IN 3+
L2/N IN 3-
F5 COM OUT6 ANL COM
F1 F2 F3 Gnd COM OUT7

5
F4
6

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 PLC’s
I/O cards), then identify at least two faults that could account for the motor’s refusal to start.

Suggestions for Socratic discussion

• A helpful problem-solving tip is to note the PLC’s 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

Answer 43

116
Notes 43
Looking at the input card’s LED indicators, we see input 4 (the OL contact) is energized as it should
be, but the “Stop” pushbutton’s input IN2 is not energized as it should be (since the real-world pushbutton
is NC and no one is pressing the button).

Some possible faults:


• Stop pushbutton switch failed open
• Wire between terminal 8 and pushbutton switches failed open
• Wire between stop pushbutton and terminal IN2 failed open
• Input channel IN2 failed open

Virtual Troubleshooting
This question is a good candidate for a “Virtual Troubleshooting” exercise. Presenting the diagram to
students, you first imagine in your own mind a particular fault in the system. Then, you present one or more
symptoms of that fault (something noticeable by an operator or other user of the system). Students then
propose various diagnostic tests to perform on this system to identify the nature and location of the fault, as
though they were technicians trying to troubleshoot the problem. Your job is to tell them what the result(s)
would be for each of the proposed diagnostic tests, documenting those results where all the students can see.
During and after the exercise, it is good to ask students follow-up questions such as:
• What does the result of the last diagnostic test tell you about the fault?
• Suppose the results of the last diagnostic test were different. What then would that result tell you about
the fault?
• Is the last diagnostic test the best one we could do?
• What would be the ideal order of tests, to diagnose the problem in as few steps as possible?

117
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 NOT NAND

. . . 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:

Allen-Bradley MicroLogix/SLC
Wasteful Efficient
I:0/4 I:0/7 O:2/0 I:0/4 I:0/7 B3:0/0

O:2/0 O:2/1 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:

Siemens Step 7 (S7)


Wasteful Efficient
I0.4 I0.7 Q2.0 I0.4 I0.7 M0.0

Q2.0 Q2.1 M0.0 Q2.1

Note: many novice PLC programmers commit this error of “wasting” valuable I/O as they
write their programs!
file i04092

118
Answer 44
Each “wasteful” program uses an output bit as the intermediary bit between the AND and NOT functions
when there is no need.

Notes 44
Output I/O points are valuable because they (and they alone) can be used to drive real-world devices
on and off. No need to “waste” them on functions that have no real-world application, when we may use
bits that are internal to the PLC’s memory!

119
Question 45
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 instruction’s 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
doesn’t have to do anything useful, but merely demonstrate what each instruction does. First, read
the appropriate section in your PLC’s 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 program’s 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

Answer 45
Partial answer:

Each of the S7-200 counter instructions can count as high as +32767 and as low as −32768. This equates
to 16 bits, signed integer (2’s complement notation, where the MSB has a negative place-weight value of
−32768).

120
Notes 45
Three types of SIMATIC counter instructions: count up (CTU), count down (CTD), and count up/down
(CTUD).

Practical uses include counting objects on an assembly line, counting number of times a machine has
been started or shut down, or counting any other sort of discrete event(s).

Each of the S7-200 counter instructions can count as high as +32767 and as low as −32768. This equates
to 16 bits, signed integer (2’s complement notation, where the MSB has a negative place-weight value of
−32768).

Simple counter program to fulfill stated requirements:

I0.5 C1
CU
CTU
I0.0
R Q

+5 PV CV

C1 Q0.3

121
Question 46
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 instruction’s 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 high-
temperature 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
doesn’t have to do anything useful, but merely demonstrate what each instruction does. First, read
the appropriate section in your PLC’s 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 program’s 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

Answer 46

122
Notes 46
Three types of counter instructions: count up (CTU), count down (CTD), and count up/down (CTUD).
CTU and CTD are the only types of counter instructions available in ladder logic, though – the CTUD
instruction is strictly used in function block programming.

Each of the Logix5000 counter instructions can count as high as +2,147,483,647 and as low as
−2, 147, 483, 648. This equates to 32 bits, signed integer (2’s complement notation, where the MSB has
a negative place-weight value of −2, 147, 483, 648).

Logix5000 counter instructions are reset by the use of a special “Reset” coil instruction, addressed to
that counter.

Simple counter program to fulfill stated requirements:

High_Motor_Temp CTU
Count Up CU

Counter Ovrheat
DN
Preset 5
Accum

Ovrheat.dn Alarm_Lamp

Alarm_Reset Ovrheat
RES

123
Question 47
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 PLC’s 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 won’t have textbooks to follow
or training to show you exactly what to do.

Write such a “demonstration” program for your PLC’s 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. For a counter demonstration program, this includes up counters, down
counters, and up/down counters, all with provision for re-setting.
• Clearly documented – every rung clearly commented in your own words, every variable named
Your instructor will challenge you to use this demonstration program to illustrate what you have learned
about PLC counter instructions.

Suggested questions your demonstration program should answer:

• What are the different counter instruction types offered on your PLC? What does each one of them do?
• How can you make a single counter both increment (count up) and decrement (count down)?
• Where in the PLC programming editor can you view the “live” status of a counter instruction?
• Where in the PLC’s memory are the counter variables (e.g. accumulated value, setpoint value) located?
What symbol(s) are used to address each one?
• How far up can a counter count? How far down? Note that this will be related to the number of bits
the counter instruction uses to track its current (accumulated) value.
• What happens when a counter reaches its preset value? How do you use this event to trigger something
else to happen in the program?
• What happens to the counter’s current value when it reaches its preset value? Does the counter stop
counting, or does it continue counting past this threshold?
• When a counter is reset, does its current value begin at zero or one?
• Is it possible to “preload” a counter instruction so that it doesn’t have to begin at the starting value
when the PLC program runs anew?
• What happens to the counter’s current value when it reaches its maximum value? Does the counter
instruction stop counting, or does it do something else?
file i03353

Answer 47
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.

124
Notes 47
Summary Quiz:
The recommended summary quiz is to have each student demonstrate their PLCs running this
demonstration program. Demonstration programs should not be accepted unless and until they meet all three
criteria listed in the question: they need to be simple (no extraneous features), complete (demonstrating all
the necessary instructions), and thoroughly documented in the student’s own words (every rung commented
intelligently, every variable named).

Some students may opt to write separate demonstration programs for each type of counter instruction
supported by their PLC. This is a perfectly acceptable alternative to writing a single demonstration program
showcasing all counter instruction types.

When checking students’ demonstation programs, have them run the programs with their laptop PCs
in online mode so they can view status highlighting and numerical values live, and ask them to provide a
running commentary of what they see the instructions doing. If their commentary is lacking, challenge them
to explore instruction behaviors that they have not yet done. Refer to the “suggested questions” for specific
ideas on instruction behavior that may be explored in a demonstration program.

This is by far the most important PLC program students will write today. If there are other programs
assigned in this day’s plan, prioritize this one. This point bears mentioning because a common error students
make is to disregard the importance of a well-written demo program, instead tending to treat it as “busywork”
and move on to “more important” assignments. As the instructor your task is to explain why demonstration
programs are important and to ensure students take them seriously:
• Demonstration programs are a powerful tool for self-instruction later when graduates will be challenged
to learn some new PLC system.
• Demonstration programs may be re-run at a later date, which makes them ideal tools for review near
the conclusion of the course.
• Demonstration programs require students to scientifically observe the PLC’s programmed behavior,
learning by experiment rather than learning by direct instruction.
• Well-written comments demand critical reflection on the part of the student, and also serve as practice
for technical expression.

125
Sample demonstration program for up and down counter instructions: (for an Allen-Bradley
MicroLogix PLC)

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 CU

Counter C5:0 DN
Preset 12
Accum 5

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 CD

Counter C5:0
DN
Preset 12
Accum 5

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 instruction’s "Accumulated" value back to zero.

I:0/2 C5:0
RES

126
Question 48
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 = 135 oF
X2
X3

PWR X4
RUN C2 Trip = 23 inches
RUN
ERR STOP Y1
Y2

PORT 1 Y3 Trip = 17 PSI


TX1 Y4

RX1 +V
AD1V
TX2 AD1I
RX2 AD2V
PORT 2 AD2I
ACOM
PORT 3 RS-485
DA1V

TX3 DA1I

RX3 DA2V
LG
DA2I

0 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 PLC’s Y1 output.
file i02144

Answer 48
Temperature = below 135 o F

Level = above 23 inches

Pressure = below 17 PSI

Notes 48

127
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
X1 Trip = 32 PSI
X2
X3

PWR X4
RUN C2 Trip = 10 inches
RUN
ERR STOP Y1
Y2

PORT 1 Y3 Trip = 99 oF
TX1 Y4

RX1 +V
AD1V
TX2 AD1I
RX2 AD2V
PORT 2 AD2I
ACOM
PORT 3 RS-485
DA1V

TX3 DA1I

RX3 DA2V
LG
DA2I

0 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 Y1

X3 X2

file i02145

Answer 49
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.

Notes 49

128
Question 50
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 Start Program (inside PLC)
Koyo
C1
X1
X2 X1 X2 CT1 Y1
X3 Stop
PWR X4
RUN C2
RUN
ERR STOP Y1
Y2 Reset Y1
PORT 1 Y3

TX1 Y4

RX1 +V
AD1V
TX2 AD1I M1
RX2
PORT 2
AD2V
Contactor Y1 Counter CT1 CT1
AD2I
ACOM relay coil SetPoint 8
PORT 3 RS-485 Up Complete
DA1V

TX3 DA1I
X3 Current CTD1
RX3 DA2V
LG
DA2I

Reset
0 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 counter’s 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

129
Answer 50
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 counter’s output bit (CT1) gets set when the counter’s current value
equals the SetPoint value, not when it exceeds the SetPoint value.

Here is a solution for an alternative Reset function:

Program (inside PLC)

X1 X2 CT1 Y1

Y1

Y1 Counter CT1 CT1

Up
SetPoint 8 Complete

CT1 X2 Current CTD1

Reset

In order to reset the counter, the operator must press the Stop button (after the counter has disabled
the system from starting).

Notes 50

Virtual Troubleshooting
This question is a good candidate for a “Virtual Troubleshooting” exercise. Presenting the diagram to
students, you first imagine in your own mind a particular fault in the system. Then, you present one or more
symptoms of that fault (something noticeable by an operator or other user of the system). Students then
propose various diagnostic tests to perform on this system to identify the nature and location of the fault, as
though they were technicians trying to troubleshoot the problem. Your job is to tell them what the result(s)
would be for each of the proposed diagnostic tests, documenting those results where all the students can see.
During and after the exercise, it is good to ask students follow-up questions such as:
• What does the result of the last diagnostic test tell you about the fault?
• Suppose the results of the last diagnostic test were different. What then would that result tell you about
the fault?
• Is the last diagnostic test the best one we could do?
• What would be the ideal order of tests, to diagnose the problem in as few steps as possible?

130
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 instruction’s 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

131
Answer 51

Notes 51
I strongly recommend students save all their PLC programs for future reference, commenting them
liberally and saving them with special filenames for easy searching at a later date!

I also recommend presenting these programs as problems for students to work on in class for a short time
period, then soliciting screenshot submissions from students (on flash drive, email, or some other electronic
file transfer method) when that short time is up. The purpose of this is to get students involved in PLC
programming, and also to have them see other students’ solutions to the same problem. These screenshots
may be emailed back to students at the conclusion of the day so they have other students’ efforts to reference
for further study.

132
Question 52

Answer 52

Notes 52

133
Question 53

Answer 53

Notes 53

134
Question 54

Answer 54

Notes 54

135
Question 55

Answer 55

Notes 55

136
Question 56

Answer 56

Notes 56

137
Question 57

Answer 57

Notes 57

138
Question 58

Answer 58

Notes 58

139
Question 59

Answer 59

Notes 59

140
Question 60

Answer 60

Notes 60

141
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 turbine’s 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

S 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:

Real-world I/O wiring


Discrete input Discrete output
"Start" pushbutton card card
IN_switch_Start Solenoid coil

"Stop" pushbutton OUT_valve

IN_switch_Stop

Low oil pressure


IN_oil_press

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

142
Answer 61
This is one possible fix for the problem:

PLC program

IN_switch_Start IN_switch_Stop OUT_valve

OUT_valve IN_oil_press

Notes 61
The problem is the turbine can never start up, due to a Catch-22: the solenoid valve will never be
allowed to energize (to send steam to the turbine) unless the oil pressure permissive contact closes. However,
this contact cannot close unless there is adequate oil pressure output by the pump, which cannot happen
until the turbine begins to spin!
In the proposed solution, the operator must hold the “Start” pushbutton long enough for the turbine
to gain enough speed to build adequate oil pressure. Only then will the system “latch” in the run mode.

143
Prep Quiz:
Identify one plausible fault to explain why this PLC-controlled motor refuses to start up when the
“Start” button is pressed, given the following wiring diagram and online PLC program display shown below.
Note: no one is pushing any buttons at this time.

Real-world I/O wiring


Discrete input Discrete output
"Start" pushbutton card card
IN_switch_Start Motor contactor

"Stop" pushbutton OUT_motor

IN_switch_Stop

High temperature shutdown

IN_temp_hi

PLC program

IN_switch_Start IN_switch_Stop IN_temp_hi OUT_motor

OUT_motor

144
Prep Quiz:
Identify one plausible fault to explain why this PLC-controlled motor refuses to start up when the
“Start” button is pressed, given the following wiring diagram and online PLC program display shown below.
Note: no one is pushing any buttons at this time.

Real-world I/O wiring


Discrete input Discrete output
"Start" pushbutton card card
IN_switch_Start Motor contactor

"Stop" pushbutton OUT_motor

IN_switch_Stop

High temperature shutdown

IN_temp_hi

PLC program

IN_switch_Start IN_switch_Stop IN_temp_hi OUT_motor

OUT_motor

145
Prep Quiz:
Identify one plausible fault to explain why this PLC-controlled motor refuses to start up when the
“Start” button is pressed, given the following wiring diagram and online PLC program display shown below.
Note: no one is pushing any buttons at this time.

Real-world I/O wiring


Discrete input Discrete output
"Start" pushbutton card card
IN_switch_Start Motor contactor

"Stop" pushbutton OUT_motor

IN_switch_Stop

High temperature shutdown

IN_temp_hi

PLC program

IN_switch_Start IN_switch_Stop IN_temp_hi OUT_motor

OUT_motor

146
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

...
SIMATIC 1M 1L+ 0.0 0.1 0.2 0.3 0.4 2M 2L+ 0.5 0.6 0.7 1.0 1.1 M L+ DC
S7-200

CPU 224XP
Q0 Q1
DC/DC/DC
SF/DIAG .0 .1 .2 .3 .4 .5 .6 .7 .0 .1
RUN
STOP

.0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .2 .3 .4 .5
I0 I1

1M 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 M L+
Port 1 Port 0

Drive-over pressure switch

Key

Reset
switch

Unfortunately, there is something wrong with this system. Although it worked just fine yesterday, today
the counter’s 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

Answer 62

Notes 62
You could try stepping on the pressure-sensitive switch and see if the corresponding input LED on the
PLC (I0.1) lights up. If not, there’s an I/O or wiring or switch failure. If it does blink every time you step
on the pressure switch, the problem lies within the PLC or else the HMI or the communications between
them.

147
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 person’s 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
SIMATIC 1M 1L+ 0.0 0.1 0.2 0.3 0.4 2M 2L+ 0.5 0.6 0.7 1.0 1.1 M L+ DC
S7-200

CPU 224XP
Q0 Q1
DC/DC/DC
SF/DIAG .0 .1 .2 .3 .4 .5 .6 .7 .0 .1
RUN
STOP

.0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .2 .3 .4 .5
I0 I1

1M 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 M L+
Port 1 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 CU
CTUD
I1.3 I1.0
P CD QU

R QD

LD

PV CV

Suggestions for Socratic discussion


• Explain how a timing diagram of the switch states would be helpful in analyzing the operation of this
PLC program.
• Transition (edge-detecting) functions are implemented in Allen-Bradley PLCs using the one-shot rising
(OSR) instruction. Research how the OSR instruction is used, and how it differs from the “P” and “N”
contacts shown in this Siemens PLC program.

148
• Will this system still function properly if the optical sensors are spaced farther apart than the width of
a human body? Explain why or why not.
file i00185

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.

Notes 63
This counter instruction increments if ever input I1.3 transitions from low to high as input I1.0 is
already high (i.e. the exact moment the left-hand beam breaks when the right-hand beam has already been
broken – the person is moving from right to left).

The counter decrements if ever input I1.0 transitions from low to high as input I1.3 is already high
(i.e. the exact moment the right-hand beam breaks when the left-hand beam has already been broken – the
person is moving from left to right).

149
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
PLC’s input channels. The PLC then counts the number of pulses to determine the number of cans that
have passed by:

Processor Input Input Output


Power 0 4 0 4 0 4
supply 1
2
3
5
6
7
1
2
3
5
6
7
1
2
3
5
6
7
DC sourcing DC sinking DC sinking

IN0 IN0 VDC


IN1 IN1 OUT0
24 VDC
IN2 IN2 OUT1
IN3 IN3 OUT2
IN4 IN4 OUT3
IN5 IN5 OUT4
L1 IN6 IN6 OUT5
120 VAC IN7 IN7 OUT6
L2/N
COM COM OUT7
Gnd COM COM COM

TB-23 TB-20
Cable 45
Grn
1 1
Red
2 2
Blu
3 3
Org
4 4

Counter TB-31 1 2 3 4
reset

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

150
Answer 64

Notes 64
A very useful diagnostic indicator in this system is the LED indicator lamps on each PLC I/O card.
You can watch the LED on the proximity switch input to see if it blinks as cans go by. You can also watch
the “Counter reset” switch input to see if perhaps the reset switch is stuck on.

Virtual Troubleshooting
This question is a good candidate for a “Virtual Troubleshooting” exercise. Presenting the diagram to
students, you first imagine in your own mind a particular fault in the system. Then, you present one or more
symptoms of that fault (something noticeable by an operator or other user of the system). Students then
propose various diagnostic tests to perform on this system to identify the nature and location of the fault, as
though they were technicians trying to troubleshoot the problem. Your job is to tell them what the result(s)
would be for each of the proposed diagnostic tests, documenting those results where all the students can see.
During and after the exercise, it is good to ask students follow-up questions such as:
• What does the result of the last diagnostic test tell you about the fault?
• Suppose the results of the last diagnostic test were different. What then would that result tell you about
the fault?
• Is the last diagnostic test the best one we could do?
• What would be the ideal order of tests, to diagnose the problem in as few steps as possible?

151
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

Answer 65

Notes 65
You may connect to the PLC with a laptop PC and do the following:
• Force the counter’s live value to zero, or
• Force the counter’s reset bit high, or
• Program an input contact instruction to reset the counter whenever that input is jumpered with power

152
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 Pulse signal (when pump is running)

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 CU

Counter C5:0
DN
Preset 32767
Accum 0

C5:0.ACC/13 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.

153
file i03838

Answer 66
Hint: the contact address C5:0.ACC/13 refers to the 13th bit of the counter’s accumulator register,
which is a 16-bit binary number. The 15th bit would be the MSB, while the 0th bit is the LSB.

Notes 66
If a pulse signal drives a binary counter, the bits of that counter’s accumulator value will oscillate at
sub-harmonic frequencies. The LSB will oscillate at exactly one-half the frequency of the input; the next
higher-order bit at exactly one-quarter the input frequency; the next higher-order bit at exactly one-eighth
the input frequency; etc.

By monitoring bit 13 of the counter’s accumulator value, the frequency is divided by a factor of 214 ,
1
which is 16384 . If the shaft speed is exactly 1750 RPM (switch signal frequency = 29.1667 Hz), then the
light’s blinking frequency will be 0.00178 Hz, or 0.1068 times per minute. This is very slow (9.36 minutes
per on/off blink cycle!), and should probably be sped up for practical reasons.

154
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

Prox. switch Sensor


Liquid
cable (to PLC)
Mixing vessel
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
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, 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)

Suggestions for Socratic discussion

• How can you test your program’s basic operation without having to flick a switch 1500 times to simulate
the full number of paddle revolutions?
• Try writing your program so that the number of paddle-turns (1500) is not “hard-coded” into the PLC
program, but rather resides in some memory location that may be altered without reprogramming the
PLC.
file i03688

155
Answer 67

Notes 67
Sample program:

Stop_switch Start_switch Counter.dn Motor_run

Motor_run

Prox_switch
CTU
Count Up CU

Counter Counter
DN
Preset 1500
Accum

Counter.dn Counter
RES

156
Summary Quiz:
(The recommended summary quiz is to have each student demonstrate their PLCs running this
particular program)

157
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

158
Answer 68

Notes 68
I strongly recommend students save all their PLC programs for future reference, commenting them
liberally and saving them with special filenames for easy searching at a later date!

I also recommend presenting these programs as problems for students to work on in class for a short time
period, then soliciting screenshot submissions from students (on flash drive, email, or some other electronic
file transfer method) when that short time is up. The purpose of this is to get students involved in PLC
programming, and also to have them see other students’ solutions to the same problem. These screenshots
may be emailed back to students at the conclusion of the day so they have other students’ efforts to reference
for further study.

159
Question 69

Answer 69

Notes 69

160
Question 70

Answer 70

Notes 70

161
Question 71

Answer 71

Notes 71

162
Question 72

Answer 72

Notes 72

163
Question 73

Answer 73

Notes 73

164
Question 74

Answer 74

Notes 74

165
Question 75

Answer 75

Notes 75

166
Question 76

Answer 76

Notes 76

167
Question 77

Answer 77

Notes 77

168
Question 78

Answer 78

Notes 78

169
Question 79

Answer 79

Notes 79

170
Question 80

Answer 80

Notes 80

171
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 I/0 I/1 I/2 I/3 DC I/4 I/5


COM COM
DC OUT

Power
Trip = 200 oF
Run
Fault
Force

85-264 VAC

VAC VAC VAC VAC


L1 L2/N VDC O/0 VDC O/1 VDC O/2 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

172
Answer 81
This is a graded question – no answers or hints given!

Notes 81

I:0 I:0 O:0

1 3 0

In order to turn the light on, we need to send virtual power to coil O:0/0. The “and” condition implies
a series pairing of contact instructions tied to the two inputs I:0/1 and I:0/3. Thus, these two contact
instruction must both be closed (colored). Since we are told the temperature will be below 200 degrees
(keeping the N.O. temp switch contact in its open state) and that the flow will be below 15 GPM (keeping
the N.C. flow switch contact in its closed state), we know that I:0/3 will be equal to 0 and I:0/1 will be
equal to 1. In order for the two contact instructions to be colored, we need a NO I:0/1 and a NC I:0/3 as
shown above.

173
Question 82
Analyze this Allen-Bradley PLC program and explain what it is supposed to do:

Motor
O:1 CTU
Count Up CU

0 Counter C5:2
DN
Preset 17
Accum 0

Start Stop Motor


I:0 I:0 C5:2 O:1

0 1 DN 0

Motor
O:1

Reset
I:0 C5:2
RES

file i02377

174
Answer 82
This is a graded question – no answers or hints given!

Notes 82
The standard Start, Stop, and Seal-in contact structure in this program should remind you of every
PLC-controlled motor system program you’ve ever seen. The “twist” here is that there is an additional
contact in series with the Stop contact, controlled by the “Done” bit on the counter instruction. Being an
NC virtual contact, it will force the “Motor” output bit to a 0 state whenever the counter reaches its preset
count value.

Thus, the motor is inhibited from starting after 17 start/stop cycles. This lockout counter may be reset
by a discrete input (I:0/2).

175
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

Identical coils!
...

...
OL_contact Sump_wet 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

176
Answer 83
This is a graded question – no answers or hints given!

Notes 83
Multiple instances of a coil in RLL programming means the possibility exists for different Boolean values
to be written to the same bit in memory. In other words, one rung of logic might be telling the pump to
run, while another might be telling it to not run. This makes the Pump run bit liable to change within one
scan of the program, with only the last scanned (evaluated) value being the one sent to the PLC discrete
output channel.

In this particular example, the Pump run bit will be in the set state (1) at the conclusion of the program
scan because the last rung in this program is “energizing” the Pump run coil. The coil in the first run is “de-
energized,” making the Pump run bit a 0 state during the rest of the program, but that is of no consequence
to the output state because the output register gets updated only after the entire program has been scanned.

177
Question 84
Sketch the wires necessary to connect two pressure switches and two relay coils to the following Allen-
Bradley 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 PLC’s
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):

24V DC I/0 I/1 I/2 I/3 DC I/4 I/5


Com NC NO
COM COM
DC OUT

Power
PSH
Run
Fault
Force
Com NC NO

85-264 VAC

VAC VAC VAC VAC


L1 L2/N VDC O/0 VDC O/1 VDC O/2 VDC O/3

PSL

file i02379

178
Answer 84
This is a graded question – no answers or hints given!

Notes 84
Remember that “sourcing” means a device is sending current out through the channel wire (conventional
flow notation), while “sinking” means a device is taking current in through the channel wire. We ignore
current through any “Common” conductors when we define source and sink, choosing only to reference
conductors attached to specific input or output terminals of the device.

In order for the process switches to source current to the PLC input channels, these switches must both
connect to the positive pole of the DC power supply. In other words, they must be “high side” switches,
sending current (conventional flow notation) to the PLC input terminals.

Likewise, in order for the PLC outputs to source current to the relay coils, the output contacts must
both connect to the positive pole of the DC power supply.

24V DC I/0 I/1 I/2 I/3 DC I/4 I/5


Com NC NO
COM COM
DC OUT

Power
PSH
Run
Fault
Force
Com NC NO

85-264 VAC

VAC VAC VAC VAC


L1 L2/N VDC O/0 VDC O/1 VDC O/2 VDC O/3

PSL

179
Question 85
Suppose we have an Allen-Bradley SLC 500 PLC with a water level switch and a temperature switch
we need to connect to it:

Slot 0 Slot 1 Slot 2 Slot 3


(processor) (discrete input) (unused) (discrete output)

Processor Input Output


Power 0 4 0 4

supply 1
2
3
5
6
7
1
2
3
5
6
7

IN0 VAC 1
IN1 OUT0
IN2 OUT1
IN3 OUT2
IN4 OUT3
IN5 VAC 2

120 VAC L1 IN6 OUT4


IN7 OUT5
power L2/N
COM OUT6
Gnd COM OUT7

Well pump
contactor
Level control
NC
NO
Com
switch (Trips 2 feet falling, 5 feet rising)

High temp
NC
NO
Com

cutout switch

The purpose of this PLC control is to start and stop a water pump drawing water from a well, to
maintain a minimum water level in a storage tank. The level switch measures the water level in the storage
tank to control the pump. The problem is, the pump will overheat if run continuously, so a high-temperature
“cutout” switch is installed at the motor to sense motor temperature and shut off the pump if the motor gets
too hot. The PLC will immediately shut off the motor if it senses a high temperature, and refuse to re-start
the motor for at least 5 minutes after the temperature has fallen below the temperature switch’s trip point.
Someone else has already written the program for this PLC, leaving you to figure out which contact
on each switch (NO or NC) must be connected to which terminal on the input card. Sketch wires for all
connections to complete this system, based on this pre-written Ladder Diagram program:

I:1/4 TOF
Timer Off Delay EN

Timer T4:1
DN
Time Base 1.0
Preset 300
Accum 0

I:1/0 T4:1/DN O:3/5

file i02253

180
Answer 85
This is a graded question – no answers or hints given!

Notes 85
According to the verbal description of this system’s operation, the temperature switch is associated with
the 5 minute “lockout” timer function. Therefore, input I:1/4 must be the one connected to the temperature
switch. From the PLC program shown we see that this input controls an off-delay timer (TOF), which in
turn enables or disables output O:3/5 which controls the pump motor.
When the motor is cool, we want the program to enable it to run. This means we need to have the
T4:1/DN contact instruction colored (able to pass virtual power to the output coil instruction O:3/5). Seeing
as the T4:1/DN instruction is normally-closed, this means we need the timer’s “done” bit to be in a zero state
during regular operation, which means the timer instruction’s input needs to be “false” (i.e. no color on the
I:1/4 contact instruction). Seeing as the I:1/4 contact is normally-closed, this means we need the I:1/4
bit to be in a 1 state when the motor is cool, in order to maintain that contact instruction in its un-colored
state and not activate the timer. This in turn means that input channel IN4 needs to be powered when the
motor is cool, necessitating the use of normally-closed contacts on the temperature switch.

The water level switch, sensing level inside the storage tank, needs to turn the well pump motor on
when level inside the tank is too low. Looking at the PLC program we see that the only other input I:1/0 is
associated with a normally-open instruction on the rung sending virtual power to output coil O:3/5. Since
activating this coil instruction is what starts up the pump motor, we need the contact instruction I:1/0 to
be colored when the pump needs to run. This means we need to have input bit I:1/0 set to a “1” state
when the pump needs to run. The pump needs to run whenever tank level is low, and so we need the level
switch to send power in PLC input channel IN0 when it senses a low liquid level (i.e. its “normal” state
according to the switch manufacturer), and so we must wire the liquid level switch to use its normally-closed
(NC) contacts.

Slot 0 Slot 1 Slot 2 Slot 3


(processor) (discrete input) (unused) (discrete output)

Processor Input Output


Power 0 4 0 4

supply 1
2
3
5
6
7
1
2
3
5
6
7

IN0 VAC 1
IN1 OUT0
IN2 OUT1
IN3 OUT2
IN4 OUT3
IN5 VAC 2

120 VAC L1 IN6 OUT4


IN7 OUT5
power L2/N
COM OUT6
Gnd COM OUT7

Well pump
contactor
Level control
NC
NO
Com

switch (Trips 2 feet falling, 5 feet rising)

High temp
NC
NO
Com

cutout switch

181
Question 86
Calculate all voltages, currents, and total power in this balanced Y-Y system:

Source Load

580 Ω

27
7
V

• Eline =

• Iline =

• Ephase(source) =

• Iphase(source) =

• Ephase(load) =

• Iphase(load) =

• Ptotal =

file i02421

182
Answer 86
This is a graded question – no answers or hints given!

Notes 86
Important concepts to keep in mind when analyzing three-phase networks is that of series and parallel
connections: series-connected components must always share the same amount of current, while parallel-
connected components must always share the same amount of voltage. This is why line current and
phase current are identical in wye networks: because each phase element is directly in series with each
line conductor. This is why line voltage and phase voltage are identical in delta networks: because each
phase element is directly in parallel with a pair of line conductors.

Eline = 479.8 V
Iline = 0.478 A
Ephase(source) = 277 V
Iphase(source) = 0.478 A
Ephase(load) = 277 V
Iphase(load) = 0.478 A
Ptotal = 396.9 W

183
Question 87
The following circuit senses temperature using a thermistor with a positive temperature coefficient (i.e.
resistance increases as temperature increases):

A D G
10 VDC +

1k Cable 1 Cable 2 (80 mA current-limited)

B E H Voltmeter
+To

1k
(at room temp)

C F J

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 Possible Impossible


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

184
Answer 87
This is a graded question – no answers or hints given!

Notes 87
Voltage at room temperature should be half the supply voltage: 5 volts DC, because the thermistor is
supposed to exhibit a resistance of 1000 ohms at room temperature. With the thermistor at 1 kΩ and the
fixed-value resistor measuring the same, a 1:2 voltage divider is formed which will take the 10 volt supply
voltage and divide it in half.

With the voltmeter registering 0 volts, we know there is either a short-circuit in parallel with the meter
(ensuring equipotentiality and therefore 0 voltage drop) or there is an open circuit fault somewhere that
severs the connection between the voltmeter and the power source:

Fault Possible Impossible



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

185
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

186
Answer 88
This is a graded question – no answers or hints given!

Notes 88

6.25 mA

22.3 V 13.75 V 2.2 kΩ

8.55 V 4.75 mA

1.8 kΩ 1.5 mA

7.05 V 4.7 kΩ

1.5 V 1.5 mA

1 kΩ

187
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

188
Answer 89
This is a graded question – no answers or hints given!

Notes 89
Apparent power (S) is the simplest to calculate, being voltage times current (power factor ignored).
Any time you multiply these two quantities in a single-phase AC circuit you will end up with a value that
is “apparently” the circuit’s power, although true power in an AC circuit is a bit more complex than this:

S = (16.5)(237) = 3910.5 VA = 3.911 kVA

True power (P ), however, is that fraction of apparent power doing real work. True power in a single-
phase AC circuit is always equal to the apparent power multiplied by the power factor of that circuit:

P = (16.5)(237)(0.85) = 3323.9 kW = 3.324 kW

To further contrast apparent versus true power, consider the case of a purely resistive AC circuit: here
apparent power is the exact same value as true power, because every bit of the current does useful work in
the form of heat dissipation at the resistor (i.e. a power factor of 1). In a purely reactive circuit (e.g. a pure
inductor or a pure capacitor), none of the current does useful work, but instead it’s all apparent power and
zero true power (i.e. a power factor of 0).

189
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
contactor’s magnetic coil. Although this motor control circuit used to work just fine, today the motor refuses
to start.

To 3-φ , 480 volt power source

L1 L2 L3 L1 L2 L3
Schematic diagram

Fuses

Transformer
Transformer
H4

X2
H2

Contactor H1 H3 H2 H4
H3

X1
H1

Contactor Fuse
A1 X1 X2

A2 Switch A2 A1
T1 T2 T3 Switch
motor

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

190
Answer 90
This is a graded question – no answers or hints given!

Notes 90
The lack of adequate voltage at the secondary terminals of the control power transformer is a dead
giveaway that something is wrong there. We know the transformer is receiving 480 VAC (nominal) just fine,
so the fault is likely within the transformer itself.

Components known to be in good working condition:


• The center (L2) and right (L3) 480 VAC fuses
• All wires from fuses to transformer primary

Components which could possibly be faulted:


• Transformer primary winding(s) failed open
• Transformer secondary winding failed open
• Jumper wire from H2 to H3 failed open

Potential faults commonly listed by students, although not very likely in real life, include the following:
• Transformer secondary winding failed shorted
• Contactor coil failed shorted
A shorted winding inside a transformer typically generates excessive current inside the section of winding
that’s been shorted, usually with spectacularly destructive results. Smoke and fire, really! By the same token,
a shorted contactor coil would blow the fuse on the secondary side of the transformer, eliminating all load
from the transformer and thus allowing the X1-X2 voltage to be its full value.

191
Question 91
Lab Exercise – introduction
Your team’s 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 Grading 1 2 3 4 Team


Team meeting and prototype sketch (do first!) mastery – – – –
Circuit design challenge mastery ––––
Complete I/O list mastery – – – –
Prototype PLC program (before programming!) mastery – – – –
Final wiring diagram and system inspection mastery ––––
Demonstration of working system mastery – – – –
Final PLC program inspection mastery – – – –
Lab question: Wiring connections proportional – – – –
Lab question: Commissioning proportional – – – –
Lab question: Mental math proportional – – – –
Lab question: Diagnostics proportional – – – –

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
what’s already been done, what’s 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 team’s 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.

192
Lab Exercise – team meeting and prototype sketch
An important first step in completing this lab exercise is to meet with your instructor as a team
to discuss safety concerns, team performance, and specific roles for team members. If you would like to
emphasize exposure to certain equipment (e.g. use a particular type of control system, certain power tools),
techniques (e.g. fabrication), or tasks to improve your skill set, this is the time to make requests of your
team so that your learning during this project will be maximized.

An absolutely essential step in completing this lab exercise is to work together as a team to sketch a
prototype diagram showing what you intend to build. This usually takes the form of a simple electrical
schematic and/or loop diagram showing all electrical connections between components, as well as any tubing
or piping for fluids. This prototype sketch need not be exhaustive in detail, but it does need to show enough
detail for the instructor to determine if all components will be correctly connected for their safe function.
For example, if you intend to connect field devices to a PLC (Programmable Logic Controller), your
prototype sketch must show how those devices will connect to typical input/output terminals on the PLC,
where electrical power will be supplied, etc. Prototype sketches need not show all intermediary connections
between components, such as terminal blocks in junction boxes between the field device and the controller.
You should practice good problem-solving techniques when creating your prototype sketch, such as
consulting equipment manuals for information on component functions and marking directions of electric
current, voltage polarities, and identifying electrical sources/loads. Use this task as an opportunity to
strengthen your analytical skills! Remember that you will be challenged in this program to do all of this
on your own (during “capstone” assessments), so do not make the mistake of relying on your teammates to
figure this out for you – instead, treat this as a problem you must solve and compare your results with those
of your teammates.
Your team’s prototype sketch is so important that the instructor will demand you provide this plan
before any construction on your team’s working system begins. Any team found constructing their system
without a verified plan will be ordered to cease construction and not resume until a prototype plan has
been drafted and approved! Similarly, you should not deviate from the prototype design without instructor
approval, to ensure nothing will be done to harm equipment by way of incorrect connections. Each member
on the team should have ready access to this plan (ideally possessing their own copy of the plan) throughout
the construction process. Prototype design sketching is a skill and a habit you should cultivate in school
and take with you in your new career.

Select a PLC with modular (add-on) I/O cards to provide sufficient complexity for the project.
Monolithic “brick” PLCs (with no add-on I/O modules) are not acceptable for this project. An Allen-
Bradley SLC 500 PLC would be a good choice, as well as a Siemens S7 series or an AutomationDirect
Productivity 3000.
You will also need to select appropriate field devices (switches, pumps, etc.) for your project. You are
free to use the field devices left over from the relay-based motor control lab if you prefer.
The next step should be finding appropriate documentation for your PLC. All PLC manufacturers
provide manuals and datasheets for their products online. Use this documentation to identify how to properly
wire, power, and program your team’s PLC.
PLC equipment manuals always provide sample diagrams showing how external components may
connect to the I/O points. Feel free to use these sample diagrams as templates for your prototype sketch.
This is the most challenging portion of your wiring, so be sure to work with your teammates to get this right!

Planning a functioning system should take no more than a couple of hours if the
team is working efficiently, and will save you hours of frustration (and possible component
destruction!).

193
Lab Exercise – circuit design challenge
Connect an “ice cube” relay to one of the outputs on a PLC, so that the PLC can control the energization
of the relay. All electrical connections must be made using a terminal strip (no twisted wires, crimp splices,
wire nuts, spring clips, or “alligator” clips permitted). Program this PLC to implement a motor start/stop
(latching) control function. In order to ensure your program has not been pre-written in your computer prior
to this assessment, you will be asked to sketch a correct ladder-diagram PLC program on paper to implement
this function prior to using a computer.
You must connect a “commutating” diode in parallel with the relay’s coil to prevent the phenomenon
known as “inductive kickback,” which may otherwise damage the transistor output on a PLC. Note that
incorrectly connecting this diode will present a short-circuit to the PLC, so you must get it right!
This exercise tests your ability to properly interpret the “pinout” of an electromechanical relay, properly
wire a PLC output channel to control a relay’s coil, properly polarize a commutating diode to prevent
inductive kickback from damaging the PLC output, and use a terminal strip to organize all electrical
connections. It also tests your ability to program motor start/stop logic using either a seal-in contact
or latching (retentive) coil instructions.

PLC Relay socket


24V

DC OUT
DC
COM
I/0 I/1 I/2 I/3 DC
COM
I/4 I/5
Terminal strip Relay
Power
Run
Fault
Force
Diode
85-264 VAC

VAC VAC VAC VAC


L1 L2/N VDC O/0 VDC O/1 VDC O/2 VDC O/3

The following components and materials will be available to you: assorted “ice cube” relays with DC-
rated 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: “Stop” switch to input: Relay to output:

PLC program (instructor chooses): Seal-in contact Retentive coils

194
Lab Exercise – developing a PLC I/O list
It is a good idea when programming any computer system to first identify all the input and output
signals to the system, as well as internal variables if possible, before commencing on the development of the
program itself. In order to reinforce this practice, your team will be required to develop a complete list of
all input and output points on your proposed system along with any tagnames (also known as “symbols” or
“nicknames”) identifying the function of each.
Once this list is complete and you are ready to begin developing the PLC program, you can enter all
the tagnames and define the I/O points as your very first programming step. With this data in place, the
writing of your program will be made easier because each I/O tag you reference will already be defined and
labeled, reminding you of their functions within the system.

Here is a sample I/O list for a motor control PLC program:

Hardware I/O terminal I/O type Tagname Notes


Card 1, terminal IN0 24 VDC discrete input START PB Black pushbutton,
momentary NO contacts
Card 1, terminal IN1 24 VDC discrete input STOP PB Red pushbutton,
momentary NC contacts
Card 1, terminal IN2 24 VDC discrete input E STOP Red pushbutton,
latching NC contacts
Card 2, terminal IN0 4-20 mA analog input MTR TEMP Current signal scaled
0 to 150 deg F
Card 3, terminal OUT0 120 VAC discrete output CONTACTOR To terminal A1

195
Lab Exercise – wiring the system
The Instrumentation lab is set up to facilitate the construction of working systems, with over a
dozen junction boxes, pre-pulled signal cables, and “racks” set up with 2-inch vertical pipes for mounting
instruments. The only wires you should need to install to build a working system are those connecting the
field instrument to the nearest junction box, and then small “jumper” cables connecting different pre-installed
cables together within intermediate junction boxes.
Your team’s PLC must be installed in a suitable electrical enclosure, with AC power fed to it through
a fuse or circuit breaker (on the “hot” conductor only), and firmly grounded (the ground conductor of the
power cord securely fastened to the metal frame of the enclosure and the PLC chassis).
All I/O wiring should be neatly loomed together and/or run through wire duct (“Panduit”). Power to
I/O cards must be routed through their own fuses so that I/O power may be disconnected independently of
power to the PLC processor and rack.

Common mistakes:
• Neglecting to consult the manufacturer’s documentation for field instruments (e.g. how to wire them,
how to calibrate them).
• Proceeding with wiring before creating an initial sketch of the circuitry and checking that sketch for
errors.
• Mounting the field instrument(s) in awkward positions, making it difficult to reach connection terminals
or to remove covers when installed.
• Failing to tug on each and every wire where it terminates to ensure a mechanically sound connection.
• Students working on portions of the system 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!

Building a functioning system should take no more than one full lab session (3 hours) if
all components are readily available and the team is working efficiently!

196
Lab Exercise – programming the system
Like wiring a control system, programming one is best done with thoughtful planning rather than
a “design-as-you-build” approach. Each team will work with the instructor to develop a “prototype” PLC
program, usually on a whiteboard or on paper. Having multiple teams prototype their programs on whiteboards
within the same classroom works well to foster peer review of programming, where teams analyze and critique
other teams’ programming solutions! Your prototype program should completely address the following points:
• Identify all inputs to the PLC, giving each one a sensible tagname
• Identify all signal outputs from the PLC, giving each one a sensible tagname
• Identify all major program functions (i.e. What must this program do?)
• Identify all internal variables necessary for these functions, giving each one a sensible tagname
• Identify all system variables necessary for these functions (e.g. real-time clock/calendar variables)
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:
• Establish communications between PLC and personal computer (PC)
• Connect all I/O cards (modules) to the PLC and get them recognized by the processor
• Assign tagnames to all relevant variables, beginning with I/O points
• Enter a simplified version of the program, running to check for “bugs”
• Diagnose any program problems
• Add complexity to the program (e.g. additional features) and run to check for “bugs”
• Repeat last two steps as often as necessary
• Add comments to each and every line of the program, explaining how it functions
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!

197
Lab Exercise – documenting the system
Each student must sketch their own wiring diagram for their team’s system, following industry-standard
conventions. Sample diagrams for input and output wiring are shown in the next question in this worksheet.
These wiring diagrams must be comprehensive and detailed, showing every connection, every cable, every
terminal block, etc. The principle to keep in mind here is to make the wiring diagram so complete and
unambiguous that anyone can follow it to see what connects to what, even someone unfamiliar with industrial
instrumentation. In industry, control systems are often constructed by contract personnel with limited
understanding of how the system is supposed to function. The associated diagrams they follow must be so
complete that they will be able to connect everything properly without necessarily understanding how it is
supposed to work.
When your entire team is finished drafting your individual wiring diagrams, call the instructor to do
an inspection of the system. Here, the instructor will have students take turns going through the entire
system, with the other students checking their diagrams for errors and omissions along the way. During this
time the instructor will also inspect the quality of the installation, identifying problems such as frayed wires,
improperly crimped terminals, poor cable routing, missing labels, lack of wire duct covers, etc. The team
must correct all identified errors in order to receive credit for their system.
After successfully passing the inspection, each team member needs to place their wiring diagram in the
diagram holder located in the middle of the lab behind the main control panel. When it comes time to
troubleshoot another team’s system, this is where you will go to find a wiring diagram for that system!

Common mistakes:
• Forgetting to label all signal wires (see example wiring diagrams).
• Forgetting to label all field instruments with their own tag names (e.g. PSL-83).
• Forgetting to note all wire colors.
• Forgetting to put your name on the wiring diagram!
• Basing your diagram off of a team-mate’s diagram, rather than closely inspecting the system for yourself.

Creating and inspecting accurate wiring diagrams should take no more than one full lab
session (3 hours) if the team is working efficiently!

198
Lab questions
• Wiring connections
• Determine correct wire connections between field components and a PLC I/O card to create a working
PLC input or output circuit, based on diagrams of components with terminals labeled
• Correctly determine all electrical sources and loads, as well as all voltage polarities and current directions,
in a DC input or output circuit, based on diagrams of field components and the PLC’s I/O card with
terminals labeled

• Commissioning and Documentation


• Explain what is meant by the term “sinking” with regard to a PLC input card (DC)
• Explain what is meant by the term “sourcing” with regard to a PLC input card (DC)
• Explain what is meant by the term “sinking” with regard to a PLC output card (DC)
• Explain what is meant by the term “sourcing” with regard to a PLC output card (DC)
• Explain what a “TRIAC” PLC output card is, and how it differs from DC output cards
• Explain what a “relay” PLC output card is, and how it differs from sourcing or sinking DC output cards
• Explain the distinction between “online” and “offline” programming modes for a PLC

• Mental math (no calculator allowed!)


• Convert a binary number into decimal
• Convert a binary number into hexadecimal
• Convert a decimal number into binary
• Convert a hexadecimal number into binary
• Convert a hexadecimal number into decimal

• Diagnostics
• Examine a PLC program and identify any mistakes in it
• 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
• Propose a diagnostic test for troubleshooting a failed system and then explain the meanings of two
different test results

199
Wiring diagram requirements
• Wiring diagram
• Proper symbols and designations used for all components.
• Relay coil and contacts properly named.

• Text descriptions
• Each instrument documented below (tag number, description, etc.).
• Calibration (input and output ranges) given for each instrument, as applicable.

• 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.

• Cables and tubes


• Multi-pair cables or pneumatic tube bundles going between junction boxes and/or panels need to have
unique numbers (e.g. “Cable 10”) as well as numbers for each pair (e.g. “Pair 1,” “Pair 2,” etc.).

• Energy sources
• All power source intensities labeled (e.g. “24 VDC,” “120 VAC,” “20 PSI”)
• All shutoff points labeled (e.g. “Breaker #5,” “Valve #7”)
file i03655

Answer 91

Notes 91
Wiring diagrams / inspections:
I strongly recommend checking off students’ wiring diagrams while you inspect their circuit (checking
for secure wiring, proper tubing, good conduit installation, etc.) with them. Have all team members take
you on a “tour” of their completed system, with each team member explaining a different portion of the
circuit you select while using their own wiring diagram as a guide. While a student is explaining their section
of the system, you can check the other students’ wiring diagrams for accuracy. This not only saves time
by consolidating the tasks of system inspection and wiring diagram verification, but it also ensures students
can actually relate their wiring diagrams to the system they have built and articulate that understanding to
you.

Troubleshooting fault ideas:


• Strip wire at terminal, then insert insulated wire end under terminal and tighten (open wire fault)
• Cut signal cable somewhere in mid-conduit (open wire fault)
• Push a thumbtack through the cable somewhere in mid-conduit (shorted wire fault)
• Wire instrument cable conductors backward (construction fault)
• Plug air tube connections using portion of foam earplug stuffed into tube fitting (slow response fault)

200
Lab questions

(1) Correctly determine all voltage polarities and current directions in the Q0.0 output circuit of this
Siemens PLC (i.e. circuit powering the LED):

24 VDC

LED (with dropping resistor)

Toggle switch SIEMENS


SIMATIC 1M 1L+ 0.0 0.1 0.2 0.3 0.4 2M 2L+ 0.5 0.6 0.7 1.0 1.1 M L+ DC
S7-200

CPU 224XP
Q0 Q1
DC/DC/DC
SF/DIAG .0 .1 .2 .3 .4 .5 .6 .7 .0 .1
RUN
STOP

.0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .2 .3 .4 .5
I0 I1

1M 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 M L+
Port 1 Port 0

(2) Explain the difference between “online” and “offline” modes in the PLC programming software.

(3) Convert the hexadecimal number 2AE into decimal.

201
(4) This motor refuses to start when the “Start” pushbutton is pressed. Examining the PLC while pressing
the “Start” switch, a technician notices that the LED indicators for input channels 0 and 2 are lit,
but not the LED for input channel 4 or the LED for output channel 5. This same technician suggests
using a voltmeter to test for AC voltage between terminals VAC 2 and OUT 5 on the PLC’s output card.
Identify whether this diagnostic test will provide information useful for pinpointing the fault in this
system, being sure to explain why or why not:

480 VAC Processor Input Output Input


Start
Power 0 4 0 4

supply 1
2
3
5
6
7
1
2
3
5
6
7
1 2 3 4 Analog

IN0 VAC 1 IN 0+
IN1 OUT0 IN 0-
X2 X1 ANL COM
IN2 OUT1 IN 1+
F6 F7 IN3 OUT2 IN 1-
ANL COM
H4 H2 H3 H1 IN4 OUT3
IN 2+
IN5 VAC 2 IN 2- Stop
L1 IN6 OUT4 ANL COM

IN7 OUT5 IN 3+
L2/N IN 3-
F5 COM OUT6 ANL COM
F1 F2 F3 Gnd COM OUT7

5
F4
6

Contactor

T3 T2 T1

Overload
block Reset

Motor

202
Lab questions

(1) Correctly determine all voltage polarities and current directions in the I0.1 input circuit of this Siemens
PLC:

24 VDC

LED (with dropping resistor)

Toggle switch SIEMENS


SIMATIC 1M 1L+ 0.0 0.1 0.2 0.3 0.4 2M 2L+ 0.5 0.6 0.7 1.0 1.1 M L+ DC
S7-200

CPU 224XP
Q0 Q1
DC/DC/DC
SF/DIAG .0 .1 .2 .3 .4 .5 .6 .7 .0 .1
RUN
STOP

.0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .2 .3 .4 .5
I0 I1

1M 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 M L+
Port 1 Port 0

(2) Explain what a “TRIAC” PLC output card is, and how it differs from DC output cards

(3) Convert the decimal number 145 into hexadecimal.

203
(4) This motor refuses to start when the “Start” pushbutton is pressed. Examining the PLC while pressing
the “Start” switch, a technician notices that the LED indicators for input channels 0 and 4 are lit, but
not the LED for input channel 2 or the LED for output channel 5. This same technician suggests using
a voltmeter to test for AC voltage between terminals IN 2 and COM on the PLC’s input card. Identify
whether this diagnostic test will provide information useful for pinpointing the fault in this system,
being sure to explain why or why not:

480 VAC Processor Input Output Input


Start
Power 0 4 0 4

supply 1
2
3
5
6
7
1
2
3
5
6
7
1 2 3 4 Analog

IN0 VAC 1 IN 0+
IN1 OUT0 IN 0-
X2 X1 ANL COM
IN2 OUT1 IN 1+
F6 F7 IN3 OUT2 IN 1-
ANL COM
H4 H2 H3 H1 IN4 OUT3
IN 2+
IN5 VAC 2 IN 2- Stop
L1 IN6 OUT4 ANL COM

IN7 OUT5 IN 3+
L2/N IN 3-
F5 COM OUT6 ANL COM
F1 F2 F3 Gnd COM OUT7

5
F4
6

Contactor

T3 T2 T1

Overload
block Reset

Motor

204
Question 92
Wiring diagram requirements
Perhaps the most important rule to follow when drafting a wiring diagram is your diagram should be
complete and detailed enough that even someone who is not a technician could understand where every wire
should connect in the system!
• Field device symbols
• Proper electrical symbols and designations used for all field devices.
• Optional: Trip settings written next to each process switch.

• PLC I/O cards


• All terminals labeled, even if unused in your system.
• Model number, I/O type, and PLC slot number should be shown for each and every card.

• 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”)

205
Field Field junction box JB-28 PLC cabinet

PSH-10 Cable PSH-10 TB-43 TB-7


Trips @ 35 PSI rising
Red Red Blu 1746-IB8
NC IN0
1 Grn 1 Discrete input
Blu
COM 2 2
Blk Blk IN1 24VDC sinking
Blu
3 Slot 4
Blu
IN2
4
Blu
Sample Input Wiring Diagram

5 IN3
Blu
6
PB-5 Blu
IN4
Reset 7
Cable PB-5 Blu
Red Red Org 8
NO IN5
11
Gry
C 12
Blk Blk IN6

206
IN7

COM

Blk COM

Fuse block
(1 amp each)
Gry Red
1 24VDC L1
Red Power supply
120 VAC
2 Bkr #3
Red L2
3
Red
4
Field Field junction box JB-28 PLC cabinet
Trip solenoid TB-44 TB-11

file i01880
Cable PY-3
PY-3 Red Red Blk Blk Blu 1746-OA8
5 1 VAC1
Blk Blu
Discrete output
Blk Blk 6 2 100-240 VAC TRIAC
Blu OUT0

3 Slot 1
Blu
Wht 4 OUT1

OUT2
Sample Output Wiring Diagram

PAH-20 OUT3
Alarm lamp Cable PAH-20
Red Red Blk
7 VAC2

Blk Blk 8 Wht OUT4

207
OUT5

OUT6

OUT7

Fuse block
(1 amp each)
Blk Blk
Blk
1 Blk 120 VAC
2 Blk
Bkr #1
Wht
3
Wht
Answer 92
Your loop diagram will be validated when the instructor inspects the loop with you and the rest of your
team.

Notes 92

208
Creative Commons License

This worksheet is licensed under the Creative Commons Attribution License, version 1.0. To view
a copy of this license, visit http://creativecommons.org/licenses/by/1.0/ or send a letter to Creative
Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. The terms and conditions of this
license allow for free copying, distribution, and/or modification of all licensed works by the general public.

Simple explanation of Attribution License:


The licensor (Tony Kuphaldt) permits others to copy, distribute, display, and otherwise use this
work. In return, licensees must give the original author(s) credit. For the full license text, please visit
http://creativecommons.org/licenses/by/1.0/ on the internet.

More detailed explanation of Attribution License:


Under the terms and conditions of the Creative Commons Attribution License, you may make freely
use, make copies, and even modify these worksheets (and the individual “source” files comprising them)
without having to ask me (the author and licensor) for permission. The one thing you must do is properly
credit my original authorship. Basically, this protects my efforts against plagiarism without hindering the
end-user as would normally be the case under full copyright protection. This gives educators a great deal
of freedom in how they might adapt my learning materials to their unique needs, removing all financial and
legal barriers which would normally hinder if not prevent creative use.
Nothing in the License prohibits the sale of original or adapted materials by others. You are free to
copy what I have created, modify them if you please (or not), and then sell them at any price. Once again,
the only catch is that you must give proper credit to myself as the original author and licensor. Given that
these worksheets will be continually made available on the internet for free download, though, few people
will pay for what you are selling unless you have somehow added value.
Nothing in the License prohibits the application of a more restrictive license (or no license at all) to
derivative works. This means you can add your own content to that which I have made, and then exercise
full copyright restriction over the new (derivative) work, choosing not to release your additions under the
same free and open terms. An example of where you might wish to do this is if you are a teacher who desires
to add a detailed “answer key” for your own benefit but not to make this answer key available to anyone
else (e.g. students).

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

209

Potrebbero piacerti anche