Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programmable Controller Basics Introduction

Similar presentations


Presentation on theme: "Programmable Controller Basics Introduction"— Presentation transcript:

1 Programmable Controller Basics Introduction
Dennis Wylie Senior Systems Application Engineer 1

2 So what is a Programmable Logic Controller?
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. Inputs Outputs Programmable Controller CR

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 Field input devices provide an electrical signal based on a condition ON, OFF etc.. The design of the inputs determines the type of electrical signal that can be used. Different applications, and regions may use different voltages. Larger rack mount PLC’s typically support a wider range of input voltages TTL (5Vdc), 12Vdc, 24Vdc/VAC, 48Vdc, 72Vdc, 120Vac, 220Vac etc... 3

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 VAC/VDC 24 VAC/VDC Triac 120/230 VAC Transistor MOSFET 24 VDC 4-20mA 0-10VDC Field output devices are controlled by electricity being switched by the PLC. ON, OFF etc.. PLC’s “Switch” electricity, they do not “supply” electricity The design of the outputs determines the type of electrical “Load” that can be used. Different applications may require specialized output designs. Voltage/Current issues include Higher current - relays Longer life cycle - solid state (Triacs for AC, MOSFET for DC) Triacs 120Vac applications 1/2 amp maximum load MOSFET 24Vdc applications 1 amp maximum load Isolation issues can be crucial for an application. Typically the more isolation provided between output points the better. (The more individual commons the better) This provides customers greater flexibility in wiring and controlling different loads with the same PLC. 4

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 What's really inside a PLC?
CR Isolation Barrier MEMORY program data High Voltage Low Voltage AC Power Supply VAC, 50/60Hz Output Circuits External DC Power Supply or RS-232 Communications Input Central Processor (CPU)

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 10 I/O and less, MicroLogix 32 I/O and less, MicroLogix 128 I/O and less, MicroLogix 1500 1024 I/O and less, SLC500, PLC5 1024 I/O and greater, PLC5 6

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

11 Programmable Controller Basics PLC Program Files
1

12 Memory Organization DATA FILES MicroLogix MEMORY PROGRAM FILES 1 2 3 4
1 2 3 4 5 6 7 Output File Input File Status File Bit File Timer File Counter File Control File Integer Files MicroLogix MEMORY PROGRAM FILES 1 2 3 4 5 6 - 15 System Reserved Main Program Error File HSC File STI File Subroutine Files

13 PROGRAM FILES MicroLogix MEMORY 1 System 2 3 Reserved 4 PROGRAM FILES 5 Main Program Error File 6 - 15 HSC File STI File Subroutine Files 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

15 Programmable Controller Basics PLC data types
1

16 Data definitions and data types
PLC Data Types Bit B3 file of PLC Integer (signed) 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 Memory Is physical space inside the PLC consisting of “addresses”. It’s architecture (design), determines “how much” information each address can store. This is where data is stored, used and manipulated A memory location can store “different” types of data, think of it as a box that can contain an item. Although it may be able to contain different types of items, it can only contain one at a time. Data Is information stored at a memory address The “type” of data is determined by the function that is desired, or defined by the operating system In itself data is not “physical”, data is a pattern of electrical charges that represent a numerical value. Data is by design changeable, memory is physical and cannot be changed. Sometimes you can add or delete memory space, but you cannot “change” it. 5

17 Programmable Controller Basics Addressing the PLC instructions to real devices

18 Addressing Inputs and Outputs
File #0 File Type Output Number Where the Output Was connected to the PLC O0:0/0 Outputs File Number 11 Word 0 File Type File #1 I1:0/0 Input Number Where the Input Was connected to the PLC 1 Output and Input files are the “window” to the external world. Provide the interface to “real” world devices. The Output and Input files are very similar. The number of terminals depends on the type of MicroLogix controller purchased. These locations are “memory” locations. The data at these memory locations represent the status of “field” devices. First 8 Default data files are an AB Standard. Inputs 15 File Number Word 0 8

19 File #3 = Bit File Word 0: B3:1/0 OR Word 1: B/16 The Bit file contains 512 bits for use within the RLL program. These addresses can be accessed at either the word level, or the bit level. Word level when the word and bit is identified, as illustrated with the BLUE numbers above. (B:2/0, first bit of word 2). Bit level when each bit in the entire file is sequential, as illustrated with the RED numbers above. (B/32, first bit of word 2) 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. 10

20 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. | | I:0.0 11

21 T4:0 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 T4:0 File Type File Number Timer Number Timers are one of the most powerful features in the PLC. They are easy to use, flexible and you have 40 in the MicroLogix 1000. 4 Timers 12

22 T4:0 Addressing Timers 4 Timers File Type Timer Number File Number
Preset Value Accumulated Value 15 14 13 EN TT DN Word 0 Word 1 Word 2 Preset T4:0.PRE How long the timer should time for. Accumulated T4:0.ACC How long the timer has timed for already. Done T4:0/DN Set to “1” when accumulated value > preset value. Timer Timing T4:0/TT Set to “1” when accumulated value < preset value. Enable T4:0/EN Set to “1” when the rung containing the timer is true. Timers have a number of features built in. Bit devices assigned to the timer provide timer status, and can be used throughout the program to form working logic. In addition to bits, two “words” are also available, the accumulator (ACC) and the preset (PRE) can be used in comparison and math instructions. 13

23 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. | | I:0.0 15

24 C5:0 File #5 = Counters Up, Down, and Up/Down Counters 5 Counters
File Type File Number Counter Number 5 Counters Counters are another powerful feature in the PLC. They are easy to use, flexible and you have 32 available. 16

