24

Introduction to the Programmable Logic Controller (PLC)

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Introduction to the Programmable Logic Controller (PLC)
Page 2: Introduction to the Programmable Logic Controller (PLC)

Introduction to the Programmable Logic Controller (PLC)

Page 3: Introduction to the Programmable Logic Controller (PLC)

WHO ARE WE? IDC Technologies is internationally acknowledged as the premier provider of practical, technical training

for engineers and technicians.

We specialize in the fields of electrical systems, industrial data communications, telecommunications,

automation and control, mechanical engineering, chemical and civil engineering, and are continually

adding to our portfolio of over 60 different workshops. Our instructors are highly respected in their fields

of expertise and in the last ten years have trained over 200,000 engineers, scientists and technicians.

With offices conveniently located worldwide, IDC Technologies has an enthusiastic team of professional

engineers, technicians and support staff who are committed to providing the highest level of training and

consultancy.

TECHNICAL WORKSHOPS TRAINING THAT WORKS We deliver engineering and technology training that will maximize your business goals. In today’s

competitive environment, you require training that will help you and your organization to achieve its goals

and produce a large return on investment. With our ‘training that works’ objective you and your

organization will:

Get job-related skills that you need to achieve your business goals

Improve the operation and design of your equipment and plant

Improve your troubleshooting abilities

Sharpen your competitive edge

Boost morale and retain valuable staff

Save time and money

EXPERT INSTRUCTORS We search the world for good quality instructors who have three outstanding attributes:

1. Expert knowledge and experience – of the course topic

2. Superb training abilities – to ensure the know-how is transferred effectively and quickly to you in

a practical, hands-on way

3. Listening skills – they listen carefully to the needs of the participants and want to ensure that you

benefit from the experience.

Each and every instructor is evaluated by the delegates and we assess the presentation after every class to

ensure that the instructor stays on track in presenting outstanding courses.

HANDS-ON APPROACH TO TRAINING All IDC Technologies workshops include practical, hands-on sessions where the delegates are given the

opportunity to apply in practice the theory they have learnt.

REFERENCE MATERIALS A fully illustrated workshop book with hundreds of pages of tables, charts, figures and handy hints, plus

considerable reference material is provided FREE of charge to each delegate.

ACCREDITATION AND CONTINUING EDUCATION Satisfactory completion of all IDC workshops satisfies the requirements of the International Association

for Continuing Education and Training for the award of 1.4 Continuing Education Units.

IDC workshops also satisfy criteria for Continuing Professional Development according to the

requirements of the Institution of Electrical Engineers and Institution of Measurement and Control in the

UK, Institution of Engineers in Australia, Institution of Engineers New Zealand, and others.

THIS BOOK WAS DEVELOPED BY IDC TECHNOLOGIES

Page 4: Introduction to the Programmable Logic Controller (PLC)

CERTIFICATE OF ATTENDANCE Each delegate receives a Certificate of Attendance documenting their experience.

100% MONEY BACK GUARANTEE IDC Technologies’ engineers have put considerable time and experience into ensuring that you gain

maximum value from each workshop. If by lunchtime on the first day you decide that the workshop is not

appropriate for your requirements, please let us know so that we can arrange a 100% refund of your fee.

ONSITE WORKSHOPS All IDC Technologies Training Workshops are available on an on-site basis, presented at the venue of

your choice, saving delegates travel time and expenses, thus providing your company with even greater

savings.

OFFICE LOCATIONS AUSTRALIA • CANADA • INDIA • IRELAND • MALAYSIA • NEW ZEALAND • POLAND •

SINGAPORE • SOUTH AFRICA • UNITED KINGDOM • UNITED STATES

On-Site Training

All IDC Technologies Training Workshops are available on an on-site basis, presented at the venue of

your choice, saving delegates travel time and expenses, thus providing your company with even

greater savings.

For more information or a FREE detailed proposal contact Kevin Baker by e-mailing:

[email protected]

[email protected] www.idc-online.com

Visit our website for FREE Pocket Guides IDC Technologies produce a set of 6 Pocket Guides used by

