70
LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. A R1 PB1 PB2 R1 R1 start emergency stop Rail Rung

LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Embed Size (px)

Citation preview

Page 1: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

LADDER DIAGRAMA ladder diagram is a means of

graphically representing the logic required in a relay logic system.

A

R1PB1 PB2

R1

R1

start emergency stopRail

Rung

Page 2: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

PLC WIRING DIAGRAM

Externalswitches

Stored program

01 02 20

20

20 11

01

02

03

11

12

C

PLCInput OutputA

B

Page 3: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

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.

Page 4: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

PLC Scan

begin

Input

Output

Resolvelogic

Idle

Scan cycle

Page 5: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

PLC Ladder Diagram

INSTRUCTIONS

1) Relay, 2) Timer and counter, 3) Program control, 4) Arithmetic, 5) Data manipulation, 6) Data transfer, and 7) Others, such as sequencers.

Page 6: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

LOGIC STATES ON : TRUE, contact closure,

energize, etc. OFF: FALSE, contact open , de-

energize, etc.

(In the notes we use the symbol "~" to represent negation. AND and OR are logic operators. )

Do not confuse the internal relay and program with the externalswitch and relay. Internal symbols are used for programming.External devices provide actual interface.

Page 7: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

7

PROGRAMMING

Normally Open(NO)

Normally Closed(NC)

Power flows through these contacts when they are closed. The normally open (NO) is true when the input or output status bit controlling the contact is 1. The normally closed (NC) is true when the input or output status bit controlling the contact is 0.

Page 8: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

8

Coils

Coils represent relays that are energized when power flows tothem. When a coil is energized it causes a correspondingoutput to turn on by changing the state of the status bit controlling the output to 1. That same output status bit maybe used to controlnormally open or normally closed contact anywhere in the program.

Page 9: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

9

Boxes

Boxes represent various instructions or functions that areExecuted when power flows to the box. Some of these Functions are timers, counters and math operations.

Page 10: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

10

AND OPERATION

Each 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).

RungA B C

Page 11: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

11

OR OPERATION

In 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).

RungA

B

C

Page 12: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

NOT OPERATION

In 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.

RungA

C

Page 13: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

AND and OR LOGICPB1 R1PB2

R2

R1 = PB1.AND.PB2 R2 = PB2.AND.~PB4

PB3 PB4

PB1 R1

PB2

R1 = PB1 .OR. PB2

AND

OR

Page 14: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

COMBINED AND & OR

R1 = PB1 .OR. (PB2 .AND. PB3)

PB1 R1

PB2 PB3

Page 15: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

PROGRAMMING EXAMPLE 1

Part

microswitch

Bar code reader

Stopper

Conveyor

MachineRobot

Page 16: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Operation

id description state explanation MSI microswitch 1 part arrive R1 output to bar code reader 1

scan the part C1 input from bar code reader 1

right part R2 output robot 1 loading cycle R3 output robot 1 unloading

cycle C2 input from robot 1 robot busy R4 output to stopper 1 stopper up C3 input from machine 1 machine busy C4 input from machine 1 task complete

Page 17: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

01

02

03

04

05

11

12

13

14

15

InputOutput

Programmable Controller PLC

MS1

C1

C2

C3

C4

R1R2R3

R4

PLC WIRING DIAGRAM

Page 18: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Operation Rung 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.

Page 19: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

01 14 11

02

14 04 03

14

12

1305 03

PLC Ladder

Page 20: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Sequential Function Chart

Action Qualifiers:N non-stored, executes while the

step is active

R resets a store action

S sets an action active

L time limited action, terminates after a given period

D time delayed action.

P a pulse action, executes once in a step

SD stored and time delayed

DS time delayed and stored

SL stored and time limited

Page 21: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Sequential Function Chart

Page 22: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

A Detailed Design Process

A Detailed Design Process

1. Understand the process2. Hardware/software selection3. Develop ladder logic4. Determine scan times and memory requirements

Page 23: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

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.

Page 24: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

SCAN TIME

This 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.

Page 25: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

MEMORY CAPACITY

The 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.

Page 26: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

• Power On

• Run Mode

• Programming Mode

• Fault

PLC Status Indicators

Page 27: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Troubleshooting

1. 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.

Page 28: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

List of items required when working with PLCs:

1. Programming Terminal - laptop or desktop PC.

2. PLC Software. PLC manufacturers have

their own specific software and license key.

3. Communication cable for connection from Laptop

to 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.)

Page 29: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Examples of PLC Programming Software:1. Allen-Bradley – Rockwell Software RSLogix500

2. Modicon - Modsoft

3. Omron - Syswin

4. GE-Fanuc Series 6 – LogicMaster6