25 C5:0 Addressing Counters 5 Counters File Type Counter Number
File Number Counter Number 5 Counters Preset Value Accumulated Value 15 14 13 CU CD DN OV UN 12 11 Word 0 Word 1 Word 2 Preset C5:0.PRE How many the counter should count up to Accumulated C5:0.ACC How many the counter has counted already. Done C5:0/DN Set to “1” when accumulated value > preset value. Count Up C5:0/CU Set to “1” when state of CTU rung are true. Count Down C5:0/CD Set to “1” when state of CTD rung are true. Over/Underflow C5:0/OV,UN Set to “1” when counter counts past 32,767 or -32,768. Counters also have a number of features built in. Bit devices assigned to the counter provide counter status, and can be used throughout the program to form working logic. These bit’s are typically used within the program and provide needed logic functions. In addition to bits two “words” are also available, the accumulator (ACC) and the preset (PRE) can be used in comparison and math instructions. 17

26 Programmable Controller Basics So what is ladder logic and how do I connect devices and write a program?

27 Relay Ladder Logic (RLL)
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.

28 Conversion Example Relay Diagram to Ladder Logic
PB1 LS1 PS2 SOL6 I/5 I/6 I/7 O/0 | | | | | | ( ) DEVICE NAME PB1 LS1 PS2 SOL6 PLC ADDRESS I:0/5 I:0/6 I:0/7 O:0/0

29 Addressing Input Instructions
False True Examine OFF -|/|- XIO The instruction is: The input bit is Logic 0 Logic 1 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
| | |/| ( ) T Rung State Output Bit Output Terminal OTE Output Energize -( )- TRUE ON ENERGIZED FALSE OFF De-energized

31 Ladder Logic Concepts |/| | | ( ) |/| | | ( ) T F F T T T
Read / Conditional Instructions Write / Control Instructions |/| | | ( ) T F F No Logical Continuity |/| | | ( ) T T T Logical Continuity

32 Logical AND example IF input 4 AND input 5 have power THEN energize output 0 On | | I/4 | | I/5 ( ) O/0 T T T Logical Continuity

33 Logical OR example IF input 4 OR input 5 have power THEN energize output 0 T On | | I/4 ( ) O/0 Logical Continuity | | I/5 F F On | | I/4 ( ) O/0 Logical Continuity | | I/5 T

34 Example Timer Program The Timer’s “done bit” turns the motor off after a 10 second time delay TIMER ON DELAY Timer T4:0 Time Base Preset Accum TON Stop Start Motor ]/[ ] [ ( ) I:0/0 I:0/1 M1 O:0/3 T4:0/DN (EN) (DN) Timer Done This example shows how a simple start/stop rung, can turn on a motor that will only run for 10 seconds. This illustrates how simple it is to connect timers to other portions of the PLC program 14

35 Example Counter Program
The Counters “done bit” stops the motor from running, after 10 operations. Stop Start ] [ I:0/0 Counter Done Motor I:0/1 C5:0/DN O:0/3 ]/[ ]/[ ( ) M1 O:0/3 ] [ M1 O:0/3 CTU ] [ Count Up Counter C5:0 Preset 10 Accum 0 (CU) This example illustrates how a start/stop station can be enhanced that will only allow a motor to be started 10 times. This illustrates how simple it is to connect counters to other portions of the PLC program. This is a pretty typical way to alert maintenance people to perform needed tasks after a specified number of operations. The reset bit (I;0/4) could be any bit in the PLC, in many cases this bit is only known to certain people, this is to assure scheduled maintenance is performed. (DN) Reset I:0/4 C5:0 ] [ (RES) 18

36 Programmable Controller Basics Understanding the PLC operating cycle and examining a real application.

37 Understanding the PLC Operating Cycle
START Housekeeping Input Scan Internal checks on memory, speed and operation. Service any communication requests, etc. The status of external inputs (terminal block voltage) is written to the Input image (“Input file”). Output Scan Program Scan The Output Image data is transferred to the external output circuits, turning the output devices ON or OFF. The job description of the PLC when it is the RUN mode 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”).

38 Typical PLC application
Ingredient A Solenoid Valve 1 Ingredient B Solenoid Valve 2 Motor Ingredient A Ingredient B Sensor 1 Sensor 2 Start/ Stop Switch Here we have a typical example of an application that a PLC would be ideal for: Digital (on/off) controls Highly repetitive Drain Solenoid Valve 3 13

39 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 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. Solenoid Valve 1 Solenoid Valve 2 Motor Ingredient A Ingredient B Sensor 1 The first item a user must understand/appreciate is what is the “sequence” of control. This is typically done on a piece of paper by someone who understands and appreciates what needs to occur. Do not “hook up” the PLC and attempt to “write” the program without first determining the application on paper. This is a fairly typical process. The way the notes are written on the side of an illustration is a common practice. This makes it easy to visualize and understand. It will also help when the program is debugged. Automatic / Manual Switch 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 Sensor 2 Solenoid Valve 3 14

40 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. 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 Solenoid Valve 1 Solenoid Valve 2 Solenoid Valve 3 Sensor 1 Sensor 2 Ingredient A B The first item a user must understand/appreciate is what is the “sequence” of control. This is typically done on a piece of paper by someone who understands and appreciates what needs to occur. Do not “hook up” the PLC and attempt to “write” the program without first determining the application on paper. This is a fairly typical process. The way the notes are written on the side of an illustration is a common practice. This makes it easy to visualize and understand. It will also help when the program is debugged. Automatic / Manual Switch 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 14

41 So what are a few of the ‘Killer’ applications that have been done with MicroLogix controllers?

42 Boot Scootin’ 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

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 1st to 4th 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.

45 Questions?


Download ppt "Programmable Controller Basics Introduction"

Similar presentations


Ads by Google