thousands of engineers and technicians worldwide. Vol. 1 – ELECTRONICS Vol. 4 – INSTRUMENTATION Vol. 2 – ELECTRICAL Vol. 5 – FORMULAE & CONVERSIONS Vol. 3 – COMMUNICATIONS Vol. 6 – INDUSTRIAL AUTOMATION

To download a FREE copy of these internationally best selling pocket guides go to:

www.idc-online.com/downloads/

SAVE MORE THAN 50% OFF the per person

cost

CUSTOMISE the training to YOUR WORKPLACE!

Have the training delivered WHEN

AND WHERE you need it!

Page 5: Introduction to the Programmable Logic Controller (PLC)

IDC TECHNOLOGIES Worldwide Offices

AUSTRALIA

Telephone: 1300 138 522 • Facsimile: 1300 138 533

West Coast Office 1031 Wellington Street, West Perth, WA 6005

PO Box 1093, West Perth, WA 6872

East Coast Office PO Box 1750, North Sydney, NSW 2059

CANADA

Toll Free Telephone: 1800 324 4244 • Toll Free Facsimile: 1800 434 4045 Suite 402, 814 Richards Street, Vancouver, NC V6B 3A7

INDIA

Telephone : +91 444 208 9353 35 4th Street, Kumaran Colony, Vadapalani, Chennai 600026

IRELAND

Telephone : +353 1 473 3190 • Facsimile: +353 1 473 3191 PO Box 8069, Shankill Co Dublin

MALAYSIA

Telephone: +60 3 5192 3800 • Facsimile: +60 3 5192 3801 26 Jalan Kota Raja E27/E, Hicom Town Center

Seksyen 27, 40400 Shah Alam, Selangor

NEW ZEALAND Telephone: +64 9 263 4759 • Facsimile: +64 9 262 2304

Parkview Towers, 28 Davies Avenue, Manukau City PO Box 76-142, Manukau City

POLAND

Telephone: +48 12 6304 746 • Facsimile: +48 12 6304 750 ul. Krakowska 50, 30-083 Balice, Krakow

SINGAPORE

Telephone: +65 6224 6298 • Facsimile: + 65 6224 7922 100 Eu Tong Sen Street, #04-11 Pearl’s Centre, Singapore 059812

SOUTH AFRICA

Telephone: +27 87 751 4294 or +27 79 629 5706 • Facsimile: +27 11 312 2150 68 Pretorius Street, President Park, Midrand

PO Box 389, Halfway House 1685

UNITED KINGDOM Telephone: +44 20 8335 4014 • Facsimile: +44 20 8335 4120

Suite 18, Fitzroy House, Lynwood Drive, Worcester Park, Surrey KT4 7AT

UNITED STATES Toll Free Telephone: 1800 324 4244 • Toll Free Facsimile: 1800 434 4045

7101 Highway 71 West #200, Austin TX 78735

Website: www.idc-online.com

Email: [email protected]

Page 6: Introduction to the Programmable Logic Controller (PLC)

Presents

Introduction to the Programmable Logic Controller (PLC)

Revision 1

Written by Dinesh Patil B.E. (Instrumentation & Control) 1st Class, Dip Industrial Electronics

Latest Revision by Rodney Jacobs, NH Dip, M Dip Tech, Pr Tech Eng, BA (Hons), D Tech

Website: www.idc-online.com E-mail: [email protected]

Page 7: Introduction to the Programmable Logic Controller (PLC)

IDC Technologies Pty Ltd

PO Box 1093, West Perth, Western Australia 6872

Offices in Australia, New Zealand, Singapore, United Kingdom, Ireland, Malaysia, Poland, United States of

America, Canada, South Africa and India

Copyright © IDC Technologies 2013. All rights reserved.

First published 2006

All rights to this publication, associated software and workshop are reserved. No part of this publication

may be reproduced, stored in a retrieval system or transmitted in any form or by any means electronic,

mechanical, photocopying, recording or otherwise without the prior written permission of the publisher. All

enquiries should be made to the publisher at the address above.

Disclaimer

Whilst all reasonable care has been taken to ensure that the descriptions, opinions, programs, listings,

software and diagrams are accurate and workable, IDC Technologies do not accept any legal responsibility