5. Square D- PowerLogic

6. Texas Instruments – Simatic

7. Telemecanique – Modicon TSX Micro8. Mitshibishi – MelSoft (GX Developer)

Page 30: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

PLC

Inputs

Outputs & Power Supply

Com

mun

icat

ion

Por

ts (

RS

-485

)

Page 31: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

PLC Internal Architecture

Page 32: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

PLC Input/Output

Page 33: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

PLC Input Devices

Push buttons Switches (limit switches, level

switches, etc.) Sensors ...

Page 34: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

PLC Output Devices

Relay contacts Solenoid valves Signal devices (such as lamps,

alarms, etc.) Motors ...

Page 35: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Programming terminal

Page 36: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Programming terminal

Programming is done through

programming terminal

Programming terminal translates

engineering language (logic

control) to machine language

(binary code)

Page 37: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Programming through standard computer

Most PLC manufacturers offer

software packages that allow a

standard computer to be used as a

programming terminal

Page 38: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Programming through standard computer

Page 39: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Relating the program to inputs and outputs

Page 40: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

SWITCHES

DPSTSPDT

Non-locking Locking

Normally Ope n Normally Close d

Multiple Throw

P1

P2

Multiple Pole

Break-before-make Make -before -break

Page 41: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

TERMSThrow - number of states

Pole - number of connecting moving parts (number of individual circuits).

SPDT

DPST

A serial switch box (A-B box) hastwo 25 pin serial ports to switch from.

InputOutput

A B

Knob

How is this switch classified?

Page 42: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

TYPES OF SWITCHES Selector switches

Pushbutton switches Photoelectric

switches Limit Switches Proximity switches Level switches Thumbwheel

switches Slide switches

RATING:

• 24 Volts AC/DC• 48 Volts AC/DC• 120 Volts AC/DC• 230 Volts AC/DC• TTL level (Transistor-to-transistor ±5V)• Isolated Input

Page 43: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

RELAYSA switch whose operation is activated by an electromagnet is called a "relay"

contact

coil

input

Relay coil

R1

R1Output contact

Page 44: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

RELAY Ladder Logic

Example 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.

Page 45: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

L1

LS1 PB1 LS2 R1

R1

R1TIMER R2

PR=5

LS1PB1

LS2

R1

TIMER

5Motor R2

Page 46: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Example 2: One motor with two pushbuttons: start and stopState variables: PB1(for start), PB2(for stop), M (for motor)

Page 47: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Logic

PB1 is on -> CR1 energized, normally open contact 1 is closed -> M=1

PB2 is on -> CR2 energized, normally close contact 2 is open -> M=0

Rung 1: CR1=(PB1+CR1) CR2

Rung 2: CR2=(PB2)

Rung 3: M=CR1 CR2

Page 48: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Cylinder Pneumatic

Also called Actuator

Page 49: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

ElectroPneumatic Valve Directional Control Valve which acts

as a ‘switch’ to direct compressed air to each side of pneumatic actuator.

Page 50: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

5-Port 2 Way Valve Also 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). 

Page 51: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Cylinder & Valve Assembly

Page 52: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

TIMER

Page 53: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

TIMER

A timer consists of an internal clock, a count value register, and an accumulator. It is used for or some timing purpose.

Clock

Accumulator

contact

reset

output

Register

Contact

Time 5 seconds.

Clock

Reset

Output

Count 1 2 3 40 5

Page 54: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

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..

Page 55: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

TON Example

When 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.

Page 56: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

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 enabling

input is on, but does not reset when the input goes off. The timer must be reset with a RESET (R) instruction.

Page 57: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

TONR Example

Page 58: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

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 timer

stops. 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.

Page 59: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

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.

Page 60: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

TIMER MAX VALUES

Page 61: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

TIMER EXAMPLE

Start PB Pressed >> Pump1 ON (5 sec) >> Pump2 ON (3 sec) >> Mixer ON (60 sec) >> Drain Valve ON >> Pump 3 (8 sec)

Page 62: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Counter

Page 63: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

COUNTERDigital counters output in the form of a relay contact

when a pre-assigned count value is reached.

Register

Accumulator

contact

input

reset

output

Input

Reset

Output

Count 0 1 2 3 4 5 0 1

5

Page 64: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

CTU, CTD, and CTUD

Page 65: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

UP COUNTER (CTU)

Page 66: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Down Counter (CTD)

Page 67: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

UP/DOWN COUNTER (CTUD)

Page 68: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

COUNTER EXAMPLE

Page 69: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Example

Page 70: LADDER DIAGRAM A ladder diagram is a means of graphically representing the logic required in a relay logic system. Rail Rung

Example (cont.)