Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic...

29
Lecture 4: Programmable logic Controllers 1

Transcript of Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic...

Page 1: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

1

Lecture 4:

Programmable logic Controllers

Page 2: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

2

Programmable Logic Controller (PLC)

• Programmable logic controllers are special-purpose computers optimized for industrial control tasks.

• PLC has interfacing for input and output devices such as transducers, switches, and motors.

Page 3: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

3

Programmable Logic Controller (PLC)

The PLC:– implements functions such as logic, sequencing, timing, counting,

arithmetic as well as proportional-integral-derivative (PID) control modes.

– has a programmable memory to store instructions.– can be programmed using several programming languages.

Page 4: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

4

Types of PLC

The PLCs can be classified into

– Small PLC– Modular PLC

Page 5: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

5

Small PLC

They are small self-contained PLC units for use with e.g. 20 digital inputs and outputs points.

Page 6: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

6

Modular PLC units • Modular systems are extendible by adding input or output modules

as needed. • Therefore, they can be used for large numbers of inputs/outputs.

Page 7: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

7

Communications Interface

Page 8: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

8

PLC input-output types

PLC can handle digital or analog inputs/outputs.

Page 9: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

9

Digital Input Unit

• PLC can receive DC or AC voltages of several levels.

Page 10: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

10

Page 11: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

11

Digital Output Unit

• By the same way, PLC output can handle DC or AC voltages of several levels.

Page 12: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

12

Types of PLC outputs

1- Relay type

2- Transistor type

3- Triac type

Page 13: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

13

Page 14: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

14

Relay type output

• The signal from the PLC output is used to operate a relay.

• Relay output is able to switch currents of the order of a few amperes in an external circuit.

• Suitable for a.c. and d.c. switching.

• Slow to operate.

• Optoisolators (optocouplers) are used to provide isolation for all output types.

Page 15: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

15

Transistor type output

• Uses a transistor to switch current through the external circuit.

• A considerably faster switching action.

• Strictly for d.c. switching.

• Destroyed by overcurrent and high reverse voltage. As a protection, a fuse is used.

Page 16: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

16

Triac output

• Uses a triac to switch current through the external circuit.

• A considerably faster switching action.

• It is strictly used to control external loads which are connected to a.c. power supply (because it needs the zero crossing to turn off, it would not switch off on d.c.).

• It is very easily destroyed by overcurrent. Fuses are virtually always included to protect such outputs.

Page 17: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

17

I/O addresses

• In PLC, the inputs and outputs are identified by their addresses.

• This is the address of the input or output in the memory of the PLC.

• Each PLC manufacturer has its own notations for addressing input and outputs.

Page 18: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

18

I/O Numbering: Siemens

I0.0Q2.0

• I designates a logic input• Q designates a logic output. • The first number identifies the byte. • The second number identifies the bit.• Image register space for digital I/O is always reserved

in increments of eight bits (one byte).

Page 19: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

19

I/O Numbering: LG

%I0.0.0%Q0.2.0

• I designates a logic input and • Q designates a logic output. • The first number identifies the base number. • The second number identifies the slot.• The third number identifies the bit.

Page 20: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

20

PLC programming languages

There are several PLC programming languages such as:

– ladder diagrams (LAD), – instruction list (IL), – sequential function

charts (SFC),

Page 21: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

21

Ladder programming

• Ladder programming is intended to be used by engineers without any great knowledge of programming.

• It became adopted by most PLC manufacturers. However each have developed their own versions.

Page 22: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

22

Ladder diagrams

Ways of drawing the same electrical circuit

Page 23: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

23

The Rung

power rails

In ladder diagrams this symbol is called a contact and represents an input to the PLC.

In ladder diagrams this symbol is called a coil and represents an output from the PLC.

Page 24: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

24

Ladder program

• Vertical lines are called power rails while Horizontal lines are called rungs.

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

Page 25: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

25

Ladder programming notes

• Each rung must start with an input or inputs and must end with at least one output.

• The term input is used for a control action, such as closing the contacts of a switch connected as an input to the PLC.

• The term output is used for a device connected to the output of a PLC, e.g. a motor.

• A particular device can appear in more than one rung of a ladder.

Page 26: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

26

PLC scan cycle

Page 27: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

27

Normally Open/Normally Closed Notation

• Electrical devices are shown in their normal condition. • Thus a switch which is normally open (NO) until some object

closes it, is shown as open on the ladder diagram. • A switch that is normally closed (NC) is shown closed.

Page 28: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

28

Example

What is the logic statement that describes the relationship between the output and input for each of the following two examples?

Output = A

Output = A

Page 29: Lecture 4: Programmable logic Controllers 1. Programmable Logic Controller (PLC) Programmable logic controllers are special-purpose computers optimized.

29

References

• Programmable Logic Controllers, W. Bolton., 4th edition, ELSEVIER, 2006.

• Programmable Logic Controllers: Programming Methods and Applications, John Hackworth and Frederick Hackworth, Prentice Hall, 2003.