0% found this document useful (0 votes)
70 views45 pages

EET 319 Programmable Logic Controllers

The document discusses a course on programmable logic controllers (PLCs). It outlines topics to be covered including PLC components, Boolean algebra, ladder logic programming, motors, latches, and program documentation. It also discusses labs and lab report formats.

Uploaded by

Ian Spacek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views45 pages

EET 319 Programmable Logic Controllers

The document discusses a course on programmable logic controllers (PLCs). It outlines topics to be covered including PLC components, Boolean algebra, ladder logic programming, motors, latches, and program documentation. It also discusses labs and lab report formats.

Uploaded by

Ian Spacek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 45

EET 319 Programmable Logic Controllers

Outline for Today

Course description
Introduction to PLCs / Key components
Boolean algebra
Programming
Ladder logic
Discussion of labs / Lab report format
Motors 
Seal-in logic / Latches
Interlocks
Program Documentation
Wednesday -- start Labs 1+2 (no lab report due)
Course Description

Syllabus

Some notes on the labs:


–  Activities vs. Skills
–  Ignore the “Self Review” questions
– Show me or your TA when each
   activity is completed
–  Lab partners should trade functions
   (You will need to do everything yourself,
   for the midterm and final.)
- Split sections: -001 and –002 are together for lecture;
   -001 has lab 1500-1700 on Wednesdays (3-5PM)
   -002 has lab 1700-1900 on Wednesdays (5-7PM)
Programmable Logic Controllers.
What are PLCs?
A PLC™* is a device that was
developed to replace the necessary
sequential switches, relay circuits,
timers, counters, I/O, etc. for
machine control.
• Ruggedized
• Specialized I/O
• Real time

Compare with microcontrollers:


• System-on-a-chip
• Aimed at embedded control
*"Programmable Logic Controller" is technically an • Minimize interrupt latency over
Allen-Bradley trademark, but used generically.
instruction throughput
(think "Kleenex.") • Useful for large number of systems
A Little History
In the old days when you wanted to automate a process in an industrial
application, you had to hard-wire all the components needed to automate
the process (switches, relays, solenoids, timers, counters, etc.)
For example, suppose you wanted to automate the following process
1. fill a vat half way with one material
2. add a second material
3. stir for 3 minutes
4. heat to some
temperature for
5 minutes
5. empty the vat and
repeat the process
10 times before
stopping
A Little History
You would have to physically wire together two timers, a counter, a temperature
sensor, a motor controller, a heater, two level sensors, three solenoids to control the
flow in such a way that each event actuated the next in the proper order.
The electromechanical components such as timers and counters are expensive,
large, and eventually prone to wear out and fail.
If you wanted to reconfigure the system (for example to heat before stirring), you
had to manually rewire it.
A Little History
With the advent of (relatively) low-cost computers, it became possible to
replace much of the automation system.
The timers, counters, etc. were now internal registers in the CPU, so they
were now essentially free (once you had bought the one controller.)
Better still, the system could be reconfigured simply by rewriting the
software. (Eventually, this could even be done remotely.)
Eventually, specialized CPUs and I/O modules were developed, initially by
Allen-Bradley, that were aimed at the harsh environment and specific I/O
and timing requirements of the industrial environment.
Thus, the PLC was born.
Functional Design
Processor

CPU

Memory
Input Output
Module relays
Internal utility
relays (bits)

logical Counters

Timers

Output
circuits

Input
circuits
Key components: switches

Source: http://en.wikipedia.org/wiki/Switch
Key components: switches
Key components: relays

Symbols:

Examine If
Closed - XIC

Examine If
Open - XIO
Key components: counters and timers

• Counters count events (switch presses, etc.)


• Timers time events (duration on, duration off, etc.)
• We’ll see how to use both of these in a few weeks.
Boolean algebra
truth table

NOT Q=A
(INVERT)

AND Q=A B
= AB

OR Q=A+B

Q=A B
NAND = AB

NOR Q=A+B
Boolean algebra
truth table

XOR Q = A + B = AB + AB

