You are on page 1of 31
[unit . 4| programmable Logic Controller Syllabus rion w PLC) Architecture ef PLC, mers, Cowner: Practical exam lection of PLC; Ladder Logie programming, Pyke a cates Leal proqramering freien pan ante peer Ingrodue Lavchins: Contents 7.1 Relay Logic . : im re 1.2 Programmable Logic Controller (PLC)... : . 1 7.3 Basic Components of PLE... . om 7.4 Internal Architecture of PLC a Jontngts eeteyrenath veges enmnenng al 7.5 PLC Operating Cycle . . mi P| ff 15 7.6 Specification Of PLC... sssesveeeennees 5 1-6 2.7 Advantages of PLC over Relay System... ene ° 16 78 Disadvantages of PLC . Rcd f ; mT 7.9 Applications of PLC. . ood undartoay 4 re? 7.10 Input Channel of PLC rr 7.11 Output Channel of PLC... fos é a) 1:2 Selection Criteria of PLC... ++ E te cua ro 7.13 Ladder Diagram 7.44 Ladder Programming 1.15 Ladder Logic Programming for Different Types of Logic Gates... TAGPLC Programming ....... 6.0 7.17 Practical Examples of Ladder Programming M8 University Questions with Answers Scanned with CamScanner Mechatronics [74] retay Logie . ee a uses relay and its contact industrial electronic aA a wees e a gram is drawn to Relay ladder logic is a graphical programming 3 " ae to closely represent the appearance “ired relay system. The ladder diagram language ‘s basically a symbolic set of instructions used to create the controller program oA ' ; eau be considered digital in nature becuse i oo % two state device. The relay coil is the put and contacts are the output. Magnetic relays are single-input, multi - output devices. + All basic Logi ee a logic operations can be performed by using ” fe AND, OR and NOT. The relay contacts are to be interlocked (wired) amon; 5 its normally 0 (NO), and normally closed (NC) coils rae, ¢ Timing relays are conventional relays that are equipped with an additional hardware mechanism to delay the opening or closing of load contact. Latching relays are used where it is necessary for contacts to stay open or closed even though the coil is energized ‘only momentarily Programmable Logic Controller (PLC) 7.2.4 | Need of PLC +The programmable logic controller (PLC) device is widely used in industry to automate event based control, interlocking of operations and sequencing of operations. PLC is used in almost all process industries, where there is requirement of process safety and_ interlocks eg. thermal power stations, steel industry, cement industry, pharmaceutical industry, petrochemical industry, fertilizer industry ete 7.22 | Definition of PLC + A PLC is a digitally operating electronic device which uses a programmble memory for internal storage of instructions for implementing specific functions, such as logic sequencing timing, counting and control through digital or analog input/output modules. OPP recrenca. PUBLICATIONS”. Ano tit rotate Propaabe ay Features of PLC ‘Compact and rugged in construction PLC can be easily programmed. Reprogramming is very easy. It gives noiseless operation. Jiable, low maintenance cost More rel Interfacing of computer i Possible joy processing and analysis. ny aaron 7. Controlled outputs are available in voltages “ [oc : «5 V, +12 V, +24 vac ov wy 110 V1 sy Inbuilt timers, counters and registers, | PLCs can store data and programs, 10. VO channels are isolated hence intrtcn sensors and actuators are easy * Basic Components of PLC « PLC consists of following blocks - 1. Input module 2. CPU 4, Programming device 3. Memory 5. Output module Fig, 731 shows basic PLC architecture. 4. Input module ‘sInputs are real world signal giving the corm real time status of variables. These varibis be analog or digital: Typical analog input ca from process devices such as limit swig thumbwheel switch, transducers such thermocouples, RTDs, flow, pressure, si gauges are converted into binary signals x transmitted over the input / output bus t channels per_module. Each channel is equs with an indicator light to show if the part input is ON or OFF. 2. CPU alt organises all controller activity, the electronically scans the control plan logic sor} memory along with the status of input. I t executes a specified command to the apprp (@ LESS THAN PHOTOCOPY EE Scanned with CamScanner tn addition to logic processing, CPU cuipit: per functions such as timing, counting, sions png and eevee, on com size of PLC varies from 4 bits to 16 bits ‘ne bits to 16 bits memory ams to be executed are stored in the «fe OEE asic memory unit is word. Memory ee from 256 words to 192 K words. The pay oF length of contol plan determines Setmount of memory required. In most PLC ‘are expandable in fixed increments be volatile or nonvolatile. Volatile ged if power ie removed. Tae taic types of memories ROM, R/W memory and aM « rogamming devices Progamming device is used to communicate etween user and PLC (ie. programming device js the interface between user and PLC). Programming language is used to convey the PLC ty means of instructions, how to execute and ary out the control plan sPLCs are programmed with ladder logic, which is a graphical method of programming. The ladder logic is easy to program and flexible. ‘ladder diagram / ladder logic : A schematic "presentation of system hardware and process Sntroler is called as ladder diagram. Various Frome pusuicarions” An up thrust for knowledge devices connected in parallel across the Sine forms a ladder like structure. Each parallel connection on the ladder is called as “rung” Special symbols are used to represent the “arious circuit elements in a ladder diagram, 5. Output module * Output module convert the desired real outputs aS per the instructions stored in CPU (memory). ‘These signals are used to control the machine or process + Output device can be motors, solenoids, pilot lights. Digital outputs can drive panel meters or display, + Most 1/O systems are modular in nature. The most important functions of 1/0 is it's ability is isolate the real world signals (230 VAC, 0-24 V DC, 420 mA, 0-10 V) from low level signals (typically 0-5 V DC) in the 1/0 bus. This is accomplished by optical isolators. [74] internat Architecture of PLC + Fig. 741. shows the internal architecture of a PLC system, 4. Central Processing Uni ©The CPU controls and processes all the operations within the PLC ‘elt is supplied with a clock with a frequency of typically between 1 to 8 MHz. (@ LESS THAN PHOTOCOPY PRICE Scanned with CamScanner + This frequency determines the operating speed of the PLC and provides the timing and synchronization for all elements in the system. «¢ The information within the PLC is carried by means of gital signals. * The processor program to perform the operations specifi ladder diagram or a set of Boolean equations, is a microprocessor that executes a ied ina «The CPU consists of the following units i, Arithmetic and Logic Unit (ALU) = «This unit performs data_ manipulation and arithmetic and logical operations on input [variable data and determines the proper state of thé output variables. « The arithmetic operation includes addition, subtraction etc, and logic operations include AND, OR EXCLUSIVE - OR. an ii, Control Unit : +A control unit is used to control the timing of operations. Fig, 7.4.1 Internal architecture of = The processor functions under a permaney supervisory operating system that directs the oveat operations from data input and output to exectin ¢ user programs. The controller can perform only one operation time, So, it scans each of the inputs sequent kes the ladder diagram program, provide ed ‘utput(s), and then repeat the whole process ‘sHence, the timing contro!’s necessary for a UC system. ii, Memory Unit : # The sequence of instructions to be executed, prognns are stored in the memory unit «During entering and editing including debugging program is stored in the temporary storages kt RAM (Random Access Memory) «For network programmed PLCs, the final PL program is, downloaded — into 8 spec IP recrmcar puBLICATIONS”. An up thst for krowiodge @ LESS THAN PHOTOCOPY PRICE Scanned with CamScanner 2 (EPROM, PROM, and ROM we PLC cither volatile type or Non-volatile nit mmory of ‘mMpOrafy memory or Tem ory is the user memory, where \d edit the program. cory will lose all its programmed eo rating power is removed or lost. sive Memory = 4 tee viye memory OF permanent memory or io s0eTTnory is (used) a system memory that itor a booting programs, lookup sores tables ete 1 Types of ROMS are 1 , 2. PROM wus programmed ROM . es 4, EEPROM AfROM see act parallel__lines that “provides oxy aes nication bet ees wermed a9 2 Bus. “ithe bus system carries information and data's to and from the CPU, Memory and 1/O units. «the information is transmitted in binary form as 0 or ; Heuer senna te, Sewer, oe er Dexa caine Gur Sele ee acts aera cee te eae at iio tween various devices of a “The data bus contains 8, 16 or 32 parallel signal lines for sending data between the various devices ofa system, *An Bit microprocessor has an internal data bus Which can handle 8-bit numbers. “The double ended arrows on the bus line show that they are bidirectional. 5 Proggammable Logg Comtrotter * This means that CPU can read data in from memory or from VO unit on these lines or it can send data out to memory or to 1/0 unit on these lines. * Many devices in a system will have their outputs connected to the data bus, but only one device will have its output enabled at a time i) Address Bus : The address bus contains 16, 20, 24 or 32 parallel signal lines to carry the address of the memory locations for accessing stored data + Every memory location is given a distinct unique address to locate easily and accessed by the CPU either to rea iii) Contro! Bus +The control bus contains 4 to 10 parallel signal lines to carry the signals used by the CPU that are related to internal control actions ad or write data * Typical control bus signals are memory read, memory write, I/O read and I/O write. iv) VO System Bus : +The 1/0 system bus provide the communication between the /O ports and I/O units. 3. Input / Output Unit : +The 1/0 units provide the interface between- the system and the outside world, allowing for connections to be made through I/O channels to input / output devices * Programs are entered from a program panel through 1/O unit. 15 PLC Operating Cycle * After entering the program into the controller and placing the controller in RUN mode initiates an operating cycle + PLC operating cycle consists of a series of operations performed sequentially and repeatedly unless altered by program logic. Fig. 75.1 shows operating cycle consists of five series operations Tea puacanons® ‘An up tesa for nowbedge (@ LESS THAN PHOTOCOPY PRICE Scanned with CamScanner Fig. 7.5.1 PLC operating cycle 4. Input scan + The time required for the controller to scan and read all input data is called as input scan time. Input scan {is accomplished within few microseconds, 2. Program scan ‘It is the time required to execute the instructions in the Program. The program scan time varies depending on the instructions used. Subroutine and interrupt instructions within program ~—"™sy Cause deviation in the way of operating cycle sequence. ‘Output scan is the time required for the controller to scan and all output data, typically accomplished in nds (useo) communication this operation communication takes place with pheral devices (computer etc) the time spent on memory management and ing, timers and internal registers, a 2. Throughput Throughput is time required to sense an energize a corresponding output Few kilo words, 4. Scan time Few microseconds, 5. Execution speed Few microseconds / step. 6. Compatibility + Direct PC connectivity through RS 232 port + Remote programming by phone modem, + Full duplex communication. 7. No. of counters UP/DOWN. 8. No. of timers ON delay type / off delay timers. 8. Noise immunity Bs [77] Advantages of PLC over Relay System Enhanced reliability: Ease in logic modification Interactive operator interface On line repair facility. VO forcing through software. (On line monitoring of user logics. NO eeene Finalization of control logic and fabrication of LC can be done simultaneously. 8. Capability of self-diagnostics to find failure in equipment. 9% Flexibility while setting and changing the lp! during commissioning and operation. Reliable components make these likely to ope for years before failure. 10, IL, Trouble shooting aids make programming &# and reduce downtime. @ LESS THAN PHOTOCOPY UE Scanned with CamScanner a = 2-2 ‘ 7 Programmable Loy Comteer ae onal abilities alow more sophisticated A. Glass Manufacturing, Car Manufacturing Plant oe Precast Concrete Industries ara | won and Steel Mill antages ‘Cement Manufactruing Diary Product ore much work required in connecting Manufacturing Plant .g too mu Printing Industries Building Automation wires aificalty with changes or replacements. Electro-plating Plants: Tyre Manufacturing, dys aifficalt 10 find errors; And require xs Food Processing, Integrated Circuit Chip wy work force Manufacturing ul ‘problem occurs hold-up time is indefinite, Machine Tools Sewage Treatment Plant ty 1ong- ‘Tobacco Industries: Security Control System = Plastic Mi e siations of PLC foulding Machine Lift Control System a Appl Semi-conductor Generator Control System ae many applications that you can find PLCs are ‘Manufacturing Machine ed various industries. Here are the list of Sugar Manufacturing Plant oe Palm Oil Manufacturing Amusement Park Control iat Handling Power Station Plant Plant eri a te thc Process Monitoring Contro! ‘Air Condition Control conveyor SY" Packaging Machine Robot Electrical/Electronic Input Channel of PLC pet Te Appliance Manufacturing Control ‘Sensors like proximity sensors, rotary encoders, optical a isk Drive Manufacturing, — Pump Com! Sensors, limit switches are interfaced to PLC through it's input / output modules. The I/O modules provide signal conditioning and isolation so that the sensors Chemical Processing Plant Plastic Manufacturing can be connected directly. Industries swimming Pool Petrol/Chemical Plant Water Treatment Traffic Light System © For input channel usually an optocoupler is used for Paper and Pulp Industries Train Control Station isolation purpose. And for projection of input module system PLC 2 Protection | Input doce | ‘tom sensor Voltage divider ae a Fig, 7.10.1 input channel protection TESS THAN PHOTOCOPY PRICE Tinh rieccmait ie mater i Scanned with CamScanner Mecttvom voltage divider cireult and a protection dice ie ised an chown in Big 7104 ‘Output ehannal +The external deview oF circuit is connected wo IL through « sveitching devige The output channel ie specitied by thw type of switching element ie. relay type, translator type or triac type, The switching, device (relay, translotor, trac) \wolates the PLC from the external circuitry 1) Relay output ln relay type output the signal from PLC is used wo y operate relay. Relay can switch currents of few . millamperes to few amperes to external circuit, Relay can switch both AC and DC signals, Relays can withotand high surge currents and voltage transients. Becauve of mechanical switching in relays, they are relatively slow to operate. 2) Transistor output * In transistor type output, a transistor is used to switch Current through external circuit. Transistors can switch faster than the relay. Transistors can be used for ‘switching of DC signals only and can be destroyed by overcurrent and high reverse voltage. Hence proper Protection circuits are to be provided. Also for switching higher current higher current capacity of transistor is needed. 3) Trlac output ‘* Triac type outputs are used specially for switching of DC signals. Triacs may damage due to overcurrent. Hence for protecting triacs optoisolater and fuses are used. - Inputoutput voltage levels «A range of inputs are available to a PLC eg. 5 V, 24 V, 110 V, 240 V, digital/discrete ie. on-off signals. Fig. 7.10.2 shows various input levels. ‘After signal conditioning and processing the output signal might be a 24 V,_100 mA switching signal, sv my To psa mode (geal oupat) nov mov Fig. 7.10.2 Input voltage levels a Pen mma ay 10 'V DEA A, 094 Om 7105 (nih Nerthe Pom pAerk oe ‘in current sourcing mide the sp eres ioe curvent from the ingut morkihe Le pat mega, senstce of current. + Similachy i the carvers flows from the cs siggy to output load then the output mode item» a8 sourcing. + Fig, 711.1 shows input module and cxtze metal current sourcing mode. Fig. 7.11.4 Current sourcing + Transistor output with current sourcing i stom 5 Fig. 7.112 An optoisolator provides isolation beams PLC and external circuit Opto : Fig. 7.1.2 Tranatator output witn current sot TECHUCAL PUBLICATIONS”. Anu Oto towne @ LESS THAN PHOTOCO = Scanned with CamScanner 2 > . er A rs yang Ode A INPUL device auppiie Pett Sout ole 18 the inp meee ae gt © current oA foe argh Oe carent flows 10 te Output module, i ou Haren SSKING. OUP devin Fie wn input and output module. with ts ah 1 gk vs . ‘ a a Fp a ‘oe om | et vrs, Fig. 7.11.3 Current sinking aster ospur in cartent sinking mode is shown in | _Fg. 7444 Transistor output with current sinking [fia] selection Criteria of PLC PLC selection criteria consists of : 1 System (task) requirements, 2 Application requirements, 3 Hlectrcal requirements. 4. Speed of operation, Communication requirements Operator interface. Physical environments. What input/output capacity is required? What type of inputs/outputs are required? 1B What size of memory is required? Ht What speed is required of the CPU? 2 Software Programmable Logie 1. Systom requirements, +The starting point in dete Must be to unde nining any solution ind what is to be achieved * The program design starts with by aking down the task into a number of simple understandable Clements, each of which can be easily described, 2. Application requirements sInput and output device requirements, determining the After ‘operation of the system, the next Step is to determine What input and output devices the em requires. * List the function required and identify & specific type of device. *The need for special operations in addition to discrete (On/Off) logic * List the advanced functions simple discrete logic. 3. Electrical Requirements +The electrical requirements for inputs, outputs, and system power; When determining the electrical requirements of a system, items : required beside consider three i. Incoming power (power for the control system); 1 Input device voltage; and fii, Output voltage and current. 4. Speed of Operation + How fast the control system must operate (speed of operation). When determining speed of operation, consider these points ~ How fast does the process occur or machine operate? Are there "time critical” operations or events that must be detected? In what time frame must the fastest action occur (input device detection to output activation)? device Does the control system need to count pulses from an encoder or flow-meter and respond quickly? Prestca waccaron ‘An up trust for krowindge (@ LESS THAN PHOTOCOPY PRICE ll Scanned with CamScanner Mechatronics eld 5. Communication + If the application requires sharing data outside the Process, ie. communication. Communication involves sharing application data or status with another electronic device, such as a computer or a monitor in an operator's station. + Communication can take place locally through a twisted-pair wire, or remotely via telephone or radio modem. Operator Interface ‘If the system needs operator control or interaction. In order to convey information about machine or process status, or to allow an operator to input data, many applications require operator interfaces. +Traditional operator interfaces__include pushbuttons, pilot lights and LED numeric display. +Electronic operator interface messages about machine status in desc display part count and track alarms. + Also, they can be used for data input. 7. Physical Environment +The physical environment in which the control system will be located. Consider the environment where the control system will be located. ‘+ In harsh environments, house the control system in an appropriate IP-rated enclosure. accessibility for Remember to consider maintenance, troubleshooting or reprogramming. [7.13] Ladder Diagram ‘s Ladder diagram is a graphical method for representing, and programming an event driven sequential process. special schematic representation of hardware ts and its connection used to make combination ware and description of sequence of events is der diagram, diagram consists of two parallel lines which ac. supply lines, There are number of lines connecting these parallel lines. These Programmable Logic Conny horizontal lines define a specific operations and jy, called as rung ‘The entire structure looks like a ladder hence iyi, called as ladder diagram. 7.13.4 | Elements of Ladder Diagram + Variaus elements used in ladder diagram are lag here, 1. Relays 2, Motors 3. Solenoids 4. Lamps or Indicaters 5, Switches 7.14 | Ladder Programming + Ladder diagram is a method of programming of PLc. Writing a program is equivalent to drawing switching circuit ie. Inder diagram is a. systematic way of representing system hardware and controller Ladder diagram consists of vertical line representing power lines. Cireuit devices are connected as horizontal (parallel) across the AC power line, which looks like a rungs of the ladder. Fach rung of ladder consists of number of input conditions and a single command output. # In drawing ladder diagrams, certain conventions are adopted 1. ‘The vertical lines of diagram represent the power rails between which the circuits are connected. two 2, Each rung of ladder defines one operation in the control process. 3. The ladder diagram must be read from left-to-right and top-to-bottom. Fig, 7.14.1 shows scanning method of ladder program — | mie Rung: ZI Rung + 3 Power —#| tes ——} | (END }- End rung Fig. 7.141 PUBLICATIONS”. An up tut for kowode @ LESS THAN PHOTOCOPY PRICE Scanned with CamScanner on say as a cysle ge rer ww jopen or close contacts, 6 Fegan ie: OPS ‘a partic in oe een oh sno wroutput in the memory of the PLC input or uth ‘symbols used in Ladder Diagram ay nput devices sites. Fig. 7.14.2 Push button switches symbols shows a simple lever operated limit switch. Lever pushed down by contact, Button to operate switch Fig. 7.143, TECHNICAL PUBLICATIONS”- An up trust for kromode zu — ede, PLC goes through entire ladder mote pd The end Tung i enly Mga Oy Gomes back to the wat. The neg throug all NE FANGS Of program mg sro ast with lent one inp and fc re contol action eg closing contacts of ee etputs are device connected to PLC e.g. rey devices are shown in their normal Jar device can appear in more than one nr jadder. Some identification number is, sent i oot apa fe sre faucet This the den of the tion button switch = Input devices ean be push 2 Mion switches used to start or stop a system, The ey ay be normally open (NO) of normally awit (NC) and may be activated by many’ sources a Giese pater pam oon ieee ei | 5 in renee presence or passage of a moving part. Fig. 7.143 Programmable Logic Controller ‘The limit switch can be NO or NC type, its symbols are shown in Fig. 7.14.4 eerie eee Normally open tray eed Aen sw “erm otch Fig. 7.14.4 Limit switches symbols ‘+ Some limit switches are attached to sensing device for sensing pressure, temperature and level. When any Parameter (pressure, temperature or level) crosses certain limits they are actuated then NO contact will, become NC and NC contact will become NO. Fig. 7.145 shows symbols of these limit switches, Pressure lint 22 eae a No No Temperature ntsc ae as ra Sie oe Fig. 7.14.5 Limit switches symbols ii) Relay contacts : Actually control relay is an output device but once it is energized it's contacts NO or NC can be used as an input switch. Fig. 7.146 shows the representation of a control relay contacts Normally open (NO) "Normaily closed (NC) ‘input contact Inet contact Fig. 7.146 Control relay contact symbols (@ LESS THAN PHOTOCOPY PRICE Scanned with CamScanner Mechatronics a Programmatic Lope 5) Output dovices Ray co ——E)——$ The output ports of PLC are of relay type oF optoisolator with transistor or triac types depending, ‘on devices connected to them which are to be switched ON or OFF. Generally, the digital signal from an output channel of PLC is used to control an actuator which controls a process, The actuator bs a ‘Two postion valve —ClCh device which transforms the electrical signal into some powerful action which controls the process @ + Some output devices are ; Relays, contactors, valves, motors, solenoid and lights for visual indications. Pg 7147 stom he ymbo ofeupel devin vt Fig. 7.14.7 Output device symbole ene, Ladder Logic Programming for Different Types of Logic Gates 1. AND Logic Function + AND logic circuit represents series circuit. + AND gate is composed with two inputs and one output. + AND gate produce output when both the inputs are HIGH state, ‘Output = Lamp: | ‘Symbol AND circuit PLC AND logic | a womnte aah sa nvm 4 Fig. 7.15.2 / Dy feat ee a) [a ton tae | peraernatr| Jenteal apes ‘our ¥430 2. OR Logie Function + OR logic circuit represents the parallel circuit «OR Gate is composed of two or more inputs and one output i I recimucAL PUBLICATIONS”. A up th tnowtee @ LESS THAN PHOTOCOPY! Scanned with CamScanner oo 7-13 a peaton 9 like aklition of binary number : ~ ae poe osu when any one input are HIGH state | 3. NOT Logic Function ASTRA ie wsson ive Nor te compost of se pan ig spe +The bubble oF die atthe utp she stand pnt ado epeny nvean “NOTE there san output, when tern nt nd mo cups whoa ean pa Bubbie indicates ‘Symbol NOT circuit PLC NOT logic “Output= Lamp Fig. 7.15.5 vr *NPCAL PUBLICATIONS” An up thrust for knowiedge \@ LESS THAN PHOTOCOPY PRICE Scanned with CamScanner 9 ete 7 Papuan ge, 4. NAND Logic Function s * NAND Js a combination of AND and NOT gates © Arrangement shows AND gate followed by NOT gate Hence it is called NOT AND gate ‘+ Both the inputs A and B have to be at low state to get the output at HIGH state + NAND Gate is composed of two or more input with 2 single output + Any one input is in LOW state also output will be HIGH state NOT __ Lamp At Opt B : a xm pe [Ad fe \ — WAND circuit PLC MAND logic > : f bo WAND wyeteen ve | =) 5. NOR Logic Function «NOR is a combination of OR and NOT gates As i Si) « Arrangement shows OR gate is followed by Sass NOT gate. Hence it is called NOT OR gate. ‘= Both the inputs A and B have to be at LOW oak mos Came state to get the output at HIGH state fps Lie pe ‘© NOR gate is composed of two or more input 8 ~ with a single output ‘Symbol PLC logic + Any one input is in HIGH state also output Fig. 7.158 will be LOW state | NOR wystem | nano Ka tak —ar—O- Fig 7159 @ LESS THAN PHOTOES AP een rem caren seg rt mmm Scanned with CamScanner ‘or (XOR) Logic Function 000A ane inputs are at LOW state the output wil be at Low state 11 ih ee inputs are at HIGH state the output will be at LOW stase 11 ope input is HIGH state the output will beat HIGH eve aoe ey "MputA Input Output a= Pa we ron ape "Lae = XOR System | Fig. 7.15.10 X40 x01 yao an x400 x40 IK Fig. 7.18.11 he b (@ LESS THAN PHOTOCOPY PRICE IRRLICATIONS™. An up iusto Anon Scanned with CamScanner Movtatroe | ? [£26] PLe Programming [216.4] structure of Rung + Fig. 7.16.1 shows @ ladder rung, starting with the input, normally open symbol for input contact. is shown by || +—# Fig. 7.18.1 A ladder rung In drawing ladder diagrams the addresses of each element are appended to it symbol. When wiring up the inputs and outputs to the PLC, relevant input akldresses must be connected to the input and output terminals with it's output addresses, 7.16.2 | Latching an output energized, even when the input ceases. e.g. A motor started by pressing a switch Though the itch contacts donot remain closed, the motor is juired to continue running until a stop push button essed. Latch circuit is used to implement such tion. 16.2 shows latched circuit, InputA Output B Out Fig. 7.16.2 Latehed circuit it A contacts close, there is an output. yen there is an output another set of jated with the output closes. The contacts logic gate system with the input contacts. the input A opens, the circuit will still it energized. The only way to by operating the normally closed an illustration of application of a jer_a motor controlled by stop Switches and for which one when the power is applied a Papermate Lacon to the motor and another when it is not Fig. 716.3 shows ladder diagram with ra PLC notations x400 x41 430 Fig, 7.16.3 Motor on-off, with signal lamps, ladder ag, Inputs: X400, X401 (Both NO switches) Outputs : ¥430 (motor) ‘Y431 Lamp indication (power not applies) ‘432 Lamp indication (power applied) + When X400 is momentarily closed, Y430 is enepies and it's contacts close. This results in latching and ag the switching off of Y431 and the switching om ‘Y432. To switch the motor off, X401 is presed mg ‘opens, Y430 contacts open in the top rung and Se rung, but close in the second rung. Thus Y431 com fon and Y432 off. 7.16.3 | Timers Timer : © A timer is a special counter ladder function that ali the PLC to perform timing operations based oe « precise internal clock. Types of Timers : 1. Delay ON timers or ON delay timers 2. Delay OFF timers or OFF delay timers 3. Pulse timers 4 5 6 Cascaded timers ON-OFF cycle timers (One shot timers. (@ LESS THAN PHOTOCO Scanned with CamScanner oFF| Timer on vimer Fig. 7.16.4 seam delay 18 used 10 indicate that this timer vm after waiting for a fixed time delay there is an input, the timer is energised and We ming, after some pre-set value, the timer sa sare closed t0 output ois ued to denote ON-delay souy OFF TIMES: | off delay timers are maintained as ON for a trad time of delay period before turning of {TOF is used to denote OFF-delay. pie Tiers: “pulse timer switches is another type of timer which comes either ON or OFF for a fixed period of time as a function of pulses. Time Delay ON timers. Output) Positive going ‘output FF} OFF] Time Fig. 7.16.6 Pulse timers Output, on Output oFF| H+ Fy Output HH | Input Timer Output Fig. 7.16.5 srowtedoe Piven: miavcariond™ hon ont Time Delay OFF timers @ LESS THAN PHOTOCOPY PRICE Scanned with CamScanner Mechatronics «TP is used to denote pulse timers. Cancaded Timers © «Cascading means more elements are together to form a system. «The cascading timers are linked together to give longer delay times which is easily achieved than linked just one timer. Input Preset 999 Timer t 4 Timer Preset 1000 Fig. 7.16.7 Cascaded timers 5. ON - OFF Cycle Timer : + Timers producing an output for some period and no output for some period and an output for some period. ‘+The timer is designed to switch an output for T sec and off for another T second. 6, One Shot Timers = * One shot timers produces an output for a fixed length of some initiation input. Progranmenable Loge ¢ Input Timer Timer Output Input ‘© A counter is a simple device that allow 2 number y occurrences of input signals to count or read a number of times some event occurs. ‘There are two basic counter types : Countup ag count-down. + Every PLC has counter instructions. ‘+ Down-counters count down’ from the preset value zero and up-counters count from zero upto the pres value. Input ars Time % or 5s Time Input Timer2 Timer 1 Beat In imer \ ta oO HTinsee 1 Timer 2 Time , | F Timer 1 Output Output 1 Time ) Fig. 7.16.8 ON - OFF cycle timer F TECHNICAL PUBLICATIONS”. An up rus for inowedge @ LESS THAN PHOTOCOPY FRE Scanned with CamScanner to count the false to true statue to. oe tnd ten WARE ev ar Fg. 78841 Down counter [Fas] wnemonica used in PLC he mnemonics codes wed by ferent PLC enlace difer bt an iteration standard G93) ae ben proposed and i widely wed e761 below shows core meron ie roto the following ntracons, Misi Table 7.16.1 Some instruction code mnemonics 7.166 | Internal Relay An internal relay behaves like relays with their ‘associated contacts, buy they are not actual relays ‘whose simulations are controlled by the PLC software. in the ‘Internal relays can be very useful implementation of switching sequences. ‘= They are often used when there are programs with multiple input conditions. * They are also known as auxiliary relays or markers, In using an internal relays, it has to be activated on ‘one rung of a program and then its output used to operate switching contacts on another rung of 2 Program. Real Internal Energizing tho A” cot activates the contact Fig. 7.16.12 Internal relay Presenca eomscarions. ne att owt @ LESS THAN PHOTOCOPY PRICE Scanned with CamScanner [727] Practical Examples of Ladder Progamming SoS ears Ex. 7.17.1 Prepare the physical and programmed ladder diagram for the control problem shown in Fig. 7.17.1. The objective is to hent the liquid to a specified temperature and keep it there for 30 minutes Stir (Motor operated) Vin LH Temperature switch (Ts) Fig. 7.474 Sol. : The hardware has the the following characteristics 1, Start push button is Normally Open (NO), stop is Normally Closed (NC) ‘The event sequence is 1. Fill the tank 2. Heat and stir the liquid to the temperature set point and hold for 30 minutes. 3. Empty the tank. 4. Repeat from step 1 Rung 1: Relay CRI is energized and latched, Rung 2: Outlet valve is closed and inlet valve is opened and the tank filled to LH level. Rung 3: Inlet and outlet valves remaining closed, the stirer is operated Rung 4: With inlet closed, starts 30 minutes timer. Rung §: Heater is kept on for 30 mins, The rung is energized and de-energized as the temperature goes below and above the limit. Rung 6: When times out the rung is de-energized to open outlet valve to empty the tank SF recive. PUBLICATIONS”. Anup trust or rows 20 Proyramabie Lope Physical ladder diagram Stan oa i C®)— re cr, ti en, ein THO) Rang Via lo Rings CR, Vn, TR, ts ‘ Bo Runge Fig. 7.17.2 Physical ladder diagram Programmed ladder diagram Fig. 7.17.3 Programmed ladder di . @ LESS THAN PHOTOCOPY POE Scanned with CamScanner 2a ge ple WOLVES THO WAS oF part jo 22 A and ac MAH bla say g fee eg sere Teles at ig we rt pret in ga So ell oer asin? Ae eae digran 1 contra is peraton Me cer fo aa-sw2 Motor “NS S eft Gripper wo 8 2 swi Fig. 7.17.4 Pick-and-place robot control Fig. 7.4 (a) Ladder digram Jn a certain bank each of three bank offciers has a 'o the vault. The bank rules requires that two out of aa cers be present when the vault is opened. Draw the be slegram for a relay logic circuit that will unlatch the door nim™on the light when two of the three keys are inserted bra iu ey Propane ange Comenctier Sol, “Lat the three Keys of the officers be represented by ¥, @ Rand output be x “Condition to open the vault are that two of the keys should be available. * These combinations are P and QP and & of Q and R "This combination can be represented by the Boolean PQ+ PRs QR =x * The ladder dtagram is as shown in Fig. 7.175. *'CRy CR and CR are the output relay coils of P,Q and R keys respectively. * CR), and CRyp ~ Contac of CR = Key P Ray and CR, Contact of CR, - Key Q CRyy and CRyy = Contact of CR, - Key R P ER; [--t————_(.)— Q a aa R oR, -4t———()- CRy Ry 4 a [arr 4 Rep Rap Lr Fig. 7.17.5 Ladder diagram Explanation : If P and Q keys are present When P is ON, CR,, and CR,» will be closed. Since Q is also ON, CR,, and CR,» will be closed. So X will be a closed path through CR}, - CR, and X will ON. So the vault will open If P and R are present When P is ON, CR,, and CR,» will be closed. Since Q is also ON, CR;, and CRj, will be closed. So X will get a closed path through CR;, - CRj; and X will be ON. So the vault will open. Veit Amino hv mmm @ LESS THAN PHOTOCOPY PRICE Scanned with CamScanner Ky ACK, > Conte of ¢ B Chay Cans, 9 cote Eos 2 aie Praga H es ->(pa. af, (Fam tL in Bi Ge hares, Push buton i completed and energizes th + If Q and R are present Pushed the circuit o When Q is ON, CR, and CR,> will be closed. Since R is ne heater relay ns siso ON, Chg and CRgg wil be cred. £0 X will at || Tus acon supine closed path through CRy» - CRyp and X will be ON. So Sa iee ee Power to the fw heating dag. the vault will open San LL. = «After 2 minutes, the time delay relay act Ex. 7.17.4 A small electric furnace has two heating elements nis Me ty When stotiched on, first element star's and after 2 minutes ‘econdl cement va the TR, contac second starts. A temperature sensor is used to shut down the | ‘°* any time, if the furnace if overheating occurs. The furnace is shown Fig. 7.176, Draw the ladder diagram, Sop bution puta, fl over-temperature sensor contacts open, the alta broken and heater relay deenergizes; cousin be heating elements to shut down, Ex 778 A conveyor shown in Fig. 7178 ges srl Push bution PB, is momentarily pressed. It can be ss Furnace element 1 emergency push button PB, When a product on the rea” reaches sensor S,, closing a swtich, the conveyor is made, {for 1 minute for an operation to be carried on the prota of then the converyor stars, It runs till the product ext, pening. sutich when the conveyor stops. Draw ray ua, diagram for control of the system Product Sensor 1 Sensorz Za Fig, 7.17.6 Sol. : * The two vertical lines show the power connections. Conveyor system oes Neutra ig. 747.8 Conveyor 8 imo Sg ut Fig Wweyor system Heater Sol. : fang tee eggs —O—- ‘The ladder diagram is shown in Fig, 7.173 Power Nass oR, ‘ome pg, ee Ie L@® i oy o % ung O ‘Overheating ‘sensor CRs eR, Element 1 tf Time delay ree 8 TR, relay ae! Rung2 | 4} GR) Element 2 ie cr, Fig. 7.17.7 Ladder diagram Fig. 7.17.9 Relay ladder diagram @ LESS THAN PHOTOCOPY PRUE TECHNICAL PUBLICATIONS”. Anup thst for krowiodvo Scanned with CamScanner js ON’ when PB, is closed, PB, is Hr (G, contacts due to S, are closed and Ges 9 0 Nae 0 contact Cy, Being hosed pina of CR re eonveyor st reached, the contact due to 8, is See 5 ie ot anancouly activated CRay 6 opened and i ated, stopping the conveyor. 1 ges ose iy i ae ae te se gare rece ps 1° 1 with it’s contact CRpy returning to its NC sot" Closed) position and the conveyor once no oe ae es til the product reaches S, due to which snc et opened hue sopping he conveyor pe conveyor can also be stopped by pressing PBy in coe of emerBeNCY a ee _________ qerate Explain the ladder diagram of Fig. 7.1710 and swt te logic equations. - PB; Pe EL as m2|—} ‘\y- Rig Fig. 7.17.40 Ladder dagram for example 7.17.6 Sel ‘inthe first Rung, the relay coil CR, is energised, if temally open push button PB, is pressed down and LontmAlly closed, push button PB, is not pressed “This WOuld close the normally open contact CR,, and on the relay CR,, r 2 Progpamanae Longe Comanetiet + Contact CR, continues to hold the relay energied even though PB, is released * The contact CR,, changes its states from open close, thus activating the solenoid * This would remain until PB, is premed down and co#l CR, gets deenergised, bringing the system to it’s initial ‘conditions. Logie Equation : For Rung 1 CR, = (CR,, + PB) PB: For Rung 2 §,-Sy Ex.717.7 Develop a ladder logic for a bottle filing, station having following sequence |) When START button 1 pushed, the conveyor motor (Cx) stars i) When bottle reaches filling station, proximity (P,) is ON. the comoeyor (Q,) stops. iit) The solenoid valve is ON. fo) When bottle is filled proximity 2 (Fy) is ON, and solenoid aloe is OFF. 1) When proximity 2 (B) is ON, the conveyor motor (Qy) starts. vi) When end station is reached proximity 3 (By) is ON and ‘conveyor motor (Qj) stops. vi) Go to step 1 for next bottle, APTS [Note : ‘© Mention all the assumptions clearly like P, is connected to which input ete. ‘+ Write Boolean equation for each rung you write. ‘= Drmo ladder diagram with examine ON and examine OFF symbols. ie. do not show switches in ladder diagram.) Sol. : Working of system : a] When the start button is pushed, the conveyor starts bottle moves on conveyor and reaches start point detected by proximity switch (F), b] Once the bottle reaches the fill station conveyor motor is switched off and solenoid valve is ON. <]_ When bottle is filled, detected by F, and the solenoid valve is off and conveyor motor starts. d] When bottle reaches end station , detected by P, and conveyor motor starts, TIANCAL UBLIOATIONS™- An up brut fr tnowtee @ LESS THAN PHOTOCOPY PRICE Scanned with CamScanner Mechatronics adder diagram © Bottle postion Rt switch (NC) oom say eR, Bottle ful ‘site Rung $ |}. foo» | solenoid cr, BFS valve Fig. 7.17.11 Bottle filling machine Ex 7178 Given two push-to-ON buttons (PB,, PB), RED and Green lamps, develop a ladder diagram to meet the folowing objectives 2 When PB, is pushed, RED lamp should be ON and it will continue to be ON till PB, is pushed. ii) When PBy is pushed, GREEN lamp should be ON and it will continue to be ON till PB is pushed. tii) If PB, and PB, both are pushed simultancously, both light ‘should be OFF. Ea [Note : + Mention all the assumptions clearly like PB is connected to which input ete + Write Boolean equation for each rung you writ. * Draw ladder diagram with examine ON and examine OFF symbols. i.e. do not show switches in the ladder diagram.) Sol: PB Push Button Ry > Control relay CR, CR2, CR 3 CR > CR, CRzz, CRoy each having 3 contacts Ladder diagam (See Fig. 7.17.12) ‘| When PB, is ON, CR, is energized. CR), latches PB, Riz closes and red light burns, CR; open green light OFF. «When PB, is ON, CRp is energized, CRzy latches PBs, CRip closes, green light burns, CRys opens red light is OFF. ‘* If PB and PB; is pressed simultaneously CR, and CR, are energized. '* CRjs and CRy3 open both red and green light OFF. TF recrnncas PUBLICATIONS” An w nator rownpe ~ Poovey i cn. ~ fa —— ung | pate mal be CR Rung 2 }— Noy, Ry, Ry Pe chy Rung 3 ae Rp Rung 4 }— CR, Ry Fig, 747.42 Boolean expression : Rung 1: PB, +CRy, = CR, - Energise control relay nn = CR Rung 2: CRy2-CRyp = Red light ON Rung 3 PB +CRpy = CRz = Energise control relay Rung 4 CRya-CRy3 = Green light ON Bl 7a79 Gin fw normaly pe wits, Py Sa 9) with DC motor (M) write «PLC pogrom i tag folowing objectoes 1) When P, (Start Buton) is pushed the Cycle sl tt The eyle shall continue 10 remain On uni P, (ap Button) is pushed 1) “Wc Si 6 phed and i not pushed then Mar ON cleclise direction ti) When 18 pushed and S; is not pushed then Mote 8 ON in counterclockwise direction iv) When P, is pushed the program stops. Sol. : P, + START Push Button, P, > STOP Push Butt By > Memory Bit, S, > Switch 1, S + Switch 2 @ LESS THAN PHOTOCOPY PRUE Scanned with CamScanner

You might also like