21
1 PLC Programming Ladder Diagrams Consider the diagram below showing a circuit for switching an electric motor on or off. We can redraw this diagram in a different way, using two vertical lines to represent the input power rails and connecting the rest of the circuit between them. The power lines or rails are vertical lines with the horizontal lines like rungs of a ladder. L N Switch Motor Ladder Diagram Power Supply L N Switch Motor M Electrical Circuit

PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

Embed Size (px)

Citation preview

Page 1: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

1

PLC Programming

Ladder Diagrams

Consider the diagram below showing a circuit for switching an electric motor on or off. We can redraw this diagram in a different way, using two vertical lines to represent the input power rails and connecting the rest of the circuit between them.

The power lines or rails are vertical lines with the horizontal lines like rungs of a ladder.

L NSwitch Motor

Ladder Diagram

Power Supply

L

N

Switch

MotorM

Electrical Circuit

Page 2: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

2

• Ladder Programming

In drawing a ladder diagram the following conventions are adopted:

1. Each rung on the ladder defines one operation in the process control.

2. The ladder diagram as read from left to right from top to bottom. 3. Each rung must start with an input/s and must end with an output/s.

4. Electrical devices are shown in their normal condition.

5. A particular device can appear in more than one rung of a ladder.6. The inputs and outputs are all defined by there addresses.

PLC Programming

Page 3: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

3

• Ladder Logic Symbols

PLC Programming

END

Normally open input contacts

Normally closed input contacts

Output device

The end rung

Page 4: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

4

PLC Programming

• Logic FunctionsThere are many control situations requiring actions to be initiated when certain

combination of conditions is realized. For example a drill machine is only to be started when work piece is present (interlock).

– AND function

A B

Load

Supply Voltage

ANDA

B

OutputInput

Input A Input B Output

I:1/00 I:1/01 O:1/00

111

001

010

000

BAOUTPUTSINPUTS

Page 5: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

5

PLC Programming• OR function

A

B

Load

Supply Voltage

ORA

B

Input A

Input B

Output

I:1/00

I:1/01

O:1/00

OutputInput

111

101

110

000

BA

OUTPUTSINPUTS

Page 6: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

6

PLC Programming• NOT function

Load

Supply Voltage

NOTA

OutputInput

Input A Output

I:1/00 O:1/00

A

01

10

A

OUTPUTSINPUTS

Page 7: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

7

• NAND function

PLC Programming

011

001

010

100

BAOUTPUTSINPUTS

A B

Load

Supply Voltage

NANDA

B

OutputInput

Input A Input B Output

I:1/00 I:1/01 O:1/00

Page 8: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

8

PLC Programming• NOR function

011

101

110

100

BA

OUTPUTSINPUTSA

B

Load

Supply Voltage

NORA

B

Input A

Input B

Output

I:1/00

I:1/01

O:1/00

OutputInput

Page 9: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

9

PLC Programming• XOR function

011

101

110

000

BA

OUTPUTSINPUTS

Input A

Input B

Output

O:1/00

Input A

Input B

OR

A

B AND

AND

NOT

NOT

Page 10: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

10

• LatchingThere are often situations where it is necessary to hold an output

energized, even when the input ceases.

PLC Programming

Input A Input B Output

O:1/00

O:1/00

Output

Page 11: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

11

PLC Programming

• Latching example

I:1/00 I:1/01

Motor

O:1/00

O:1/00

Stop Light

O:1/00

O:1/00

Run Light

O:1/01

O:1/02

END

Page 12: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

12

PLC Programming

• Instruction Lists

Another PLC programming method, which can be considered to be the entering of a ladder program using test, is instruction lists. For this, mnemonic codes are used, each coed corresponding to a ladder element.

Branch parallel elementsORB

Connect branch elements in seriesANB

A parallel element with closed contactORN

An outputST

A parallel element with open contactOR

A series element with closed contactANDN

A series element with open contactAND

Start a rung with a closed contactLDN

Start a rung with open contactLD

DescriptionCode

Page 13: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

13

• Instruction Lists Example:

Step Instruction

1 LD I:1/00

2 AND I:1/013 ST O:1/00

PLC Programming

Input A Input B Output

I:1/00 I:1/01 O:1/00

Page 14: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

14

• Instruction Lists Exercise: Write the instruction list for the following ladder

diagrams:

(a)

(b)

PLC Programming

I:1/00

I:1/01

O:1/00

I:1/00

I:1/01

O:1/00

Page 15: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

15

• Instruction Lists Exercise: Write the instruction list for the following ladder

diagrams:

(c)

(d)

PLC Programming

I:1/00 O:1/00I:1/01

I:1/00 I:1/01

O:1/00

O:1/00

I:1/00 I:1/01

Page 16: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

16

PLC Programming

• Function Block DiagramsBasically types of diagrams used to describe logic systems. A function block is a program instruction unit which, when executed , yields one or more output values.

A

B

Q

>=1

A

B

Q

Ladder Diagram Equivalent function block diagram

Page 17: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

17

PLC Programming

A B Q

&

A

B

Q

Ladder Diagram Equivalent function block diagram

•Function Block Diagrams

Page 18: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

18

PLC Programming

A

Q

QB

>=1Q

A

B&

Ladder Diagram Equivalent function block diagram

•Function Block Diagrams

Page 19: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

19

PLC Programming

A B QC D

E

Exercise: Draw the function block diagram for the following ladder programs:

a)

•Function Block Diagrams

A B QC D

E

b)

F

G

Q

Page 20: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

20

PLC Programming

Internal Relays

In PLC’s there are elements that are used to hold data, i.e. bits, and behave like relays, being able to be switched “on” or “off” and switch other devices “on” or “off”.

Such internal relays do not exist as real world switching devices but are merely bits in the storage memory that behave in the same way as external relay output and input.

There are several terms used to describe these elements, i.e. Auxiliary relays, Flags, Markers, Coils.

Page 21: PLC Programming - instrumentation.dut.ac.zainstrumentation.dut.ac.za/eleceng/in/downloads/PLC_Programming.pdf · of a ladder. L N Switch Motor Ladder Diagram Power Supply L N

21

Internal Relays

PLC Programming

In 1 In 2 IR 1

In 3

IR 1 In 4 Out 1