XNOR
De Morgan’s Laws (or De Morgan’s theorem)

A B = (A + B)

A + B = (A B)

• De Morgan’s Laws show how to simplify an inverted


expression.
• An inverted “+” becomes a “*”
• An inverted “*” becomes a “+”.
• Or … “Break the line, change the sign.”
The Relationship between Relays
and Boolean Logic
Suppose you have two relays connected to an output (indicated by the
circle) between two supply rails (e.g., 0 and 12 V)

A B C

0V +12 V
When will the output be turned on?

Only if relay A is energized AND if relay B is energized

This is functionally the same as a digital AND gate


The Relationship between Relays
and Boolean Logic
Here’s an OR gate
A
C

B
0V +12 V

and a NOT (inverter) gate

A C

0V +12 V
The Relationship between Relays
and Boolean Logic
How would you do a NOR gate?
One way is to use the output from one relay circuit as the input for
another
A
Output 1

B
Output 2

Output 1
0V +12 V
Here’s a better way using De Morgan’s
theorem
A + B = (A B), so

A B A+B

0V +12 V
Ladder Logic
The way in which we just represented these relay circuits is known as
“Ladder Logic” (it actually predates the development of PLCs)
Ladder logic started out as a hand-drawn graphical representation of the
way in which the automation system was connected together
With the advent of microprocessor-based PLCs, software applications
were developed to support computer-aided design of ladder logic
programs
Ladder Logic
Over the years there have been attempts to support programming in
other languages, and different languages are supported by different
vendors
Here are a few (list not updated recently)

Ladder Logic A-B, Mitsubishi, B&R, Modicon,


Siemens
Structural text A-B, B&R, Modicon, Siemens
C B&R, A-B (with co-processor)
Functional Block Diagram A-B,B & R, Modicon,Siemens
Sequential flow chart A-B, Mistubshi, Modicon, Siemens
Automation basic B&R

* "A-B" => Allen Bradley

* "B&R" is really "B&R" (Founded by E. Bernecker & J. Rainer)


Ladder Logic Voltage rails

L1 L2
A B CR1 Coil
Output Energize (OTE)

A B

L1
CR1
How the CPU executes
the program
lamp
Rule Number 1: you can’t have a given
output on more than one ladder rung!
(If so, it ignores all but the last one.
It won't tell you – it will just do it.)
Some terminology

EXAMINE IF CLOSED (XIC)

EXAMINE IF OPEN (XIO)

OUTPUT ENERGIZE (OTE)


Three ways logic output can be affected
XIC / XIO NC / NO Pressed Result
Symbol? Switch type? or not?
NO N 0

NO N 1

NC N 1

NC N 0

NO Y 1

NO Y 0

NC Y 0

NC Y 1
Addressing

I:1/0 (shorthand type i;1/0, can be lower case “I”)

Input rack input #


location
Common "Gotcha":

The first character


O:2/0 (shorthand type o;2/0) is always a letter,
not zero or one!
Output rack output #
location
RSLogix – a Graphical Programming Language
The Program in Operation

The program on the previous


slide emulates an automation
scenario in which a piston
places an object under a drill
press and a second piston drills
it, then the process repeats
This figure shows the PLC with
an electropneumatic panel that
actuates when the program is
running.
Wiring Diagrams and I/O Diagrams
To prepare and document a complete description of your project you
need two things before you start you ladder logic program – a power
(or wiring) diagram and an I/O diagram.

Here’s the power diagram for


the Electropneumatic panel
on the previous slide.
Wiring diagrams and I/O diagrams
To prepare and document a complete description of your project, you
need two things before you start you ladder logic program – a power
diagram and an I/O diagram.

This is the I/O diagram for


the same panel.
Note the convention:
rectangles are inputs,
diamonds are outputs,
inputs are attached to the RETRACTED

left rail, outputs to the right


rail
Notes for the lab exercises:
Three things to note (write these down):
1. When you open a new file you have to tell RSLogix the
following:
a. The processor is a 1747-L514
b. In I/O Configuration:
• Rack size is “7” (It defaults to 4, which will cause a fault)
• Input module in slot 1 is a 1746-IB16
• Output module in slot 2 is a 1746-OB16
2. If it gives you a warning that it can’t communicate with the
processor, make sure the driver is correct:
• AB_DF-1
3. Several lab exercises call for you to open a “canned”
program – the program should be in a folder marked
something like, “canned programs”; if it isn’t, search for
it or ask your instructor or TA.
Homework (due next week*)
0. a) Review the brief video on Rockwell/Allen-Bradley devices
at http://www.youtube.com/watch?v=lBp5ag6SJH4
b) If you had trouble with the pre-quiz, review Petruzella,
Chapter 3
1. Read Petruzella, Chapters 1, 2 (sections 2.1- 2.4), and 4
2. Do Chapter 1, Question 3, Problems 4 & 5* and Chapter
4, Question 4, Problems 1 & 2**

