Download presentation
Presentation is loading. Please wait.
1
Programmable Logic Controllers
A Concise Exploration
2
I. Industrial Automation
Common knowledge: computers are used in factories... Robotic arm, CNC, injection molding
3
I. Industrial Automation
Donut machine, Ice cream sandwich machines
4
I. Industrial Automation
Not common knowledge: today this is usually accomplished with Programmable Logic Controllers (PLCs) PLCs are the answer to a variety of needs: durability, reliability, flexibility, scalability, reprogrammability, etc...
5
I. Industrial Automation
Why should you care? Because you will run into PLCs... Did you know? <Insert shocking Buckley statistic here> Median starting salary for entry-level “Electrical Controls Engineer” is $57,452. (EE is $55K, HW Eng is $48K, SW Eng is $53K) [monster.com] As long as there is industry, it will be computer controlled and engineers will earn paychecks.
6
II. History Relentless trend toward tools in industry.
Handicraft (forever) Water-powered silk mill (1721) Spinning Jenny (1764) Steam power (1780s) Gas lighting (1810s) Etc…
7
II. History Obvious next step: Electricity
[Aside: why was Buffalo the place to be 100 years ago? ... Hydroelectric power! – started circa 1853] Electric tools, but still micromanaged by humans.
8
II. History Machines become autonomous. Common method: relay logic
9
III. Relay Logic Conditional logic can be represented in terms of contacts and coils. Contact: A simple input switch. Coil: An output load, e.g., a relay or motor. Symbolic representation called ladder logic.
10
III. Relay Logic To clarify: “Ladder Logic” is a notation originally used to describe/document relay logic configurations. Later became the basis for PLC programming languages (This parallels HW Desc. Langs. (HDLs)... VHDL was intended by DoD to document ASICs... Learn more in CSE 341 and especially CSE 490)
11
IV. Ladder Logic Power supply rails drawn as parallel vertical lines on left and right Connection of rails implies current will flow An output is “on” when a connection is completed and current flows through the load’s coil
12
IV. Ladder Logic Simple “always on” load:
Boring... Load controlled by a single contact: [Switch_Con = Switch]
13
IV. Ladder Logic Boolean logic - C = A and B C = A or B
14
IV. Ladder Logic C = not A A contact with a slash through it is “normally closed.” This indicates a connection when A is NOT triggered. So when sensor/input A is activated, there is an open circuit
15
IV. Ladder Logic Each rung of the ladder is a statement that is asynchronous when implemented in relay logic, but evaluated sequentially by the PLC. X = (A or B) and (C or D), Y = ~A and [B or (C and D)]
16
IV. Ladder Logic Converting between ladder logic and physical electronics is straight forward. So this…
17
IV. Ladder Logic …becomes this:
18
V. PLC The first PLC was invented by Dick Morely in 1978.
Morely designed a computer with three components: a processor, memory, and a logic solver. “[The logic solver] allowed us to get the speed we needed in this application-specific computer to solve the perceptually simple problem of several cabinets full of relay wiring.” -Morely
19
V. PLC The first PLC (the 084) was extremely durable and reliable...
“We used to test the programmable controllers with a Tesla coil that struck a quarter inch to half-inch arch anywhere on the system, and the programmable controller still had to continue to run.” –Morely FYI, this is a Tesla coil:
20
V. PLC Hello World on the PLC. Real hardware: In ladder logic:
21
V. PLC Not very interesting… how about a “stay-on” variation? (When the switch is released, the light stays on) PLC benefit: The state of an “output” in one rung may be used as a “contact” in another. In fact, there are “internal utility relays” – virtual outputs that act as intermediate steps toward real outputs.
22
V. PLC Latched (“stay-on”) Hello World:
When the switch is pressed, “Neon” will be active in the first evaluation. In subsequent evaluations, “Neon” will force itself to stay on.
23
V. PLC A bit more convoluted: toggling Hello World with a single button. Remember - Switch state: ON OFF ON OFF Figure it out Latch = (Switch AND notNeon) OR (Latch AND notNeon) Neon = (Latch AND notSwitch) OR (Neon AND Switch)
24
V. PLC PLCs also support a range of special functions: timers, counters, sequencers, memory instructions, etc… Beyond the basics, they are non-standard and manufacturer-specific.
25
V. PLC Timer: Counter:
26
VI. Washing Machine Washing machine example, using sequencer. Steps:
0. Fill with hot water -pump, hot water valve 5. “Agitate” and drain - spin motor, agitate motor, drain valve 1. “Agitate” – spin motor, agitate motor 6. Fill with cold water -pump 2. “Agitate” and drain – spin motor, agitate motor, drain valve 7. Spin and drain –spin motor, drain valve 3. Fill with hot water -pump, hot water valve 8. Stop 4. “Agitate” - spin motor, agitate motor
27
VI. Washing Machine Reorganize into the “outputs”: edit the I/O Table
Assignment – complete the program – due 2/27 Output Active in steps… Pump 0, 3, and 6 Hot water valve 0 and 3 Spin Motor 1, 2, 4, 5, and 7 Agitate Motor 1, 2, 4, and 5 Drain valve 2, 5, and 7
28
I/O Table – 1st step
29
Exercises Turn 8 LEDs on and off in sequence, repeat.
Turn a pump on for 60 seconds, then off for 40 seconds, then repeat. Use a switch to start it off.
30
Using a sequencer Define a Counter output – call it Seq1
Give it a set value 1 greater than your desired sequences: e.g. if 4, then 0 thru 4 = a set value of 5 Use special bits as inputs Use Seq1:0 to reset the sequencer by defining an output FUNC
31
60 on / 40 off
32
60 on / 40 off Latch an output (keeps it ON)
Count down TMR60 from 60 to 0 While TMR60 is counting down (not at 0) run PUMP While TMR60 is at 0, count down TMR40
33
VII. … References - Old relay logic - Donut machine - Homer Price - Krispie Kreme – Ice Cream Sandwiches – DVD Boxes – Plasma Cutting – Injection Molding -- Injection Molding -- Injection Molding
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.