• Page 1


  • Page 2

    Outline:1.Intorduction2.History and Originyg3.Advantages and Disadvantages 4.How it Works>Components> Operation >Ladder Diagram and Programming>Ladder Diagram and Programming 5.Exaplmes of ladder diagram

  • Page 3

  • Page 4

    Introduction:A programmable logic controller (PLC) is a digital computer used for automation of electromechanical ht l fhif tprocesses, such as control of machinery on factory assembly lines, control of amusement rides, or control of lighting fixtures. gg

  • Page 5

    History and Origin:•Developed to replace relays in the late 1960s•PLC began in the 1970s, and has become the most common choice for manufacturing controlscommon choice for manufacturing controls.•The PLC was invented in response to the needs ofThe PLC was invented in response to the needs o...

  • Page 6

    Advantages and Disadvantages:The main difference from other computers is that PLCs areggThe main difference from other computers is that PLCs are armored for severe conditions (dust, moisture, heat, cold, etc) and have the facility for extensive input/output (I/O) )ypp()arrangements.Siemens 314C-...

  • Page 7

    Advantages Continued:Cost effective for controlling complex Advantages Continued:systems.Flexible and can be reapplied to control thti kldilother systems quickly and easily.Computational abilities allow more sophisticated controlsophisticated control.Trouble shooting aids make programming easier ...

  • Page 8

    DisadvantagesToo much work required in connecting wires.wires.Difficulty with changes or replacements.Difficulty in finding errors; requiringDifficulty in finding errors; requiring skillful work force.

  • Page 9

    PLCs’ ApplicationsPLCs Applications

  • Page 10

    How it works>PLC Components:

  • Page 11

    • CPU: is the unit containing the microprocessorCPU: is the unit containing the microprocessor• Power supply unit: is needed to convert thePower supply unit: is needed to convert the mains A.C. voltage to low D.C. Voltage(Normally Internal)

  • Page 12

    • Input-output sections: are where the processor ii ftifreceives information from external devices and communicates information ldito external devices.

  • Page 13

    The S7-200 PLCs are expandable. Expansion• Expansion Modules:expandable. Expansion modules contain additional inputs and outputs. These are connected to the base unit using a ribbon connectorconnector.

  • Page 14

    • Memory unit:iswhere theMemory unit: is where the program is stored that is to be used for control actions.• Programming device: is used to entered theis used to entered the required program into the memory of the processor.

  • Page 15

    PLC Operation:The PLC program is executed as PLC Operation:pgpart of a repetitive process referred to as a scan. A PLC scan starts with the CPU reading thestarts with the CPU reading the status of inputs. The application program is executed using the ttf th itOthstatus of the inputs. Once the pro...

  • Page 16

    •PLCs invented to Replace Relays and HARD WIRING: Prior to PLCs, many of these control tasks were solved with contactor or relay controls.

  • Page 17

    Replacing Relay by PLCReplacing Relay by PLCFirst step We have to translate all of the itemsFirst step- We have to translate all of the items we're using into symbols the plc understandsA contact symbol Ailb lA coil symbol

  • Page 18

    Continue:Second step- We must tell the plc where everything is located In other words we have to give all the deviceslocated. In other words we have to give all the devices an address.Final step- We have to convert the schematic into aFinal step- We have to convert the schematic into a logical se...

  • Page 19

    Ladder Diagram and Programming:Ladder Diagram and Programming: Load: The load (LD) instruction is lla normally open contactA Load (contact) symbol LoadBar: The LoadBar instruction is a normally closed contact.A LoadBar (normally closed contact) symbol

  • Page 20

    Out :The Out instruction is sometimes also called anOut :The Out instruction is sometimes also called an Output Energize instruction. The output instruction is like a relay coilAn OUT (coil) symbol OtBThtbi ttii likllldlOutBar: The outbar instruction is like a normally closed relay coilAn OUTBar ...

  • Page 21

    Logic elementsLogic elements

  • Page 22

    Programming a PLC :Programming a PLC :In order to create or change a program, the following items are needed:PLCProgramming DeviceProgramming SoftwareConnector Cable

  • Page 23

    •You can use a personal computer as a programming device

  • Page 24

    Testing a programOnce a program has been written it needs to be tested and debugged  One way this can be done is to simulate the field debugged. One way this can be done is to simulate the field inputs with an input simulator, The program is first do...

  • Page 25

    Examples of Ladder pdiagram(Example One):We can simulate this same circuit with a ladder diagram:with a ladder diagram:

  • Page 26

    Examples continued(Example two):Examples continued(Example two):•We are controlling lubricating oil b idid fk Thibeing dispensed from a tank. This is possible by using two sensors. We put one near the bottom and one near the top as shown in theone near the top, as shown in the picture below•H...

  • Page 27

    Examples continued:InputsAddressExamples continued:InputsAddressLow level sensor0000High level Sensor0001OutputAddressMt0500Motor0500Internal Utility RelayInternal Utility Relay1000

  • Page 28

    Examples continued:Examples continued:The Ladder DiagramThe Ladder Diagram

  • Page 29

    Examples continued:Examples continued:Scan 1Scan 2Scan 3Initially the tank is empty. Therefore, input 0000 is TRUEAfter scan 2 the oil level rises above th lllThe internal relay is turned on asinput 0000 is TRUE and input 0001 is also TRUEthe low level sensor and it becomes open. (i.e. FALSE)tur...

  • Page 30

    Examples continued:Scan 6Scan 4After scan 4 the oil level rises above theScan 5Since there is no more true logic path outputScan 6After scan 6 the oil level falls belowlevel rises above the high level sensor at it also becomes open (i.e. false) true logic path, output 500 is no longer energized (...

  • Page 31

    Examples continued:Examples continued:

  • Page 32

    Ladder diagram with Latching(Example three)Regular output coils are of course an essential part of our programs but weRegular output coils are of course an essential part of our programs but we must remember that they are only TRUE when ALL INSTRUCTIONS before them on the rung are also TRUE.Pleas...

  • Page 33

    Example ContinuedHere we are using 2 momentary push button switches. One is physically connected to input 0000 while the other is physically connected to input 0001. When hhthe operator pushes switch 0000 the instruction "set 0500" will become trueand output 0500 physically turns on. Ev...

  • Page 34

    Example Continued

  • Page 35

    Example of Ladder diagram with Counter(Example Four)A counter is a simple device intended to do one simple thingA counter is a simple device intended to do one simple thing ,count.To use them we must know 3 things:1. Where the pulses that we want to count are coming from. Typically this is from o...

  • Page 36

    Example ContinuedReset: When this input turns on the current (accumulated) count value will return to zero.will return to zero.Pulse: The second input is the address where the pulses we are counting are coming from. Cxxx is the name of the counter. If we wantto call it counter 000 then we would p...

  • Page 37

    Example ContinuedHere we want to count 5 widgets from input 0001 before turning on output 0500. Sensor 0002 will reset the counter.

  • Page 38

    Ladder diagram with Timer(Example five)Timer: it is an instruction that waits a set amountTimer: it is an instruction that waits a set amount of time before doing somethingThere 3 types of timers: 1. On-Delay :when the input is on it waits y second to turn on the output2. Off-Delay timer : when t...

  • Page 39

    Example ContinuedIn order to work with timers, we need to know to things:1. What will enable the timer. Typically this is one of the inputs.(a sensor connected to input 0000 for example) 2. How long we want to delay before t Lt'it 5d b fwe react. Let's wait 5 seconds before we turn on a solenoid,...

  • Page 40

    Example ContinuedIn this diagram we wait for input 0001 toIn this diagram we wait for input 0001 to turn on. When it does, timer T000 (a 100ms increment timer) starts ticking. It will tick 100 times. Each tick (increment) is 100ms so the timer will be a 10000ms (i.e. 10 second) timer. 100ticks X ...

  • Page 41

    Example Continued

  • Page 42

    Example For an other type of timer(Example six):Accumulating timer : This timer is named Txxx. When the enable input is on the timer starts to tick. When it ticks yyyyy (the preset value) iiillihitimes, it will turn on its contacts that it will be used later in the program.In this type of timer i...

  • Page 43

    Example ContinuedIn this diagram we wait for input 0002 to turn on. When it does timer T000 (a 10msturn on. When it does timer T000 (a 10ms increment timer) starts ticking. It will tick 100 times. Each tick (increment) is 10ms so the timer will be a 1000ms (i.e. 1 second) timer. 100ticks X 10ms =...

  • Page 44

    Example Continued

  • Page 45

    Examples of Ladder diagram(Example Seven):SIEMENS PLCspg(p)• SIEMENS S7-200, CPU 222.• 8 Inputs 6 Outputs• 8 Inputs, 6 Outputs.• 256 Counters & Timers.

  • Page 46

    Examples of Ladder diagram:An example using Siemens PLCpg

  • Page 47

    Examples ContinuedpThis Exam gives a complete understanding of input, output, OR and AND commands in ladder diagram and Timer Here it isand AND commands in ladder diagram, and Timer. Here it is shown that if input I0.0 and I0.1 are on then output Q0.0 will turn on and this part explains the AND ...

  • Page 48

    Examples Continued(Example Eight)p(pg )In this assignment you are asked to imagine a parking lot. These are one entranceand one exit in this parking garage. You are asked to draw the ladder diagram ofthis system by considering the requirements mentioned here. Both the entranceand exit gates are o...

  • Page 49

    Examples Continuedp

  • Page 50

    Example SolutionI00Example SolutionQ01SETI00T33I01I01Q01RQ01I00ResetT33I02Q01T332000 10ms

  • Page 51

    Solution DescriptionpIn this example as I mentioned there should be a latching system to keep the gate open and close it after a car passes through. Here I00 is the infrared hkhd fhl A ihsensor that takes the command from the remote control. As it get the command it opens the gate Q01 and at the ...

  • Page 52

    Solution Description ContinuedpAfter 20 second the timer activate the switch I01 which will reset the output Q01, in other words it will close the gate. But this example does not finish here. A sensor is required to keep the gate open if a car is still in the gate way. So an other infrared sensor...

  • Page 53

    Example(Example Nine)Automatic water sprinkler system of a gardenThis example is based on Automatic waterikltfdIt dlittsprinkler system of a garden. It delivers water tograss, flowers and trees. Watering of wholedddhiditd ttgarden depends upon humidity and temperatureconditions which are adjustable.

  • Page 54

    Example PictureExample Picture

  • Page 55

    Example ContinuedThis example is one of the most complicated examples in this presentation Here the water sprinkler system (Q0 0) starts topresentation. Here the water sprinkler system (Q0.0) starts to work when either temperature sensor(I0.0) or humidity sensor (I0.1) send a signal to it. In th...

  • Page 56

    Example ContinuedHere you can see that either temperature sensor I0.0 or humidity sensor I0.1 can turn on the sprinkler system (Q0.0). If the py(Q)humidity or temperature falls below a specific point the system will start working.

  • Page 57

    Example Continued

  • Page 58

    Example ContinuedIn this Example it is needed to water the grass for 4 seconds. Since the increment is 10 ms it is written 400ms in the timerSince the increment is 10 ms, it is written 400ms in the timer. The input is assume to be the Q0.0 which was the switch for sprinkler system. Here it is as...

  • Page 59

  • Page 60

    Example ContinuedSince the input switch Q0.0 turn on all the timers in this ladder diagram at the same time it is required to add the time fordiagram at the same time it is required to add the time for watering of each section with the time elapsed in the previous sequence. For example although i...

  • Page 61

    Example Continued

  • Page 62

    Example ContinuedThis part is like the second part. Watering the trees is started when previous section are finished. The time for this section is 18 second which is added to 14 seconds counted before and now it is written as 3200 ms with 10ms increment. You can see when both Q0.1 and Q0.2 are of...

  • Page 63

    Example(Example Ten)Example(Example Ten)This example is based on a parking lot with a PLC which counts the number of cars that enter and exit and if thecounts the number of cars that enter and exit and if the parking lot is about to be full, PLC sends a signal to a electronic board to say that th...

  • Page 64


  • Page 65

    Example ContinuedExample ContinuedIn this example input I0.0 open the entrance gate and input I0 1hiI00dI01b h i fdI0.1 opens the exit gate. I0.0 and I0.1 are both infrared sensors which will be activated by remote control. In addition sensor I0.2 count the number of cars entering the parking lo...

  • Page 66

  • Page 67

    Programmable logic controlh""lhh hhA PLC has many "input" terminals, through which it interprets "high" and "low" logical states from sensors and switches.It also has many output terminals  through which it It also has many ...

  • Page 68

    ContCont.Inside the PLC housing, d b h i connected between each input terminal and the Common terminal, is an opto‐isolator device that provides an device that provides an electrically isolated "high" logic signal to the computer's circuitry when ...

  • Page 69

    ContCont.Output signals are generated by h  PLC'    ii the PLC's computer circuitry activating a switching device connecting the "Source" terminal to any of the "Y‐" terminal to any of the  Y  labeled output terminals. The "Source&quo...

  • Page 70

    cont.In this way, the PLC is able to interface with real‐world devices such as switches and solenoids. Th   tl lif th  tl t i  The actual logic of the control system is established inside the PLC by means of a computer program. This program dictates whi...

  • Page 71

    ContCont.Consider the following circuit d PLC  Wh  h  and PLC program: When the pushbutton switch is unpressed, no power is sent to the X1 input of the PLC. Following the of the PLC. Following the program, which shows a normally‐open X1 contact in ser...

  • Page 72

    ContCont.If the pushbutton switch is pressed  ho e er  po er  ill be pressed, however, power will be sent to the PLC's X1 input. Any and all X1 contacts appearing in the program will assume the actuated (non normal) state  as actuated (non‐normal) state, a...

  • Page 73

    Cont.In the following illustration, we have the altered system shown in the state where the pushbutton is unactuated (not being pressed:In this next illustration, the switch is shown actuated (pressed): 

  • Page 74

    ContCont.One of the advantages of ili li l l i  implementing logical control in software rather than in hardware is that input signals can be re‐used as many times in the used as many times in the program as is necessary.For example, take the following ...

  • Page 75

    ContCont.To build an equivalent circuit using electromechanical relays  three relays electromechanical relays, three relays with two normally‐open contacts each would have to be used, to provide two contacts per input switch.Using a PLC, however, we can progra...

  • Page 76

    ContCont.If we were to press the "S" b i X  "Start" button, input X1 would energize, thus "closing" the X1 contact in the program  sending the program, sending "power" to the Y1 "coil," energizing the Y1 output...

  • Page 77

    contcont.To stop the motor, we To stop the motor, we must momentarily press the "Stop" pushbutton, which will energize the X2 input d "" th  and "open" the normally‐closed "contact " breaking contact,  breaking continuity...

  • Page 78

    In this motor control circuit example, we have a problem: if the input wiring for X2 (the "Stop" g(pswitch) were to fail open, there would be no way to stop the motor!pThe solution to this problem is a reversal of logic between the X2 logic b...

  • Page 79

    contcont.To demonstrate how one of h "il"  l these "internal" relays might be used, consider the following example circuit and program  circuit and program, designed to emulate the function of a three‐input NAND gate. Since PLC gate. SceCp...

  • Page 80

    ContCont.In this circuit, the lamp In this circuit, the lamp will remain lit so long as any of the pushbuttons remain unactuated (d)  T  k  (unpressed). To make the lamp turn off, we will have to actuate will have to actuate (press) all three switches, lik...

  • Page 81

    Cont.This section on programmable logic controllers illustrates just a small sample of their capabilities.A  t PLC   f ti i fti As computers, PLCs can perform timing functions drum sequencing, and other advanced functions with far greater accuracy and reliabi...