Presentation on theme: "LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung."— Presentation transcript:
1 LADDER DIAGRAMA ladder diagram is a means of graphically representing the logic required in a relay logic system.RailRung
2 PLC WIRING DIAGRAM A B External switches Stored program Input PLC OutputA0101022011CB120220032011ExternalswitchesStored program
3 SCANA PLC resolves the logic of a ladder diagram (program) rung by rung, from the top to the bottom. Usually, all the outputs are updated based on the status of the internal registers. Then the input states are checked and the corresponding input registers are updated. Only after the I/Os have been resolved, is the program then executed. This process is run in a endless cycle. The time it takes to finish one cycle is called the scan time. In some controllers the idle state is eliminated. In this case, the scan time varies depends on the program length.
5 PLC Ladder Diagram INSTRUCTIONS 1) Relay,2) Timer and counter,3) Program control,4) Arithmetic,5) Data manipulation,6) Data transfer, and7) Others, such as sequencers.
6 LOGIC STATES ON : TRUE, contact closure, energize, etc. OFF: FALSE, contact open , de-energize, etc.Do not confuse the internal relay and program with the externalswitch and relay. Internal symbols are used for programming.External devices provide actual interface.(In the notes we use the symbol "~" to represent negation. AND and OR are logic operators. )
7 Power flows through these contacts when they are closed. The PROGRAMMINGNormally Open(NO)Normally Closed(NC)Power flows through these contacts when they are closed. Thenormally open (NO) is true when the input or output status bitcontrolling the contact is 1. The normally closed (NC) is truewhen the input or output status bit controlling the contact is 0.7
8 Coils represent relays that are energized when power flows to them. When a coil is energized it causes a correspondingoutput to turn on by changing the state of the status bit controllingthe output to 1. That same output status bit maybe used to controlnormally open or normally closed contact anywhere in the program.8
9 Boxes represent various instructions or functions that are Executed when power flows to the box. Some of theseFunctions are timers, counters and math operations.9
10 Each rung or network on a ladder program represents AND OPERATIONBCARungEach rung or network on a ladder program representsa logic operation. In the rung above, both inputs A and Bmust be true (1) in order for the output C to be true (1).10
11 In the rung above, it can be seen that either input A or B OR OPERATIONCARungBIn the rung above, it can be seen that either input A or Bis be true (1), or both are true, then the output C is true (1).11
12 NOT OPERATIONCARungIn the rung above, it can be seen that if input A is be true (1),then the output C is true (0) or when A is (0), output C is 1.
13 AND and OR LOGIC AND OR PB1 PB2 R1 R1 = PB1.AND.PB2 PB3 PB4 R2 R1 = PB1 .OR. PB2ORPB2
16 Operation id description state explanation MSI microswitch 1 part arriveR1 output to bar code reader 1 scan the partC1 input from bar code reader 1 right partR2 output robot 1 loading cycleR3 output robot 1 unloading cycleC2 input from robot 1 robot busyR4 output to stopper 1 stopper upC3 input from machine 1 machine busyC4 input from machine 1 task complete
18 OperationRung 1. If part arrives and no part is stopped, trigger the bar code reader.Rung 2. If it is a right part, activate the stopper.Rung 3. If the stopper is up, the machine is not busy and the robot is not busy, load the part onto the machine.Rung 4. If the task is completed and the robot is not busy, unload the machine.
20 Sequential Function Chart Action Qualifiers:N non-stored, executes while the step is activeR resets a store actionS sets an action activeL time limited action, terminates after a given periodD time delayed action.P a pulse action, executes once in a stepSD stored and time delayedDS time delayed and storedSL stored and time limited
22 A Detailed Design Process 1. Understand the process2. Hardware/software selection3. Develop ladder logic4. Determine scan times and memory requirements
23 Specifications OUTPUT-PORT POWER RATINGS Each output port should be capable of supplying sufficient voltage and current to drive the output peripheral connected to it.
24 SCAN TIMEThis is the speed at which the controller executes the relay-ladder logic program. This variable is usually specified as the scan time per 1000 logic nodes and typically ranges from 1 to 200 milliseconds.
25 MEMORY CAPACITYThe amount of memory required for a particular application is related to the length of the program and the complexity of the control system. Simple applications having just a few relays do not require significant amount of memory. Program length tend to expand after the system have been used for a while. It is advantageous to a acquire a controller that has more memory than is presently needed.
26 PLC Status IndicatorsPower OnRun ModeProgramming ModeFault
27 Troubleshooting1. Look at the process 2. PLC status lights HALT - something has stopped the CPU RUN - the PLC thinks it is OK (and probably is) ERROR - a physical problem has occurred with the PLC 3. Indicator lights on I/O cards and sensors 4. Consult the manuals, or use software if available. 5. Use programming terminal / laptop.
28 List of items required when working with PLCs: 1. Programming Terminal - laptop or desktop PC.2. PLC Software. PLC manufacturers havetheir own specific software and license key.3. Communication cable for connection from Laptopto PLC.4. Backup copy of the ladder program (on diskette, CDROM, hard disk, flash memory). If none, upload it from the PLC.5. Documentation- (PLC manual, Software manual, drawings, ladder program printout, and Seq. of Operations manual.)
40 SWITCHES DPST SPDT N o n - l o c k i n g L o c k i n g N o r m a l l y 1P2MultipleThrowMultiplePoleBreak-before-makeMake-before-break
41 TERMS Throw - number of states Pole - number of connecting moving parts (number of individual circuits).SPDTA serial switch box (A-B box) hastwo 25 pin serial ports to switch from.ABOutputInputDPSTKnobHow is this switch classified?
43 RELAYSA switch whose operation is activated by an electromagnet is called a "relay"contactcoilinputRelay coilR1Output contactR1
44 RELAY Ladder LogicExample 1: For a process control, it is desired to have the process start (by turning on a motor) five seconds after a part touched a limit switch. The process is terminated automatically when the finished part touches a second limit switch. An emergency switch will stop the process any time when it is pushed.
46 Example 2: One motor with two pushbuttons: start and stop State variables: PB1(for start), PB2(for stop), M (for motor)
47 LogicPB1 is on -> CR1 energized, normally open contact 1 is closed -> M=1PB2 is on -> CR2 energized, normally close contact 2 is open -> M=0Rung 1: CR1=(PB1+CR1) CR2Rung 2: CR2=(PB2)Rung 3: M=CR1 CR2
49 ElectroPneumatic Valve Directional Control Valve which acts as a ‘switch’ to direct compressed air to each side of pneumatic actuator.
50 5-Port 2 Way ValveAlso called Double Acting Pneumatic Actuator and 5/2 way solenoid operated directional control valve.Two ports to allow air in, one for outstroke (extend) and one for in-stroke (retract).
53 TIMERA timer consists of an internal clock, a count value register, and an accumulator. It is used for or some timing purpose.Time 5 seconds.
54 ON-DELAY TIMER (TON)For this example the timer has been set for 5 seconds. When S1 is closed, TR1 begins timing. When 5 seconds have elapsed, TR1 will close its associated normally open TR1 contacts, illuminating pilot light PL1. When S1 is open, de-energizing TR1,the TR1 contacts open, immediately extinguishing PL1. This type of timer is referred to as ON delay..
55 TON ExampleWhen the switch is closed input 4 becomes a logic 1, which is loaded into timer T37. T37 has a time base of 100 ms (.100 seconds). The preset time (PT) value has been set to 150. This is equivalent to 15 seconds (.100 x 150 ). The light will turn on 15 seconds after the input switch is closed.
56 Retentive On-Delay (TONR) The Retentive On-Delay timer (TONR) functions in a similar manner to the On-Delay timer (TON). There is one difference. The Retentive On-Delay timer times as long as the enablinginput is on, but does not reset when the input goes off. The timer must be reset with a RESET (R) instruction.
58 TONR Example Cont.The same example used with the On-Delay timer will be used with the Retentive On-Delay timer. When the switch is closed at input I0.3, timer T5 (Retentive timer) begins timing. If, for example, after 10 seconds input I0.3 is opened the timerstops. When input I0.3 is closed the timer will begin timing at 10 seconds. A RESET (R) instruction can be added. Here a pushbutton is connected to input I0.2. If after 10 seconds input I0.3 were opened, T5 can be reset by momentarily closing input I0.2. T5 will be reset to 0 and begin timing from 0 when input I0.3 is closed again.
59 OFF-DELAY (TOFF)The Off-Delay timer is used to delay an output off for a fixed period of time after the input turns off. When the enabling bit turns on the timer bit turns on immediately and the value is set to 0. When the input turns off, the timer counts until the preset time has elapsed before the timer bit turns off.