or liability to any person, organization or other entity for any direct loss, consequential loss or damage,

however caused, that may be suffered as a result of the use of this publication or the associated workshop

and software.

In case of any uncertainty, we recommend that you contact IDC Technologies for clarification or assistance.

Trademarks All logos and trademarks belong to, and are copyrighted to, their companies respectively.

Acknowledgements

IDC Technologies expresses its sincere thanks to all those engineers and technicians on our training

workshops who freely made available their expertise in preparing this manual.

Page 8: Introduction to the Programmable Logic Controller (PLC)

Contents

1 Introduction to the Programmable Logic Controller (PLC) 1

1.1 Introduction 1

1.2 Basic Block Diagram of the PLC 2

1.3 Size of the PLC System 3

1.4 Components of the PLC Systems 3

1.5 PLC and Process Interaction 5

1.6 Number Systems and Codes 8

Page 9: Introduction to the Programmable Logic Controller (PLC)
Page 10: Introduction to the Programmable Logic Controller (PLC)

1

Introduction to the Programmable Logic Controller (PLC)

In this chapter, we will learn the following:

Introduction to the PLC

Basic block diagram of the PLC

Size of the PLC system

Components of the PLC system

PLC and process interaction

Number system and codes

1.1 Introduction to the PLC

In the past, processes were controlled manually, which was a very tedious job. During the

early years of control, man constructed hardware relay wiring to control the same process.

However, relays could not meet all the needs of modern times, and a faster solution was

required. Simply, when a change of control logic was required, the entire hardware wiring

needed to be changed. This was time consuming as well as tiresome.

After a lot of toil, man finally designed the PLC. He overcame all the constraints and

attained flexibility to carry out the necessary modifications.

“PLC” means “Programmable Logic Controller”. The word “Programmable”

differentiates it from the conventional hard-wired relay logic. It can be easily

programmed or changed as per the application’s requirement. The PLC also surpassed the

hazard of changing the wiring.

The PLC as a unit consists of a processor to execute the control action on the field data

provided by input and output modules.

In a programming device, the PLC control logic is first developed and then transferred to

the PLC.

Page 11: Introduction to the Programmable Logic Controller (PLC)

2 Practical Programmable Logic Controllers (PLCs) for Automation and Process Control

1.1.1 What can a PLC do?

It can perform relay-switching tasks.

It can conduct counting, calculation and comparison of analog process values.

It offers flexibility to modify the control logic, whenever required, in the

shortest time.

It responds to the changes in process parameters within fraction of seconds.

It improves the overall control system reliability.

It is cost effective for controlling complex systems.

Trouble-shooting becomes simpler and faster.

An operator can easily interact with the process with the help of the HMI

(Human-Machine Interface) computer.

1.2 Basic block diagram of the PLC

Figure 1.1 shows the basic block diagram of a common PLC system.

Figure 1.1

Block diagram of a PLC

As shown in the above figure, you will find the heart of the “PLC” in the center, i.e., the

Processor or CPU (Central Processing Unit).

The CPU regulates PLC program, data storage, and data exchange with I//O

modules.

“I/O Modules” are the second important and basic components of any PLC system.

Page 12: Introduction to the Programmable Logic Controller (PLC)

Introduction to the PLC 3

Input and output modules are the media for data exchange between field

devices and CPU. It tells CPU the exact status of field devices and also acts as

a tool to control them.

The programming device is the third significant component.

A programming device is a computer loaded with programming software,

which allows a user to create, transfer and make changes in the PLC software.

Memory is the fourth notable component.

Memory provides the storage media for PLC program as well as different

data.

1.3 Size of the PLC system PLCs are classified on basis of their sizes:

A small system is one with less than 500 analog and digital I/Os.

A medium system has I/Os ranging from 500 to 5,000.

A system with over 5,000 I/Os is considered large.

1.4 Components of the PLC system Figure 1.2 illustrates a sample PLC system and its components.

Page 13: Introduction to the Programmable Logic Controller (PLC)

4 Practical Programmable Logic Controllers (PLCs) for Automation and Process Control

Figure 1.2

