Presentation on theme: "Programmable Controller Basics Introduction"— Presentation transcript:
1 Programmable Controller Basics Introduction Dennis WylieSenior Systems Application Engineer1
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.InputsOutputsProgrammable ControllerCR
3 What are typical Input devices for PLC’s? Type of DevicePushbuttonsSelector SwitchesLimit SwitchesLevel SwitchesPhotoelectric SensorsProximity SensorsMotor Starter ContactsRelay ContactsThumbwheel SwitchesTemperature SensorsDevice Ratings120/240 VAC24 VDCSourcingSinking24 VAC4-20mA0-10VDCField input devices provide an electrical signal based on a conditionON, 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 voltagesTTL (5Vdc), 12Vdc, 24Vdc/VAC, 48Vdc, 72Vdc, 120Vac, 220Vac etc...3
4 What are typical output devices for PLC’s? Type of DeviceValvesMotor StartersSolenoidsControl RelaysAlarmsLightsFansHornsHeatersDevice RatingsRelays240 VACVAC/VDC24 VAC/VDCTriac120/230 VACTransistor MOSFET24 VDC4-20mA0-10VDCField output devices are controlled by electricity being switched by the PLC.ON, OFF etc..PLC’s “Switch” electricity, they do not “supply” electricityThe design of the outputs determines the type of electrical “Load” that can be used.Different applications may require specialized output designs.Voltage/Current issues includeHigher current - relaysLonger life cycle - solid state (Triacs for AC, MOSFET for DC)Triacs 120Vac applications 1/2 amp maximum loadMOSFET 24Vdc applications 1 amp maximum loadIsolation 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 controlLadder diagram program representationDesigned for industrial environmentDesigned for ease of use and maintenanceEasy to programEasy to maintainQuick to installAdaptable to changeGreat low cost alternative tomultiple individual relays, timersand counters as well as dedicatedsingle board controllers.
6 What's really inside a PLC? CRIsolationBarrierMEMORYprogramdataHighVoltageLow VoltageAC Power SupplyVAC, 50/60HzOutputCircuitsExternalDC Power SupplyorRS-232CommunicationsInputCentralProcessor(CPU)
7 PLC’s Come in a Variety of Sizes... PicoTypically less than 20 I/OMicroTypically less than 32 I/OSmallTypically less than 128 I/OMediumTypically less than 1024 I/OLargeTypically greater than 1024 I/O10 I/O and less, MicroLogix32 I/O and less, MicroLogix128 I/O and less, MicroLogix 15001024 I/O and less, SLC500, PLC51024 I/O and greater, PLC56
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)SequencingData ManipulationProportional, Integral, Derivative (PID) Control
9 So where could you use a PLC? Conveyor controlPrinted circuit board handling equipmentSCADA(Supervisory Control And Data Acquisition)remote pump/lift station (water/wastewater)Flow monitoring for leak detection (oil&gas)Strapping machinery / trash compactorsPalletizersCompressor controlReplace hard-wired relay panels or SBCsMany, many more
10 What to consider when applying a PLC Inputs/OutputsType,AC, DC, Analog, Thermocouple sourcing, sinking, etc.Number of Inputs/Outputs including embedded, local expansion, and networked I/O10, 16, 20, 32, 138, 156, >256MemorySize1k, 6k, 8k 12k, 14k,Functions requiredPIDPTO/PWM (Pulse Train Output/Pulse Width Modulated)Data LoggingMessaging between PLC’sMath CalculationsCommunications NetworksDeviceNet, EthernetDF1 Full Duplex, DF1 Half Duplex, DF1 Radio Modem, DH485, ModBus Master / Slave
11 Programmable Controller Basics PLC Program Files 1
13 PROGRAM FILESMicroLogixMEMORY1System23Reserved4PROGRAMFILES5Main ProgramError File6 - 15HSC FileSTI FileSubroutineFilesThere 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 fileTypically is where the “main” user program residesMust have some program logicWhere jump to subroutines originate
15 Programmable Controller Basics PLC data types 1
16 Data definitions and data types PLC Data TypesBitB3 file of PLCInteger (signed) to 32767N7 file of PLCFloating PointF8 file of PLCASCIIString data “My Text String”Remember :Bits1 or 0Words(16 bits) 2 bytesMemoryIs 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 manipulatedA 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.DataIs information stored at a memory addressThe “type” of data is determined by the function that is desired, or defined by the operating systemIn 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 #0File TypeOutput NumberWhere the OutputWas connected to the PLCO0:0/0OutputsFile Number11Word 0File TypeFile #1I1:0/0Input NumberWhere the InputWas connected to the PLC1Output 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.Inputs15File NumberWord 08
19 File #3 = Bit FileWord 0:B3:1/0ORWord 1:B/16The 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.011
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 baseT4:0File TypeFile NumberTimer NumberTimers are one of the most powerful features in the PLC.They are easy to use, flexible and you have 40 in the MicroLogix 1000.4Timers12
22 T4:0 Addressing Timers 4 Timers File Type Timer Number File Number Preset ValueAccumulated Value151413ENTTDNWord 0Word 1Word 2Preset 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.015
24 C5:0 File #5 = Counters Up, Down, and Up/Down Counters 5 Counters File TypeFile NumberCounter Number5CountersCounters 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 NumberCounter Number5CountersPreset ValueAccumulated Value151413CUCDDNOVUN1211Word 0Word 1Word 2Preset C5:0.PRE How many the counter should count up toAccumulated 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 PLCsA graphical representation of the program designed to look like relay logicCalled ladder logic because it resembles the rungs of a step ladder you might have at home.
28 Conversion Example Relay Diagram to Ladder Logic PB1LS1PS2SOL6I/5I/6I/7O/0| || || |( )DEVICE NAMEPB1LS1PS2SOL6PLC ADDRESSI:0/5I:0/6I:0/7O:0/0
29 Addressing Input Instructions FalseTrueExamine OFF-|/|-XIOThe instruction is:The input bit isLogic 0Logic 1Examine ON-| |-XICIf the input device isOpen (0)Closed (1)These are not normally open (N.O.) and normally closed (N.C.)XIC = Examine When Closed, ON or when voltage is presentXIO = Examine When Open, OFF or when voltage is not present
31 Ladder Logic Concepts |/| | | ( ) |/| | | ( ) T F F T T T Read / ConditionalInstructionsWrite / ControlInstructions|/|| |( )TFFNo Logical Continuity|/|| |( )TTTLogical Continuity
32 Logical AND exampleIF input 4 AND input 5 have power THEN energize output 0On| |I/4| |I/5( )O/0TTTLogical Continuity
33 Logical OR exampleIF input 4 OR input 5 have power THEN energize output 0TOn| |I/4( )O/0Logical Continuity| |I/5FFOn| |I/4( )O/0Logical Continuity| |I/5T
34 Example Timer ProgramThe Timer’s “done bit” turns the motor off after a 10 second time delayTIMER ON DELAYTimer T4:0Time BasePresetAccumTONStopStartMotor]/ [( )I:0/0I:0/1M1O:0/3T4:0/DN(EN)(DN)Timer DoneThis 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 program14
35 Example Counter Program The Counters “done bit” stops the motor from running, after 10 operations.StopStart] [I:0/0Counter DoneMotorI:0/1C5:0/DNO:0/3]//[( )M1O:0/3] [M1O:0/3CTU] [Count UpCounter C5:0Preset 10Accum 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)ResetI:0/4C5:0] [(RES)18
36 Programmable Controller Basics Understanding the PLC operating cycle and examining a real application.
37 Understanding the PLC Operating Cycle STARTHousekeepingInput ScanInternal 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 ScanProgram ScanThe 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 modeEach 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 ASolenoid Valve 1Ingredient BSolenoid Valve 2MotorIngredient AIngredient BSensor 1Sensor 2Start/ Stop SwitchHere we have a typical example of an application that a PLC would be ideal for:Digital (on/off) controlsHighly repetitiveDrainSolenoid Valve 313
39 Sequence of Operation of the Mixer Solenoid Valve 1On = Sol 3 is off, and Motor is off, and Sensor 2 is off, and Start Switch is onOff = Sol 3 is on, or Motor is on, or Sensor 2 is onStep 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 1Solenoid Valve 2MotorIngredientAIngredientBSensor 1The 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 SwitchSolenoid Valve 2On = Sol 3 is off, and Motor is off, and Sensor 2 is onOff = Sol 3 is on, or Motor is on, or Sensor 1 is onSensor 2Solenoid Valve 314
40 Sequence of Operation of the Mixer Step 3Once 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 3On = 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.MotorSolenoid Valve 1Solenoid Valve 2Solenoid Valve 3Sensor 1Sensor 2IngredientABThe 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 SwitchMotorOn = Sensor 1 is on, Sensor 2 is on and Sol 1 is off, Sol 2 is off, Sol 3 is offOff = Sol 3 on, Sol 1 is on, Sol 2 is on14
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 ConcertsRolling Stones / U2Brooks & Dunn / Reba McEntireBroadwayPhantom of the OperaMiss SaigonTelevisionMTV Video Music AwardsVH-1 Fashion AwardsRequirement: 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 optionsRolling center deck to join both band pitsFiery light show with 60 ft. tall “volcano” and drape
43 Monster Truckin’ Customer: Dan Patrick Designer and driver of monster trucksSampsonRequirement: 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 relaysControls shifting mechanismRace 5-6 seconds long1.5 seconds to shift from 1st to 4th gear with 100 shifts per nightKeeps rpms steady by eliminating possibility of over-revving the motor$300 control solution protects $55,000 investment in transmission and motorHand-Held Programmer trace key reduces troubleshooting time
44 “Operation MicroLogix” Customer: United States ArmyRequirement: 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.
Your consent to our cookies if you continue to use this website.