ESET 225 PLC/Pneumatic Interfacing Past Paper (Week 1-4)

Summary

This document is a collection of notes and diagrams on programmable logic controllers (PLCs), which are used in industrial automation systems. It covers various aspects, including PLC history, components, programming techniques like Ladder Logic, and basic instructions.

Full Transcript

ESET 225 PLC/Pneumatic interfacing Agenda Week # 1  History of PLC  PLC requirements & Main Components 1 PLC training on the web http://www.youtube.com/watch?v=Cm_xlqmPm0c 2 Energy System Engineering 1 History of PLC’s  As automated systems became more complex, relay control circuits became too l...

ESET 225 PLC/Pneumatic interfacing Agenda Week # 1  History of PLC  PLC requirements & Main Components 1 PLC training on the web http://www.youtube.com/watch?v=Cm_xlqmPm0c 2 Energy System Engineering 1 History of PLC’s  As automated systems became more complex, relay control circuits became too large and unwieldy.  Computer programming languages were not easy for factory electricians to use.  In 1968 GM wrote the design criteria for a computer based “relay replacer.” 3 History of PLC’s 4 Energy System Engineering 2 History of PLC’s timeline 5 History of PLC’s timeline cont… 6 Energy System Engineering 3 History of PLC’s timeline cont… 7 History of PLC’s timeline cont… 8 Energy System Engineering 4 PLC’s Programmable logic controllers are now the most widely used industrial process control technology. A PLC is basically a digital computer designed for use in machine control. It has been designed to operate in the industrial environment and is equipped with special input/output interfaces and a control programming language. The structure of a PLC is based on the same principles as those employed in computer architecture. 9 PLC Requirements  Price competitive with relays  Solid-state device  Easily replaceable Input & Output devices  Flexibility of a computer  Tolerate industrial environments  Modular  Reprogrammable  Easily programmed and maintained 10 Energy System Engineering 5 Main Components of a PLC  Power Supply  Processor  Memory  Inputs  Outputs  Programming Unit 11 Power Supply  Converts AC line voltage to suitable DC levels for operation of controller.  Produces DC voltages:  + 5 V for processor logic components (TTL)  ± 12 V and/or 24 V for I/O components  Protects controller from normal line noise Power Supply Energy System Engineering 12 6 Processor  The CPU controls the entire PLC  A special function computer  Runs operating system, manages memory and internal status, monitors Inputs, evaluates user program, updates Outputs  Hardened to be immune from electrical noise 13 Memory  Size depends on type of PLC Partitioned into several areas, such as:  USER Program – where a program is entered  SYSTEM – where operating system, configuration and status information is kept  Specialized Areas – Timers, counters, internal relays, variables, text, etc. 14 Energy System Engineering 7 Input Modules  Allow external sensors to be connected  Optically isolated to protect CPU  Depending on type of PLC there can be: digital Sinking, Sourcing or ‘Dry contact’ analog  High Speed Counter  Network connection 15 Input Modules Input devices such as pushbuttons, limit switches, and sensors are hardwired to the input module terminals. 16 Energy System Engineering 8 Output Modules  Allow PLC to affect the outside world  Optically isolated to protect CPU Depending on type of PLC could be:  DC outputs  AC outputs  Relay Outputs  Analog Outputs 17 Output Modules Output devices such as motor starters, solenoid valves, and indicator lights are hardwired to the output module terminals. 18 Energy System Engineering 9 Programming Devices  Dumb Terminal – obsolete  Dedicated Terminals – becoming less prevalent  Handheld – small, inexpensive, limited display  Microcomputer – most common, versatile, powerful 19 Programming Devices A personal computer (PC) is the most commonly used programming device. The computer monitor is able to display more logic on the screen thus simplifying interpretation of the program. 20 Energy System Engineering 10 Programming a PLC  PLC’s are primarily programmed in Ladder Logic.  The main function of the program is to control outputs based on the status of inputs.  The two main type of symbols used are “Contacts” and “Coils”. 21 Sample ladder Logic 22 Energy System Engineering 11 Ladder Logic Very similar to electrical ladder logic. Usually two vertical “rails” (positive and negative). Joined by horizontal logic “rungs.” If all Input bits on a rung are “True”, then Output will be “ON.” 23 Ladder Logic 24 Energy System Engineering 12 Control System Basics  Contacts describe the information available to the control system.  Coils cause the actions that the control system must perform.  The interconnection of contacts and coils define the decisions that the system makes. 25 PLC Operation A PLC works by continually scanning a program. We can think of this scan cycle as consisting of 3 important steps. There are typically more than 3 but we can focus on the important parts and not worry about the others.  Typically the others are checking the system and updating the current internal counter and timer values. 26 Energy System Engineering 13 PLC Operation  Step 1-CHECK INPUT STATUS-First the PLC takes a look at each input to determine if it is on or off. In other words, is the sensor connected to the first input on? How about the second input? How about the third... It records this data into its memory to be used during the next step.  Step 2-EXECUTE PROGRAM-Next the PLC executes your program one instruction at a time. Maybe your program said that if the first input was on then it should turn on the first output. Since it already knows which inputs are on/off from the previous step it will be able to decide whether the first output should be turned on based on the state of the first input. It will store the execution results for use later during the next step. 27 PLC Operation  Step 3-UPDATE OUTPUT STATUS-Finally the PLC updates the status of the outputs. It updates the outputs based on which inputs were on during the first step and the results of executing your program during the second step.  Based on the example in step 2 it would now turn on the first output because the first input was on and your program said to turn on the first output when this condition is true.  After the third step the PLC goes back to step one and repeats the steps continuously. One scan time is defined as the time it takes to execute the 3 steps listed above. 28 Energy System Engineering 14 PLC Operation: Inputs All the devices supplying information to the PLC are Inputs. Each input has a unique address determined by the terminal where it is connected 29 Input Image Table 30 Energy System Engineering 15 Outputs Any device to be controlled by the PLC must be connected to an output terminal. Each output also has a unique address. 31 Output Image Table 32 Energy System Engineering 16 Summary Ladder Logic is used to program PLC’s. When the PLC executes a program it: – Updates the Inputs, – Evaluates the entire program, – Changes outputs to match results of previous scan. Many instructions and symbols are similar to those used in pneumatic and electric ladder circuits. 33 Energy System Engineering 17 PLC Programming PLC/Pneumatic Interfacing ESET 225 Week # 2 1 Ladder Diagram The ladder diagram language is a symbolic set of instructions used to create the controller program. Representations of contacts and coils are the basic symbols of the logic ladder diagram instruction set. 2 Energy System Engineering 1 Normally Open Contacts The Examine If Closed (XIC) instruction looks and operates like a normally open relay contact. Use the XIC instruction in your ladder program to determine if a bit is On. When the instruction is executed, if the bit addressed is on (1), then the instruction is evaluated as true. When the instruction is executed, if the bit addressed is off (0), then the instruction is evaluated as false. 3 Normally Open Contacts 4 Energy System Engineering 2 Normally Closed Contacts The Examine If Open (XIO) instruction looks and operates like a normally closed relay contact. Use the XIO instruction in your ladder program to determine if a bit is Off. When the instruction is executed, if the bit addressed is off (0), then the instruction is evaluated as true. When the instruction is executed, if the bit addressed is on (1), then the instruction is evaluated as false. 5 Normally Closed Contacts 6 Energy System Engineering 3 !!!! Confusion !!!! 7 Output Energize (OTE) The Output Energize (OTE) instruction looks and operates like a relay coil. This instruction signals the PLC to energize (switch on) or de-energize (switch off ) the output. 8 Energy System Engineering 4 Output Energize (OTE) 9 Output Latch (OTL) and Output Unlatch (OTU) OTL and OTU are retentive output instructions. OTL can only turn on (Set) a bit, while OTU can only turn off (Reset) a bit. These instructions are usually used in pairs, with both instructions addressing the same bit. Latch (SET) will turn on an output continuously until an Unlatch (RESET) instruction is executed 10 Energy System Engineering 5 Output Latch (OTL) and Output Unlatch (OTU) 11 AND Logic Two switches in series used to control an output. 12 Energy System Engineering 6 OR Logic Two switches in parallel used to control an output. 13 Logic Two switches in parallel and this pair in series with a switch used to an output. Can be use for latching logic Energy System Engineering 14 7 Logic Two switches in parallel and in series with a second pair of switches in parallel used to an output. 15 Logic Two limit switches connected in series with each other and in parallel with a third limit switch, and used to control a warning horn. 16 Energy System Engineering 8 Logic Two limit switches connected in series with each other and in parallel with two other limit switches (in series), and used to control a pilot light. 17 Other Logic 18 Energy System Engineering 9 Other Logic 19 20 Energy System Engineering 10 Pneumatic Actuators An actuator is used to convert the energy stored in the compressed air into mechanical motion. A cylinder is the most common type of actuator. It converts the energy into straight line motion. 21 Types of Cylinder Action Single Acting air pressure acts only on one side of the piston returned by spring, gravity or external force Double acting air pressure can act on both sides of the piston force is available in both directions 22 Energy System Engineering 11 Solenoids When electrical current flows through a wire, a small magnetic field is generated. Wrapping the wire in a coil will result in a stronger magnetic field. An iron or steel C-frame will help strengthen and direct the field. A steel plunger can be pulled into the coil by the magnetic field. 23 Solenoid Valves The plunger of a solenoid can be connected directly to a valve spool. Energising the solenoid will shift the spool, changing the flow paths through the valve. 24 Energy System Engineering 12 Solenoid Valve Types Direct Acting – The plunger either opens or closes a poppet, or is directly connected to a spool – Suitable for smaller valves only – Rapid response Solenoid-Pilot – The solenoid operates a small “pilot” valve – Air (or oil) pressure from the smaller valve operates the main valve – Higher flow and pressure capability 25 A Simple Example Design a ladder logic to make a cylinder B continuously reciprocate as long as a SW1 is in the “ON” position. When the SW1 is in the “OFF” position, the sequence will end with the cylinder retracted. 26 Energy System Engineering 13 Designing the Sequence Information available: – ‘PB1’ is for “START / STOP” – ‘a0’ Limit valve at A retracted position – ‘a1’ Limit valve at A extended position – ‘c0’ Limit valve at A retracted position – ‘c1’ Limit valve at A extended position Actions required: – ‘A+’ Solenoid cause A to extend – ‘A-’ Solenoid cause A to retract – ‘C+’ Solenoid cause C to extend – ‘C-’ Solenoid cause C to retract 27 Making Decisions Extend A when ‘a0’, ‘c0’ and ‘PB1’ are on. Extend C when ‘a1’ and ‘c0’ is on. Retract A when ‘a1’ and ‘c1’ is on. Retract C when ‘a0’ and ‘c1’ is on. 28 Energy System Engineering 14 LAB DEMO 1.Cylinder sequence. A+, C+, A-, C- Allen-Bradley PLC Files PLC/Pneumatic Interfacing ESET 225 1 About Files All information about the program and data are stored in Files There are two types of Files: 1. Program Files - containing controller information and user programs 2. Data Files - containing information relating to I/O and program instructions 2 Energy System Engineering 1 About Files Program and Data file organization for the SLC 500. 3 About Files Program and Data file organization for the SLC 500. 4 Energy System Engineering 2 Program Files File 0 1 Name System Program Reserved Main Ladder 3- Subroutine 255 Ladders 2 Contents System related and userprogrammed information Not used at this time User-programmed instructions Subroutines accessed from the main program 5 Program Files Program files are the part of the processor memory that stores the user ladder logic program. 6 Energy System Engineering 3 About Ladder Files Each ladder rung is numbered f:r File number Rung number Maximum size of Program File 2 is 12K words – most program instructions are 1 word 7 Data Files File 0 Name Content Output State of output terminals 1 Input State of input terminals 2 3 Status Controller operating information Bit Internal relay logic storage 4 Timer Timer information 8 Energy System Engineering 4 Data Files (Cont’d) File Name 5 Counter 6 contRol Content Counter Information Information for shift registers and sequencers 7 iNteger Integer numeric information 8 Floating Floating point numeric point information 9- User Defined B, T, C, R, N, F, String, 255 or Ascii file types 9 Data Files The Data file portion of the processor’s memory stores input and output status, processor status, the status of various bits, and numerical data. These files are organized by the type of data they contain. 10 Energy System Engineering 5 Addressing Tf:e.s/b File Type File Number Element Word Bit 11 [Tf:e.s/b] Output & Input Files This files stores the statues of the Input / Output terminals of the controller. 12 Energy System Engineering 6 [Tf:e.s/b] Output & Input Files T O for Outputs, I for inputs f not used all outputs are file 0, all inputs are file 1 :e Physical slot used (1 - max. available) slot 0 is reserved for CPU.s used to indicate word if > 16 bits in slot 0 - 15, not required if not more than 16 bits /b bit in word (0 - 15) 13 I/O Address Format 14 Energy System Engineering 7 Status File The status data file contains information about the processor status This file stores controller operation information. This file is useful for troubleshooting controller and program operation. 15 [Tf:e.s/b] Status File T f :e.s /b S for Status not required (value is always 2) values depend on processor used not required (all elements are one word) bit in word (0 - 15) Example: S:4/0 = 20 ms Running Clock S:5/11 = Battery Low Bit 16 Energy System Engineering 8 Bit Data File The bit data file stores bit status and frequently serves for storage when using internal outputs. 17 [Tf:e.s/b] Bit Data File T B for Bit f required (standard value is 3) Files 9 - 255 can be assigned by user :e 0 - 255.s not required (all elements are one word) /b bit in word (0 - 15) Total of 4,096 bits available per file May address sequentially [B3:60 = B3:3/12] 18 Energy System Engineering 9 Timer File The timer file stores the timer status and timer data. 19 [Tf:e.s/b] Timer File T f :e.s /b T for Timer required (standard value is 4) Files 9 - 255 can be assigned by user 0 - 255 (three word elements) 0 - 2 Word 0 is Control word Word 1 (.PRE) is Preset value Word 2 (.ACC) is Accumulator value bit in word (0 - 15) 20 Energy System Engineering 10 [Tf:e.s/b] Timer File Examples: T4:0/15 or T4:0/EN Enable bit T4:0/14 or T4:0/TT Timer timing bit T4:0/13 or T4:0/DN Done bit T4:0.1 or T4:0.PRE Preset value of the timer T4:0.2 or T4:0.ACC Accumulated value of the timer 21 Counter Files The counter file stores the counter status and counter data. 22 Energy System Engineering 11 [Tf:e.s/b] Counter Files T f :e.s /b C for Counter required (standard value is 5) Files 9 - 255 can be assigned by user 0 - 255 (three word elements) 0 - 2 Word 0 is Control word Word 1 (.PRE) is Preset value Word 2 (.ACC) is Accumulator value bit in word (0 - 15) 23 [Tf:e.s/b] Counter Files Example: Bit Name Use C5:0 /15 CU Count up C5:0 /14 CD Count down C5:0 /13 DN Done bit C5:0 /12 OV Overflow C5:0 /11 UN Underflow 24 Energy System Engineering 12 [Tf:e.s/b] Control Files This file stores the length, pointer position, and status bits for specific instructions such as shift registers and sequencers. T R for contRol f required (standard value is 6) Files 9 - 255 can be assigned by user :e 0 - 255 (three word elements).s 0 - 2 /b bit in word (0 - 15) 25 Integer Files This file is used to store numeric values or bit information. 26 Energy System Engineering 13 [Tf:e.s/b] Integer Files T N for iNteger f required (standard value is 7) Files 9 - 255 can be assigned by user :e 0 - 255.s not required (elements are one word) /b bit in word (0 - 15) not usually used 27 Allen-Bradley Basic Programming Instructions 28 Energy System Engineering 14 Basic Bit Instructions Examine If Closed Examine If Open OutpuT Energize OutpuT Latch OutpuT Unlatch XIC -] [- XIO -]/[- OTL -(L)-| Is this bit turned ON or TRUE? Is this bit turned OFF or FALSE? Turn ON a bit when rung is True. SET a bit ON OTU -(U)-| RESET a bit OFF OTE -( )-| XIC, XIO – any addressable bit can be examined OTE,OTL,OTU – cannot use on Input or Status bits 29 PLC Sequence Programming PLC/Pneumatic Interfacing ESET 225 30 Energy System Engineering 15 Simple Sequences If there are no signal conflicts, programming a sequence is very easy. – i.e. A+, C+, A-, C Use the Start, c0 (and a0) to extend A Use a1 (and c0) to extend C Use c1 (and a1) to retract A Use a0 (and c0)to retract C There is no practical limit on the number of times a contact can be addressed. 31 Simple PLC program to extend cylinders A & C 32 Energy System Engineering 16 Dealing with Conflicts A conflict occurs when two opposing control signals are ON at the same time. i.e. A+ & A- Logic solutions can be designed to eliminate conflicts, using signal conversion circuitry: – One-shot [timed pulse] – Latching circuit 33 Additive Sequencer The fastest way to solve conflicts is to design an additive sequencer. Very similar to Relay Logic design. One rung for each step, and a Reset rung at end of sequence. Use memory bits for steps, and use steps to control output bits 34 Energy System Engineering 17 Special Rungs - Home  It is often advantageous to check that a machine is in the “Rest” or “Home” position before allowing motion to start.  Check that all rest position limits are ON. 35 Special Rungs - Run  Continuous operation from momentary input.  End-of-cycle end from momentary input. --Normally Closed Stop button.  Check for Home position to ensure safety. 36 Energy System Engineering 18 First Rung  ‘RUN’ bit for start  Ready to start condition (HOME).  Not ‘DONE’  Latch bit on  Use a memory bit for output 37 Body Rungs  Actions are completed  Latch current step  Previous step is ON  Use consecutive memory bits for steps. – Easier to reset 38 Energy System Engineering 19 Reset Rung  Final actions completed  ‘DONE’ bit will turn off first step.  All others will turn off is sequence until ‘DONE’ bit is cleared.  Ready to restart. 39 Outputs  Use N.O. Step bit to turn output on when required  Use N.C. Step bit to turn output off when no longer needed.  Use parallel network for multiple actuations. 40 Energy System Engineering 20 Benefits of Additive Sequence Easiest way to handle sequence programming with multiple conflicts. Sequence modifications are easily accommodated. Debugging and trouble-shooting can be quick and easy. 41 Energy System Engineering 21 AB Counters and Timers PLC/Pneumatic Interfacing ESET 225 Week 4 1 Counters Counting is an important component of many processes There are three types of counters: – Up counter – Down counter – Up/Down counter Not all PLC’s have all three types PLC counters can be programmed to count up to a preset value or to count down to a preset value. Programmed counters serve the same function as mechanical counters. 2 Sustainable Design & Renewable Energy 1 Counter File 5 3 Counter Instructions 4 Sustainable Design & Renewable Energy 2 UP Counters (CTU) The counter will have a “Count” input Each time the Count input changes from low to high, the value of the “Accumulator” is increased by 1 When the Accumulator and Preset are equal, the “Done” Done bit will turn on The accumulated value is retained when the rung conditions again become false. A “Reset” instruction is needed to change the accumulator back to 0 5 UP Counters (CTU) 6 Sustainable Design & Renewable Energy 3 UP Counters (CTU) 7 Up-Counter timing diagram UP Counters (CTU) 8 Sustainable Design & Renewable Energy 4 Down Counters (CTD) The counter will have a “Count” input Each time the Count input changes from low to high, the value of the “Accumulator” is decreased by 1 When the Accumulator value is EQUAL “ to or GREATER than PRESET value the “Done” bit will turn on. A “Reset” instruction is needed to change the accumulator back to the “ZERO” 9 UP / DOWN Counters Normally the down-counter is used in conjunction with the upcounter to form an up/down-counter. 10 Sustainable Design & Renewable Energy 5 UP / DOWN Counters 11 Timers  Timers are also used in many processes  Primarily, there are two kinds of timing: – On-delay: turns on output after time has elapsed – Off-delay: Off d l t turns off ff output t t after ft time ti h elapsed has l d  All PLC’s have On-delay timers, but not all have an Offdelay. Time Base  PLC timers work by counting pulses from an internal clock. The frequency of the counted pulses is called the time base. base  Common values for a time base are: – 1s, 100ms, 10ms, 1ms  If a programmer entered 0.1 for the time base and 50 for the preset time, the timer would have a 5-s delay (50 x 12 0.1 s = 5 s). Sustainable Design & Renewable Energy 6 Timers Preset time represents the time duration for the timing circuit. Accumulated time represents p the amount of time that has elapsed from the moment the timing started. Retentive vs. Non-Retentive:  Most timers are non-retentive. When the timer input goes off, the timer is reset, whether or not the time period had elapsed( TON , TOF)  When Wh the th input i t to t a retentive t ti timer ti goes off, ff it will ill hold h ld the th current time value, and continue timing from that value when the input is restored (RTO) – A separate RESET signal is required 13 Timer File 14 Sustainable Design & Renewable Energy 7 Timer ON Delay (TON) Turn an output on (or off) after a preset time delay. Timing starts when rung becomes true. ACC reset when rung goes false DN set when.ACC ≥.PRE reset when rung false TT set if rung is true and.ACC <.PRE reset if rung is false or DN is set EN set if rung is true reset if rung is false 15 Timer ON Delay (TON) An on-delay timer (TON) is used when you want a time delay to occur before an output to becomes true / on. 16 Sustainable Design & Renewable Energy 8 Timer ON Delay (TON) 17 Timer OFF Delay (TOF) Turn output on or off after rung is false for preset time. Timing starts when rung goes false. ACC reset when rung g is true DN Set when rung is true Reset when rung is false and.ACC ≥.PRE TT Set rung is false and.ACC <.PRE Reset when rung is true or DN is reset EN Set when rung is true  R Reset t when h rung goes false f l 18 Sustainable Design & Renewable Energy 9 Timer OFF Delay (TOF) The off-delay timer (TOF) operation will keep the output energized for a time period after the rung containing the timer has gone false. 19 Timer OFF Delay (TOF) 20 Sustainable Design & Renewable Energy 10 Retentive Timer (RTO) Used to turn an output on or off after a noncontinuous time period has elapsed. RES q to reset ACC instruction required DN Set when.ACC ≥.PRE Reset with RES instruction TT Set when rung is true and.ACC <.PRE Reset when rung is false or DN is set EN Set when rung is true R Reset t when h rung is i false f l 21 Retentive Timer (RTO) A PLC retentive timer is used when you want to retain accumulated time values through power loss or the change in the rung state from true to false. 22 Sustainable Design & Renewable Energy 11 Retentive Timer (RTO) 23 Reset (RES) Use to reset a timer or counter When enabled, will reset the TON, RTO, CTU, or CTD instruction with the same address as the RES instruction Do NOT use with TOF Also used with contRol elements 24 Sustainable Design & Renewable Energy 12 One Shot Rising (OSR) One Shot Rising / Positive Transition – Turns on for one scan when input goes from False to True 25 Sustainable Design & Renewable Energy 13

Use Quizgecko on...
Browser
Browser