The main/chief components of a PLC

This is the actual system. What does it look like? Does it seem difficult to understand?

Let us compare Fig. 1.2 component by component with Fig. 1.3, which is its simplified

version.

Page 14: Introduction to the Programmable Logic Controller (PLC)

Introduction to the PLC 5

Figure 1.3

Simplified component configuration of a PLC

1) CPU or processor

The main processor (Central Processing Unit or CPU) is a microprocessor-based system

that executes the control program after reading the status of field inputs and then sends

commands to field outputs. It is easy to perform arithmetic functions, manipulate data and

calculate Boolean logic.

The PLC’s memory contains the manufacturer’s operating system and housekeeping

functions. It also has program written by the user and data stored by the user related to the

process or equipment being controlled.

In Fig. 1.3, the processor module is plugged into the first slot of the central or local rack,

which is the normal practice.

The CPU card is connected with I/O modules through back-plane connections inside the

rack or chassis. Hence, it is possible for the CPU to read the status of all input modules

through the data bus. This is called local I/O chassis.

If the I/Os are located at remote places, the CPU accesses them through a remote I/O

chassis. In such a case, the remote chassis will have a remote I/O communication module.

It collects the data from I/O modules and sends it to the CPU through an I/O rack

communication link. This is particularly useful when the process is divided up, and

located in remote parts.

The CPU card has ports for communicating with the programming device as well as the

operator’s station.

Page 15: Introduction to the Programmable Logic Controller (PLC)

6 Practical Programmable Logic Controllers (PLCs) for Automation and Process Control

2) I/O section

The I/O section consists of a rack and individual I/O modules, which are plugged into the

rack and a DC power supply. A standard approach is to connect to the main processor

rack with communication cables to a series of other I/O racks.

I/O modules act as “Real Data Interface” between field and PLC CPU. The PLC knows

the real status of field devices, and controls the field devices by means of to the relevant

I/O cards.

Various I/O modules are available. Each one of these will be discussed in more detail in

the following sections.

3) Programming device

A CPU card can be connected with a programming device through a communication link

via a programming port on the CPU. Thus, it is possible to transfer programs from the

programming device to the CPU, monitor the CPU’s program online and make necessary

changes in the CPU’s program.

More details of a programming device will be discussed in the next chapter.

4) Operating station

An operating station is commonly used to provide an "Operating Window" to the process.

It is usually a separate device (generally a PC), loaded with HMI (Human Machine

Software).

This operating station can change any process set point, observe all process parameters,

process alarms, etc.

1.5 PLC and process interaction It is very interesting to see how the interaction between the PLC and the process takes

place through I/O modules. This section will explain the role of different I/O modules as

a part of PLC and process interaction.

The field devices or field data are broadly classified as follows:

Digital or discrete or on/off type field devices

Analog or continuous type field devices

For the sake of simplicity, the first examples of digital type field devices, PLC and

process interaction can be studied.

1.5.1 Digital I/O and PLC Fig. 1.4 shows how different types of digital or discrete field devices are connected to the

PLC through digital I/O modules.

Page 16: Introduction to the Programmable Logic Controller (PLC)

Introduction to the PLC 7

Figure 1.4

Digital I/O process interaction

Discrete or digital inputs are the most common types of field inputs. Selector switches,

pushbuttons, limit switches, temperature switches, level switches, flow switches, etc., are

common examples. All types of switches that permit digital contact are included in this

class.

Depending on the field device contacts, they are normally connected to 110VAC, 230V

AC and, 24VDC types of digital input cards installed in PLC rack. It is assumed to be

24VDC in Fig. 1.4.

Solenoid valves, relays and auxiliary contactors are discrete or digital output devices

commonly used in the field. Depending on the field devices 110VAC, 230VAC and

24VDC types of digital output cards are installed in the PLC rack. It is assumed to be

24VDC in Fig. 1.4.

Depending on the state of field devices, i.e., Logic 1 or Logic 0 (True/False) the

corresponding voltage signal will be received at a digital input module.

The CPU collects the status of ‘Logic 0 or Logic 1 status’ from I/P module for program

execution.