*Note that the author divides homework into “Questions” and


“Problems”
** Note that P2 is continued on the next page
Lab Report Format
Follow A Guide to Laboratory Report Writing for Digital and Processor-based
Courses (as closely as makes sense)

Emphasis is on readability (and usefulness of report for replication of results)


• Objective(s)  What did you set out to do or learn?
• Introduction  Background, uses for this, etc
• Procedure  What did you do, in your own words?
• Results  What happened, specifically?
• Conclusions  What can you conclude from these results?

Figures  Ladder logic diagrams are usually needed.


Power and I/O diagrams could be needed, too.
Grading
Write your lab reports as if your team was hired by an engineering
firm to investigate whatever phenomenon or skill or activity the lab covers.
Describe what was done, what results you got, and how you got them (so that
someone else can replicate your work.)
Motor Control
Motor controllers are classified by the type of motor
they control (permanent magnet, servo, series,
separately excited, AC, etc.)
• H-bridge
• Servo controller (usually via pulse-width
modulation)
• Stepper motor controller

H-bridge Servo motor


Note that some of the Motor Panel inputs override (parallel) the switches on the main panel.
Note, also, that PB2 is a normally-closed switch! (I:1/1 will be on when the switch is not pressed.)
PLC Motor Panel
PLC Motor Panel: Controls

PB-1: Normally OPEN, connected to I:1/0


PB-2: Normally CLOSED, connected to I:1/1 (e-stop)
SS-1: On/Off/On switch: I:1/2 (Left); I:1/3 (Right)
PLC Motor Panel: Motor 1
LS-1  I:1/4
LS-2  I:1/5
LS-3  I:1/6
LS-4  I:1/7

These are N/O but usually pressed, so they act like N/C.

O:2/0 makes Motor 1 turn clockwise;


O:2/1 makes Motor 1 turn counter-clockwise.
(Both outputs active at once causes the motor to just stop)
Seal-in Logic: A very important idea…

PB (NC) PB (NO) O:2/1

O:2/1

Latches the function after pushbutton is pushed


Typical use: Pushbutton start/stop
Seal-in Logic

PB (NC) PB (NO) O:2/1

O:2/1

When the button is pressed…


Seal-in Logic

PB (NC) PB (NO) O:2/1

O:2/1

…the output goes active


(unless the E-stop is pressed.)
Seal-in Logic

PB (NC) PB (NO) O:2/1

O:2/1

…but the output going active means O/2:1 is true


Seal-in Logic

PB (NC) PB (NO) O:2/1

O:2/1

…so now, even if the start button is released,


the output stays energized. It is “sealed in.”
Seal-in Logic

PB (NC) PB (NO) O:2/1

O:2/1

So how do we stop it? Press the E-stop button.


Now you’re ready to do the first lab exercise (1&2)

(Note that no lab report is due for labs 1&2;


the first lab report will be for Lab 3.)

N.B. For all lab exercises, save all your files on a flash
drive or mail them to yourself etc.

You will need some of them in later exercises; the


computer may delete your files every time it is shut
down.
Questions?

You might also like