Presentation on theme: "Dennis Wylie Senior Systems Application Engineer Programmable Controller Basics Introduction."— Presentation transcript:
Dennis Wylie Senior Systems Application Engineer Programmable Controller Basics Introduction
2 Programmable Controller Inputs Outputs CRCR So what is a P rogrammable L ogic C ontroller? A solid state device that controls output devices based on input signals and a user developed program. Originally developed to directly replace relays used for discrete control.
3 What are typical Input devices for PLC’s? Type of Device Pushbuttons Selector Switches Limit Switches Level Switches Photoelectric Sensors Proximity Sensors Motor Starter Contacts Relay Contacts Thumbwheel Switches Temperature Sensors Device Ratings 120/240 VAC 24 VDC –Sourcing –Sinking 24 VAC 4-20mA 0-10VDC
4 What are typical output devices for PLC’s? Type of Device Valves Motor Starters Solenoids Control Relays Alarms Lights Fans Horns Heaters Device Ratings Relays –240 VAC –85-120 VAC/VDC –24 VAC/VDC Triac –120/230 VAC Transistor MOSFET –24 VDC 4-20mA 0-10VDC
5 General PLC Concept PLC performs relay equivalent functions PLC performs ON/OFF control Ladder diagram program representation Designed for industrial environment Designed for ease of use and maintenance Easy to program Easy to maintain Quick to install Adaptable to change Great low cost alternative to multiple individual relays, timers and counters as well as dedicated single board controllers.
6 CR Isolation Barrier Isolation Barrier MEMORY program data High Voltage High Voltage Low Voltage AC Power Supply 85-264 VAC, 50/60Hz OutputOutput CircuitsCircuits External DC Power Supply or RS-232 Communications InputInput CircuitsCircuits Central Processor (CPU) What's really inside a PLC?
7 PLC’s Come in a Variety of Sizes... Pico –Typically less than 20 I/O Micro –Typically less than 32 I/O Small –Typically less than 128 I/O Medium –Typically less than 1024 I/O Large –Typically greater than 1024 I/O
8 Today's Applications require high Level Control Capability Arithmetic (Addition, Subtraction, Multiplication, Division, etc) Data Comparison (Equal, Greater Than or Equal, Less Than or Equal) Word Manipulation (Copy, Move, etc) Sequencing Data Manipulation Proportional, Integral, Derivative (PID) Control
9 So where could you use a PLC? Conveyor control Printed circuit board handling equipment SCADA(Supervisory Control And Data Acquisition) –remote pump/lift station (water/wastewater) –Flow monitoring for leak detection (oil&gas) Strapping machinery / trash compactors Palletizers Compressor control Replace hard-wired relay panels or SBCs Many, many more
10 What to consider when applying a PLC Inputs/Outputs –Type, AC, DC, Analog, Thermocouple sourcing, sinking, etc. –Number of Inputs/Outputs including embedded, local expansion, and networked I/O 10, 16, 20, 32, 138, 156, >256 Memory –Size 1k, 6k, 8k 12k, 14k, Functions required –PID –PTO/PWM ( Pulse Train Output/Pulse Width Modulated ) –Data Logging –Messaging between PLC’s –Math Calculations Communications Networks DeviceNet, Ethernet DF1 Full Duplex, DF1 Half Duplex, DF1 Radio Modem, DH485, ModBus Master / Slave
Programmable Controller Basics PLC Program Files
12 Memory Organization MicroLogix MEMORY PROGRAM FILES 0 1 2 3 4 5 6 - 15 System Reserved Main Program Error File HSC File STI File Subroutine Files DATA FILES 0 1 2 3 4 5 6 7 Output File Input File Status File Bit File Timer File Counter File Control File Integer Files
13 PROGRAM FILES PROGRAM FILES 0 1 2 3 4 5 6 - 15 System Reserved Main Program Error File HSC File STI File Subroutine Files MicroLogix MEMORY There are several different program files inside of a PLC. Lets talk about the main one we will use today.
14 File #2 = Main Program Dedicated & Open file Main Ladder Program –Most important file –Typically is where the “main” user program resides –Must have some program logic –Where jump to subroutines originate
Programmable Controller Basics PLC data types
16 Data definitions and data types PLC Data Types Bit –B3 file of PLC Integer (signed) -32768 to 32767 –N7 file of PLC Floating Point –F8 file of PLC ASCII –String data “My Text String” Remember : Bits 1 or 0 Words (16 bits) 2 bytes
Programmable Controller Basics Addressing the PLC instructions to real devices
18 O0:0/0 File Type File Number Output Number Where the Output Was connected to the PLC 0 Outputs 110 0 0 0 0 0 0 Word 0 150 Word 0 I1:0/0 File Type File Number Input Number Where the Input Was connected to the PLC 1 Inputs 0 0 0 0 0 0 0 0 File #0 File #1 Addressing Inputs and Outputs
19 B/16 OR B3:1/0 0000 0000 15 14 13 1211 10 9 8 7 6 5 4 3 2 1 0 Word 0: Word 1: 0000 0000 15 14 13 1211 10 9 8 7 6 5 4 3 2 1 0 31 30 29 2827 26 25 2423 22 21 2019 18 17 16 15 14 13 1211 10 9 8 7 6 5 4 3 2 1 0 File #3 = Bit File Bits in a PLC can be used to turn on a real device, or bits can be used as “storage”. They may just indicate when a condition exists within your program that you want to use in another part of your logic. For example, if the fact that a push button is pressed is important to the logic of your program, but additional conditions also need to be present for an real output to turn on, you may wish to store the state of the push button as a bit.
20 | I:0.0 0 Timers Timer Operation The timer times as long as its rung conditions are TRUE. When the timer times up to a specified value, it alerts the rest of the program by setting a bit. When the rung becomes FALSE, the timer stops timing and resets itself to zero.
21 T4:0 File Type File Number Timer Number 4 Timers File #4 = Timers File #4 –TON, TOF, and RTO Timer On Delay (Turn On when the timer reaches preset value) Timer Off Delay(Turn Off when the timer reaches preset value) Retentive Timer On ( Even after rung conditions are false this timer remembers where it left off.) –.01 and 1 second time base
22 PresetT4:0.PREHow long the timer should time for. AccumulatedT4:0.ACCHow long the timer has timed for already. DoneT4:0/DNSet to “1” when accumulated value > preset value. Timer TimingT4:0/TTSet to “1” when accumulated value < preset value. EnableT4:0/ENSet to “1” when the rung containing the timer is true. T4:0 File Type File Number Timer Number 4 Timers Preset Value Accumulated Value 151413 ENTTDN Word 0 Word 1 Word 2 Addressing Timers
23 | I:0.0 0 Counters Counter Operation –The counter counts (by one) every time its rung goes from FALSE to TRUE. When a specified number of counts has been reached, the counter alerts the rest of the program by setting a bit. The program must reset the counter to start counting from zero again.
24 C5:0 File Type File Number Counter Number 5 Counters File #5 = Counters Up, Down, and Up/Down Counters
25 PresetC5:0.PREHow many the counter should count up to AccumulatedC5:0.ACCHow many the counter has counted already. DoneC5:0/DNSet to “1” when accumulated value > preset value. Count UpC5:0/CUSet to “1” when state of CTU rung are true. Count DownC5:0/CDSet to “1” when state of CTD rung are true. Over/UnderflowC5:0/OV,UNSet to “1” when counter counts past 32,767 or -32,768. C5:0 File Type File Number Counter Number 5 Counters Preset Value Accumulated Value 1514 13 CUCDDN OV UN 1211 Word 0 Word 1 Word 2 Addressing Counters
Programmable Controller Basics So what is ladder logic and how do I connect devices and write a program?
27 What is Relay Ladder Logic? –Is the primary programming language for PLCs –A graphical representation of the program designed to look like relay logic –Called ladder logic because it resembles the rungs of a step ladder you might have at home. Relay Ladder Logic (RLL)
29 Addressing Input Instructions False True Examine OFF -|/|- XIO False The instruction is: The input bit is Logic 0 Logic 1 True Examine ON -| |- XIC If the input device is Open (0) Closed (1) These are not normally open (N.O.) and normally closed (N.C.) XIC = Examine When Closed, ON or when voltage is present XIO = Examine When Open, OFF or when voltage is not present
30 Addressing Output Instructions Rung State Output Bit Output Terminal De-energized TRUE FALSE ON OFF OTE Output Energize -( )- | |/|( ) TT T ENERGIZED
31 Ladder Logic Concepts Read / Conditional Instructions Write / Control Instructions No Logical Continuity |/|| TF F ( ) |/|| TT T Logical Continuity
32 Logical AND example IF input 4 AND input 5 have power THEN energize output 0 | I/4 | I/5 ( ) O/0 Logical Continuity TT T On
33 Logical OR example IF input 4 OR input 5 have power THEN energize output 0 | I/4 | I/5 ( ) O/0 Logical Continuity F T On T | I/4 | I/5 ( ) O/0 Logical Continuity F On
34 TIMER ON DELAY Timer T4:0 Time Base 1.0 Preset 10 Accum 0 TON Stop Start Motor ]//[ ] [ ( ) I:0/0 I:0/1 M1 O:0/3 ] [ M1 O:0/3 ]/[ T4:0/DN ( EN ) ( DN ) Timer Done Example Timer Program The Timer’s “done bit” turns the motor off after a 10 second time delay
35 Count Up CounterC5:0 Preset10 Accum0 CTU Stop Motor ]//[ ] [ ( ) Start ] [ I:0/0 I:0/1 M1 O:0/3 ] [ M1 O:0/3 ]/[ C5:0/DN ( CU ) ( DN ) Counter Done Reset ] [ I:0/4 ( RES ) C5:0 Example Counter Program The Counters “done bit” stops the motor from running, after 10 operations.
Programmable Controller Basics Understanding the PLC operating cycle and examining a real application.
37 Input Scan Program ScanOutput Scan Housekeeping START Each ladder rung is scanned using the data in the Input file. The resulting status (Logic being solved) is written to the Output file (“Output Image”). The status of external inputs (terminal block voltage) is written to the Input image (“Input file”). The Output Image data is transferred to the external output circuits, turning the output devices ON or OFF. Internal checks on memory, speed and operation. Service any communication requests, etc. Understanding the PLC Operating Cycle
38 Motor Ingredient A Solenoid Valve 1 Ingredient B Solenoid Valve 2 Drain Solenoid Valve 3 Sensor 2 Ingredient B Typical PLC application Start/ Stop Switch Ingredient A Sensor 1
39 Motor Solenoid Valve 1 Solenoid Valve 2 Solenoid Valve 3 Sensor 1 Sensor 2 Ingredient A Ingredient B Sequence of Operation of the Mixer Solenoid Valve 1 On = Sol 3 is off, and Motor is off, and Sensor 2 is off, and Start Switch is on Off = Sol 3 is on, or Motor is on, or Sensor 2 is on Solenoid Valve 2 On = Sol 3 is off, and Motor is off, and Sensor 2 is on Off = Sol 3 is on, or Motor is on, or Sensor 1 is on Automatic / Manual Switch Step One: I need to add some ingredient A to the mixer, but I only want to do that when the mixer is empty, the drain is closed, and the motor is not running. Stop when I fill to Sensor 2 level. Step Two: I then need to add some ingredient B to the mixer, but I only want to do that after I’ve added enough ingredient A, the drain is closed, and the motor is not running. Stop when filled to Sensor 1 level.
40 Motor Solenoid Valve 1 Solenoid Valve 2 Solenoid Valve 3 Sensor 1 Sensor 2 Ingredient A Ingredient B Sequence of Operation of the Mixer Step 3 Once I have added my ingredients, I need to mix them for 30 seconds, then I need to drain them from the vessel. I can close the drain after a minute of draining. Automatic / Manual Switch Solenoid Valve 3 On = Sol 1 is off, and Sol 2 is off, and Motor has run for 30 sec. Off = Solenoid 3 has been on for 60 sec, Sol 1 is on, Sol 2 is on, motor is running. Motor On = Sensor 1 is on, Sensor 2 is on and Sol 1 is off, Sol 2 is off, Sol 3 is off Off = Sol 3 on, Sol 1 is on, Sol 2 is on
So what are a few of the ‘Killer’ applications that have been done with MicroLogix controllers?
42 Customer: Tait Towers –World renowned stage design Concerts –Rolling Stones / U2 –Brooks & Dunn / Reba McEntire Broadway –Phantom of the Opera –Miss Saigon Television –MTV Video Music Awards –VH-1 Fashion Awards Requirement: Solution to operate trendy “theater-in-the-round” set design with dramatic effects, flexibility of stage height, plus trouble-shooting capabilities so the show can go on! MicroSolution: 17 MicroLogix 1000s and 1 SLC 500 control and coordinate: (Other products include: limit switches, motors, operator interface, contactors) –Motor driven raising/lowering of 2 band risers with variable height options –Rolling center deck to join both band pits –Fiery light show with 60 ft. tall “volcano” and drape Boot Scootin’
43 Monster Truckin’ Customer: Dan Patrick –Designer and driver of monster trucks Sampson Requirement: Cost effective solution that provides accident-proofed muscle truck able to operate at max speed for most of race, and not require race-day repairs. MicroSolution: 1 MicroLogix 1000 and Hand-Held Programmer: –Replaced relays –Controls shifting mechanism Race 5-6 seconds long 1.5 seconds to shift from 1 st to 4 th gear with 100 shifts per night –Keeps rpms steady by eliminating possibility of over-revving the motor –$300 control solution protects $55,000 investment in transmission and motor –Hand-Held Programmer trace key reduces troubleshooting time
44 “Operation MicroLogix” Customer: United States Army Requirement: Real-Time control of multiple targets on full scale 30 acre urban assault training site. MicroSolution: 330+ MicroLogix 1500 controllers and 1761-NET-ENI’s. –Pop-Up targets and count successful hits. –Communicate using Ethernet and Fiber Optic cables to all MicroLogix controllers. –Interface to advanced human interface software for control.