At the end of program execution, the CPU will release the On/Off command to the digital

output module in form of Logic 0 or Logic 1.

Page 17: Introduction to the Programmable Logic Controller (PLC)

8 Practical Programmable Logic Controllers (PLCs) for Automation and Process Control

The digital output module passes this status on to field devices in form of voltage so that

they will be turned on/off depending on the state of the output.

1.5.2 Analog I/O and PLC

Figure 1.5 shows how different types of analog or continuous types of field devices are

connected with the PLC through analog I/O modules.

Figure 1.5

Analog I/O process interaction

Analog or continuous devices are generally used for getting feedback of the process

parameter control. For example, temperature transducers (RTDs, thermocouples), level,

pressure, flow, etc., transmitters.

Basically, all types of transducer devices giving continuous signal are included in this

class.

Depending on field transducer devices, they are normally connected to 0-20 or 4-20 mA

DC, 0-10VDC, RTDs, thermocouples, etc., type of analog input card, installed in the PLC

rack.

Analog output actuators, commonly used in the field, include continuous actuators, I/P

converter for valves, reference for drives, etc.

Page 18: Introduction to the Programmable Logic Controller (PLC)

Introduction to the PLC 9

The corresponding signal received at the analog input module, depends on the value of

field devices (i.e., either 4-20mA or some continuous value) and varies from a minimum

to a maximum over the entire calibrated range.. This signal is converted by the input

module, into a count using ADC (analog-to-digital converter).

The CPU collects the same count from an analog I/P module for program execution.

At the end of program execution, the CPU will once again release a count proportionate

to the control value to the analog output module.

The analog output module passes the same count (either as a 4-20mA or some continuous

signal) using DAC (digital-to-analog converter) to the field actuating devices. The 4-

20mA signal actuator will either open/close the valve depending on it’s setup.

1.6 Number systems and codes The commonly used number systems can be listed as:

Decimal number system

Binary number system

Octal number system

Hexadecimal (Hex) number system

One may also encounter BCD (binary coded decimal) in codes.

The following definitions / terms are commonly encountered:

Bit: A single binary digit that can have either value 0 or 1.

Base: This denotes the total number of digits used by the number system.

LSB (Least Significant Bit): This is the bit that represents the smallest value.

MSB (Most Significant Bit): This is the bit that represents the largest value.

Byte: A group of 8 bits.

Nibble: A group of 4 bits.

Word: A group of 16 bits

1.6.1 Decimal number system The decimal number system is the most common number system (and one which we

should all have learnt in school!).

The decimal number system has a base of ‘10’. Base ‘10’ means it uses ten unique

numbers (0 to 9) for the entire number system. A specific weight value is allocated to

each digit from the right to the left. Therefore, the value of a decimal number depends on

the digit as well as its location.

Page 19: Introduction to the Programmable Logic Controller (PLC)

10 Practical Programmable Logic Controllers (PLCs) for Automation and Process Control

For example,

If we take ‘2413’ as a decimal number, its weight can be shown as,

2 4 1 3

3 x 10 exp. 0 = 3x1 = 3

1 x 10 exp. 1 = 1x10 = 10

4 x 10 exp.2 = 4x100 = 400

2 x 10 exp.3 = 2x1000 = 2000

= 2413 (Decimal)

1.6.2 Binary number system

The most important base for the microprocessor is base 2. Normally, it is also known as

‘Binary’, since binary means only two values. The binary system uses only two digits –

zero (0) and one (1) – to represent all numbers.

Two states exists for any digital device – one as “On” state or Logic ‘1’ and other as

“Off” state or Logic “0”.

As the base was ‘10’ in the decimal system, here, the base is ‘2’ in the binary system.

The weight of the digits is calculated in terms of base ‘2’ like for example,

1 0 0 1 1

1 x 2 exp. 0 = 1x1 = 1

1 x 2 exp .1 = 1x2 = 2

0 x 2 exp .2 = 0x4 = 0

0 x 2 exp .3 = 0x8 = 0

1 x 2 exp .4 = 1x16 = 16

= 19 (Decimal)

1.6.3 Octal number system

The base for this number system is ‘8’. That is why it is called ‘Octal’.

The binary system uses eight digits – from zero (0) to seven (7) to represent all the

numbers.

Octal Digit 0 1 2 3 4 5 6 7

Binary Equivalent. 000 001 010 011 100 101 110 111

Page 20: Introduction to the Programmable Logic Controller (PLC)

Introduction to the PLC 11

Basically, it can be considered as a shorthand version of binary. Octal notation was used

to provide an easy and more readable view of the binary data. But it is not frequently

used, when compared to other number systems. For example, the octal number 24 is

represented as,

2 4

4 x 8 exp.0 = 4x1 = 4

2 x 8 exp.1 = 2x8 = 16

= 20 (Decimal)

1.6.4 Hexadecimal (Hex) number system The base of this number system is ‘16’. It provides a shorter notation of the numbers,

compared octal system. It is very popular and was introduced by IBM. The hexadecimal

number system uses 16 digits. These are:

Numbers ‘0’ to ‘9’, and it uses letters A, B, C, D, E, and F to represent the decimal

equivalents of 10, 11, 12, 13, 14 and 15.

Hex Digit 0 1 2 3 4 5 6 7

Binary Equivalent. 0000 0001 0010 0011 0100 0101 0110 0111

Hex Digit 8 9 A B C D E F

Binary Equivalent. 1000 1001 1010 1011 1100 1101 1110 1111

As shown in above table, a hex digit is representing four binary digits (0000 to 1111).

For example, the hex number 2F is represented as,

0 0 2 F

F x 16 exp.0 = Fx1 = 15

2 x 16 exp. 1 = 2x16 = 32

= 47 (Decimal)

1.6.5 Conversion of numbers

Table 1.1 gives an overview of all number systems we have seen so far. Note that all

number systems start with digit ‘0’.

Page 21: Introduction to the Programmable Logic Controller (PLC)

12 Practical Programmable Logic Controllers (PLCs) for Automation and Process Control

Table 1.1

Number formats

Decimal Binary Octal Hex

0 0000 0 0

1 0001 1 1

2 0010 2 2

3 0011 3 3

4 0100 4 4

5 0101 5 5

6 0110 6 6

7 0111 7 7

8 1000 10 8

9 1001 11 9

10 1010 12 A

11 1011 13 B

12 1100 14 C

13 1101 15 D

14 1110 16 E

15 1111 17 F

1.6.6 BCD (Binary Coded Decimal) Binary coded decimal uses binary numbers in coded format to represent the decimal

numbers (unlike the normal way; discussed in the earlier section).

It is also called as 8421 BCD code. It basically employs four binary bits, with the weights

1, 2, 4 and 8 assigned to it. This is illustrated in the table given below:

Decimal Digit 0 1 2 3 4 5 6 7

BCD Equivalent. 0000 0001 0010 0011 0100 0101 0110 0111

Decimal Digit 8 9

BCD Equivalent. 1000 1001

For example, the decimal number 79 is represented in BCD format as,

0 1 1 1

‘7’ ‘9’

= 79 (Decimal)

1 0 0 1

Page 22: Introduction to the Programmable Logic Controller (PLC)

Introduction to the PLC 13

Each decimal number is replaced by its BCD equivalent, which is a four-digit binary

number. The BCD number format is useful for the PLC while handling a large number of

input and output data.

Nowadays, PLC’s possess a certain number format conversion programming instructions.

One can easily convert numbers from one format to another with the help of these

instructions.

Should you wish to do some form of conversion, program the PLC with the necessary

code…and it will be done.

Page 23: Introduction to the Programmable Logic Controller (PLC)

14 Practical Programmable Logic Controllers (PLCs) for Automation and Process Control

Page 24: Introduction to the Programmable Logic Controller (PLC)

Practical Programmable Logic Controllers (PLCs) for Automation and Process Control

YOU MAY ALSO BE INTERESTED IN THE FOLLOWING TITLE:

This book is available for purchase in printed form or as an ebook

For more details about this title please visit the link below:

http://idc-online.com/books/instrumentation/?category=automation&booked=40

If you would like a quote or any further information please do not hesitate to contact us:

[email protected]