PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS...

75
PROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide

Transcript of PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS...

Page 1: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

PROGRAMMABLE LOGIC CONTROLLERS

(PLC)

Learner Guide

Page 2: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES & LEARNING PROCEDURE PAGE 2 PART 1 PAGE 3 SELF-TEST EXERCISE NO. 1 PAGE 6 PART 2 PAGE 7 SELF-TEST EXERCISE NO. 2 PAGE 11 PART 3 PAGE 13 SELF-TEST EXERCISE NO. 3 PAGE 16 PART 4 PAGE 18 SELF-TEST EXERCISE NO. 4 PAGE 20 PLC PROGRAMME 2: RELAY LOGIC DEVICES & LADDER DIAGRAMS OBJECTIVES & LEARNING PROCEDURE PAGE 21 RELAY LOGIC DEVICES & LADDER DIAGRAMS PAGE 22 SELF-TEST EXERCISE NO. 1 PAGE 25 CONTROL DEVICES & LADDER LOGIC PAGE 26 SELF-TEST EXERCISE NO. 2 PAGE 32 RELAY LADDER LOGIC DIAGRAMS PAGE 34 SELF-TEST EXERCISE NO. 3 PAGE 38 PLC PROGRAMME 3: HARDWARE AND LADDER LOGIC OBJECTIVES & LEARNING PROCEDURE PAGE 40 PLC HARDWARE AND LADDER LOGIC PAGE 41 SELF-TEST EXERCISE NO. 1 PAGE 44 PLC HARDWARE AND LADDER LOGIC (CONT.) PAGE 45 SELF-TEST EXERCISE NO. 2 PAGE 47 PLC HARDWARE AND LADDER LOGIC (CONT.) PAGE 48 SELF-TEST EXERCISE NO. 3 PAGE 52

Page 3: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

PLC PROGRAMME 4: A SPECIALISED COMPUTER OBJECTIVES & LEARNING PROCEDURE PAGE 54 THE PLC-A SPECIALISED COMPUTER PAGE 55 SELF-TEST EXERCISE NO. 1 PAGE 59 INTERNAL LOGIC DEVICES PAGE 61 SELF-TEST EXERCISE NO. 2 PAGE 65 THE PLC AS AN INFORMATION PROCESSOR PAGE 66 SELF-TEST EXERCISE NO. 3 PAGE 71

CONTACT DETAILS: https://techav.co.za

[email protected]

Page 4: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 1

PROGRAMMABLE LOGIC CONTROL INTRODUCTION This series of programmes has been created in order to assist you in understanding the basic principles of programmable logic control devices and systems. WHY?

o As we move further and further into High-Technology (Hi-Tech), the industrial world is relying, increasingly, upon Computerised systems to operate, control and monitor Processing Systems.

o Operators, artisans, technicians and engineers working in modern plants will eventually all have to have, at least, a working-knowledge of computerised control systems.

o This series of programmes will, we trust, provide you with a solid understanding of typical PLC's and the manner in which they operate to manipulate an automatic process system.

WHAT YOU WILL LEARN IN THIS SERIES Programme 1 (PLC-1) - Fundamentals of Automatic Control. Programme 2 (PLC-2) - Relay Logic Devices and Ladder Diagrams. Programme 3 (PLC-3) - PLC Hardware and Ladder Logic. Programme 4 (PLC-4) - The PLC as an information processor. HOW WELL WILL YOU PERFORM?

o Using Criterion tests you will be able to assess your understanding of each section as You work through the series.

o By obtaining a YES response to each question, or practical assessment. LEARNING PROCEDURE

o There are 2 primary resources at Your disposal: This workbook. Video Programme (PLC1 - 4).

By following the instructions appearing on each page you will be guided through the PLC series.

o It is important that you work through this workbook systematically. Don't try to jump around or you will get lost and confused.

o Each programme begins with a Learning Objective. This learning objective provides you with the information you need to get on with each programme.

Page 5: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 2

PROGRAMMABLE LOGIC CONTROLLER PROGRAMME 1: FUNDAMENTALS OF AUTOMATIC CONTROL

OBJECTIVE When you have completed this programme, which is sub divided in 4 parts, you will be able to:

o Identify the three basic stages of a typical automatic control system. o Describe the operation of a two state switch and two state logic. o Explain the operation of a two state relay and describe its functions as a control

device. o Explain the basic differences between a relay logic controller and a programmable

logic controller. PROCEDURES

1. Read the Resource Notes which begin over page. 2. View video No. PLC-1 all the way through. 3. View the video a second time but now you will stop the video when you reach a

"REVIEW' break. 4. Complete the self-test exercise (You will be prompted at the end of each section of

the Resource Notes). 5. Check your answers / performance (as guided by instructions on each self-check

exercise). 6. When you have mastered that section, (i.e. you have a YES response against each

Criterion) then continue with the next Learning Objective. RESOURCES REQUIRED For this programme (PLC-1) you will require:

o This workbook. o Video Programme PLC-1.

Page 6: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 3

RESOURCE NOTES PART 1 INTRODUCTION At first appearance an automatic process system appears confusingly complicated. Machinery and equipment literally "doing their own thing”, to the casual observer, seems almost like magic, but, behind every single action is a basic simple electrical or electronic circuit causing that action. Many (sometimes thousands) of these simple circuits are incorporated into a process and every circuit is "managed" by another series of electronic circuits contained within a "processing unit", or if you wish a computer. What we are seeing today is the result of man’s ingenuity in overcoming problems and creating better ways of doing things. However, like most innovations, it is always easier to understand how anything works by first learning the principles upon which they are based. It is for this reason that we begin our understanding of a PLC controlled system by going: BASIC PRINCIPLES

o Before any automatic process systems were created virtually all work had to be done manually (by man or woman power!).

o Sorting and Counting of numerous objects is a classic example of a tedious, tiresome and slow process, but it serves to illustrate some very important "fundamentals".

o Using different sized blocks, the DVD shows a person having to sort by size and then to count a number of "acceptable" objects (blocks).

o The manual process involves: gathering information. making a decision. acting upon the decision.

Let’s look a little deeper into each procedure:

1. Gathering information, from given information such as: What length an acceptable block must be? Where to stack acceptable blocks? How many acceptable blocks must be packed together? etc. We call this INPUT.

2. Making a decision -based upon the operator asking himself a simple question such as:

Back to Basics!

Page 7: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 4

Is the block of the acceptable length? YES or NO? We call this LOGIC (reasoning).

3. Acting upon the decision -based on the Logic, the operator will place "acceptable" blocks in one place and maybe reject all unacceptable blocks. We call this OUTPUT.

We now have the BASIS of all automatic control systems.

Now here is the very core of all fundamental understanding to any control system. When you can always think in these terms You will be able to follow all further explanations. In automatic control systems sensing devices provide input to a logic system. A logic system is not necessarily any particular device, it is essentially one, or several circuits which have been arranged (programmed) in such a way that output signals are sent to activate various working devices. As we shall see shortly a typical logic system can be programmed into relays.

Let us return to a simple system, our block sorter and its long suffering operator! In an attempt to make his work simpler we have placed the blocks upon a travelling base (conveyor). A bar, placed across the belt at a prescribed height, has been installed. The bar will knock over all the blocks that are too long -but allow the short one (acceptable blocks) to pass underneath. The operator simply takes all the blocks that fell over, off the belt. He no longer needs to physically measure the blocks.

Page 8: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 5

What we have created is a very simple logic unit. The bar, in effect asks the same question repeatedly, is the block too long? It answers simply as the block hits the bar and falls over -yes - it's too long. The operator receives his input message helping him simplify the sorting process. Now you must be thinking how crude this is -surely this is oversimplifying things? Yes we are oversimplifying, for good reason. Keep in your mind the logic is all to do with YES or NO responses.

NOW VIEW THE VIDEO UP TO REVIEW NO. 1.

Page 9: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 6

PLC-1: SELF TEST EXERCISE NO. 1 INSTRUCTIONS

o Without the aid of notes or other references answer the question below. o When completed, check your answers against your notes, the video or with your

Facilitators.

QUESTIONS YES NO

1. What are the 3 fundamental steps of any process? a) _____________________________________________ b) _____________________________________________ c) _____________________________________________

2. What is the basis of all automatic control systems?(write answers in the blocks)

3. On the simple block sorting machine what role does the height bar play, in respect of Your answer to question No. 2? ANS: ______________________________________________ ___________________________________________________

4. A logic acts only upon what decision? ANS: ______________________________________________

Page 10: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 7

RESOURCE NOTES PART 2 INTRODUCTION In the previous section we learned that all processes involve three basic steps namely: input, decision and action. We also gained the knowledge that decision making is based upon simple YES or NO signals. In this section we shall move a few steps closer to sophistication. You will notice that our hand driven conveY0r belt has been motorised. Using this basic model we shall now incorporate the necessary devices that will automatically do the following:

o Remove all unacceptable blocks (long) blocks. o Count a desired number of acceptable (short) blocks. o Sound an alarm when the desired number (of blocks) has been counted out. o Stop the belt.

Although this is a huge leap forward from our earlier example, we are still at the basic stage. To perform all the operations mentioned we are going to use old technology simply because this will add to your eventual understanding of the new technology (i.e. PLC's). To build up our automatic system we must go one step at a time: STEP ONE This involves motorising the belt using an electric motor. We shall return to this a little later so for the time being just consider that it can be started or stopped via a basic stop / start control circuit. STEP TWO Detect the long blocks, which will involve replacing the height bar with a sensing device. The sensing device that we have selected is a limit-switch. In essence the limit-switch is going to tell the system that a long block is on the belt. In other words it is an INPUT device. Every time a long block activates the limit-switch, a signal in the form of voltage, will pass to the logic device. The logic device will be a relay. The relays coil as we'll describe later, is energised whenever a voltage (signal) is sent to it. STEP THREE Reject long blocks, by ejecting them off the belt. This is achieved using a pneumatically operated ejector (piston powered by air). Air supply to the ejector is controlled (opened or

Page 11: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 8

closed) by a solenoid-valve. The solenoid is the OUTPUT device which reacts (activates) when a signal is provided via the relay (logic). Let’s look at our system now in simplified diagram form.

When the limit-switch closes -voltage (signal) passes to the relay (logic). The relay coil is energised and this causes contacts to close. Power passes, via the contacts, to the solenoid. The solenoid activates the air-valve causing the ejector to function. The solenoid is the action device or working device. The cause of the action was the output signal (of an electrical nature) from the relay contacts. In symbol form our automatic circuit appears thus:-

o Now, let’s explain some facts about switches and relays because, once again, their behaviour has a direct influence on the understanding of PLC devices.

SWITCHES

o In their simplest form switches serve one function -they either open and break an electrical circuit (i.e. switch if off) or they close and make the circuit (switch it on).

o A simple switch, like a limit-switch, has to be activated, usually manually or mechanically, into an on or an off state.

o When a switch is not activated it will remain in its inactive or normal state. o Switches can be either:

Normally open (open, in its inactive state) or Normally closed (closed, in its inactive state).

o It is important for you to know whether a switch is normally open (N/O) or normally closed (N/C) whenever you are working with circuits. Any person with an electrical background will appreciate this.

Page 12: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 9

o In our block sorting model we have used a normally open (N/O) switch to act as the sensor.

o Only when the sensing rod is moved, by a long block, does the switch change state to an ON, or closed (circuit), situation.

o In PLC terminology the following rules apply: 1) 2)

EXAMPLE Our block sorting model has an N/O sensor therefore we use row 1. The logic will receive a YES signal when the switch is triggered (activated by a block). When no block is passing (or a short block) the switch will be inactive -sending a NO message to the logic. RELAYS

o A relay is also a type of switch. The major difference is that a relay is activated electrically (coil).

o A relay can be made to activate one, or several, sets of contacts. Each set of contacts can control (switch on or off) individual external circuits (independent circuits).

o Relatively low voltage is used to energise the relay's coil (electromagnetic). This low voltage may pass directly from the sensing switch.

o Once energised, the relay's coil pulls in an armature which carries switching contacts.

o The switching contacts may be normally open, normally closed or, with multiple contacts, a combination of N/O and N/C contacts may be employed.

o In the diagram below a double pole / single throw relay is featured with both N/O and N/C contacts.

We shall feature this particular configuration of relay in our block sorting model. At this time we will use the normally open (N/O) contacts to activate the ejector solenoid.

SWITCH TYPE ACTIVE INACTIVE

n/o closed open

MESSAGE TO LOGIC yes no

n/c open closed

MESSAGE TO LOGIC no yes

Page 13: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 10

Presented in electrical circuit convention, on paper, our circuit thus far would appear as illustrated below.

NOTE: Electrical contacts are always represented in the normal or inactive state. Standard notation for contacts are:

N.B.: Contacts are always drawn in their inactive state - i.e. how they behave when nothing is done to them.

NOW REVIEW PLC-1 TO REVIEW NO. 2.

Page 14: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 11

PLC-1: SELF TEST EXERCISE NO. 2 INSTRUCTIONS

o Without the aid of notes or other references answer the questions below. o When completed, check your answers against your notes, the video or with your

Facilitators.

QUESTIONS YES NO

1. With what have we replaced the height bar in our improved block sorter? ANS: _________________________________________________

2. What device causes the ejector to operate? ANS: _________________________________________________

3. What device decides when to cause the ejector solenoid to function? ANS: _________________________________________________

4. From Your answers of questions 1, 2 and 3 which device is: a) The input device: ___________________________________ b) The logic device: ___________________________________ c) The output device: __________________________________

5. In which of two possible inactive states can a simple switch exist? a) _______________________________________________ b) _______________________________________________

6. What signal or message does the logic see when, a) a N/O switch is activated: _____________________________ b) a N/C switch is activated: _____________________________

7. What, basically, is a relay? ANS: _________________________________________________ _____________________________________________________

Page 15: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 12

8. Describe the symbols shown below.

________________________________ _____________________________________________________

________________________________ _____________________________________________________

9. In what state, or conditions, are contacts always shown in a circuit diagram? ANS: _________________________________________________ _____________________________________________________

10. Describe the symbolised device shown below.

ANS: _________________________________________________ _____________________________________________________ _____________________________________________________

Page 16: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 13

RESOURCE NOTES PART 3 INTRODUCTION We have now reached the stage whereby we have an ejecting mechanism to reject (push off) unacceptable blocks. We now want to devise some practical way in which we can count the number of acceptable block (short ones) as they move along the belt. In this section we will discuss and demonstrate how this can be done, and yet maintain the status of the ejector circuit. A COUNTER CIRCUIT

o There are several counting devices created and we have selected a typical electrical type, to be activated electrically via a limit-switch.

o In order to detect the short blocks the limit-switch (lower sensor) is mounted just above the belt. Now it might be more practical to place this sensor further along the belt but we want to demonstrate how it is possible to programme two switches to work together and achieve our desire to count only the short blocks.

o With the limit-switches mounted one above the other, obviously the long blocks are going to activate/trigger the lower limit-switch, which would essentially trigger a count. So how can we solve this?

This is how we would plan the circuit in schematic format:

NOTE Consider power flow to be from left to right in each line, and that the source of power in each line may be from any supply.

o As we cannot wire the lower limit switch (counter) directly to the counter because this would count all the blocks, we must therefore use the normally closed contacts of our (double pole) relay. Notice that this is connected in a series circuit with the

Page 17: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 14

normally open contacts. (Things should become clearer as we explain the operation!).

o When a long block passes the sensors, both the upper and the lower limit switches are activated. The lower switch sends a YES signal to the logic as it closes the circuit. The upper switch also sends a YES signal to the logic which energises the relay. The relay, now activated, opens the counter circuit contacts (Le. CR1 (N/C) changes to open state), thus preventing a signal from reaching the counter.

o Now a short block comes past and activates the lower limit-switch only. o A quick look at the circuit diagram will explain that the closing of the lower limit

switch will cause a power flow via the normally closed relay contacts directly to the counter.

o The upper limit-switch did not activate so the relay coil did not energise. This left the (upper) relay contacts in their normally open state, thus preventing a power flow to the ejector solenoid.

o When we combine all the ON/OFF signals in a particular order we are in fact creating logic.

o The logic section makes decisions and directs the flow of power to the various parts of a system. It is in fact a pure switching operation.

o All the sequences of switching, even in a relatively complicated process, can be set out in a ladder logic diagram.

o The diagram shows all the details of the logic circuit including what input and output devices are used, how they are identified and how they are inter connected.

Page 18: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 15

Above is a typical ladder logic diagram -in fact it is the one which will eventually complete our block sorting model. N.B.: CR1 in this example has 4 sets of contacts, and CR2, 2 sets.

NOW VIEW THE VIDEO PLC-1 TO REVIEW NO. 3.

Page 19: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 16

PLC-1: SELF TEST EXERCISE NO. 3 INSTRUCTIONS

o Without the aid of your notes or other resources answer the questions below. o When completed, check your answers against your notes, the video or with your

Facilitators.

QUESTIONS YES NO

1. What, in basic terms, is logic (in terms of circuitry)? ANS: _________________________________________________ _____________________________________________________

2. What does a ladder logic diagram show us? ANS: _________________________________________________ _____________________________________________________ _____________________________________________________

3. On the block sorting machine there are two primary input sensors. Name the function of each: (i.e. what they signal to.) 1. _______________________________________________

_______________________________________________ 2. _______________________________________________

_______________________________________________

4. When a long block activates both sensors, which working device operates? ANS: ________________________________________________ _____________________________________________________

Page 20: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 17

5. Why does the counter not operate when a long block passes the sensors? ANS: _________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________

Page 21: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 18

RESOURCE NOTES PART 4 INTRODUCTION

o In this part of the programme you will be introduced to typical Programmable Logic Controllers.

o You will see the similarities and the differences between PLC's and relay-logic control.

o In essence a PLC replaces the old technology that required electromechanical controls such as relays, counters, timers etc.

o What has remained from the old technology is the language (or terminology) which as you'll see has become incorporated into new technology.

o If you have no difficulty following relay logic diagrams (as described in part 3) you should have no problem as we move on to describe PLC ladder logic diagrams, which is what we shall lead up during the next programme.

BASIC FUNCTIONS OF PLCs' As a key it will help for you to remember that all PLCs' function as follows:

Inputs received from signals generated from the sensing devices are processed into decisions by the PLC. The decisions are communicated from the PLC to various (one or many) working devices. It must be understood that a PLC is really only an intelligence that has been programmed to receive inputs - decide what to do with them - and activate outputs. The input devices and the working devices remain exactly the same in a PLC managed system. All PLCs' contain electronic logic circuits that replicate the action of relays, counters and timers. Manipulation of the logics is called programming and this is achieved by the user programme.

Page 22: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 19

It consists of 3 main sections, namely: 1. Input circuits / modules. 2. A Central Processing Unit (CPU), and 3. Output circuits / modules.

Within the input section, a signal in the form of a voltage is received from the system's sensing device.

o This input voltage may be too high to be used by the processing unit, so the input circuit / module isolates and conditions the incoming voltage to the necessary low voltage required by the processor.

o Similarly the output circuit / module, receiving a low voltage signal from the processor, provide an isolated interface between the CPU and the working devices.

As sensors (inputs) and working devices (outputs) may operate on varying voltages, the I / O's of the PLC unit must be matched to the specific application. Here is a typical example of an input / output isolating circuit (one channel shown).

Within the CPU (Central Processing Unit) things become rather more complex, and at this stage of our learning we do not really have to fully understand how the processor operates. What is important is that you see the CPU as a computer (because that is exactly what it is). The CPU like any computer reacts to information given to it. The information is given via a software-programme designed especially for PLC's by programming experts. We simply have to know how to use the programme via a conventional personal computer (PC) keyboard or hand held programmer, in order to set the parameters of the system process being controlled. We begin to do this in the next programme.

NOW VIEW THE VIDEO TO THE END (PLC1) AFTER WHICH PLEASE ATTEMPT SELF TEST EXERCICE NO. 4.

Page 23: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 20

PLC-1: SELF TEST EXERCISE NO. 4 INSTRUCTIONS

o Without the aid of your notes or other resources answer the questions below. o When completed, check your answers against your notes, the video or with your

Facilitator.

QUESTIONS YES NO

1. For what reason do we not connect the lower limit-switch (short block counter) directly to the counter? ANS: _________________________________________________ _____________________________________________________

2. Through which relay contacts do we connect the counter circuit? ANS: _________________________________________________

3. Explain, using a diagram and explanation, how the counter is not activated when a long block passes the two sensors.

DIAGRAM: EXPLANATION: ___________________________________________________________ ___________________________________________________________ ___________________________________________________________ ___________________________________________________________ ___________________________________________________________

Page 24: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 21

PROGRAMMABLE LOGIC CONTROLLER PROGRAMME 2: RELAY LOGIC DEVICES & LADDER DIAGRAMS

OBJECTIVE When you have completed this programme which has been sub divided into three parts, you will be able to:

o Identify typical symbols in relay ladder logic diagrams. o Identify typical input, logic and output devices. o Describe typical circuit operation from a ladder logic diagram.

PROCEDURE

o Read the Resource Notes for each section. o View the relevant section of the video (as given in the Resource Notes). o Complete each Self Check exercise which follows the Resource Notes.

RESOURCES REQUIRED The primary resources required for this programme:

o Your Workbook. o Tech AV Video programme PLC-2.

Page 25: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 22

RESOURCE NOTES: CONTROL DEVICES AND LADDER LOGIC INTRODUCTION

o In this first part of programme No.2 we are going to take a look at control devices and learn how they are represented using conventional ladder logic diagrams.

o A ladder logic diagram is the plan upon which all circuits and devices are depicted in their sequential or logical order.

o In fact we are going to begin with what is known generally as Relay logic which forms the basis of understanding PLC logic.

o Once more we shall be featuring our evolutionary block sorting machine and, with its ladder logic diagram, we shall learn how it can be connected via various contacts to perform its functions in a logical sequence.

LADDER DIAGRAMS So called because the diagram resembles a ladder. The rails of the ladder represent power rails and a potential difference (voltage) exists between them. The rungs of the ladder represent device circuits. Power for each rung (circuit) is considered to flow from the left rail across a rung to the right rail.

o It must always be understood that a ladder diagram is purely symbolic. A symbolic diagram is just a method of setting circuits out simply, so that we (and computers) will be able to follow a logical pattern / sequence.

o In an attempt to further simplify things, electrical engineers use the minimum amount of symbols to represent various devices, in fact as far as they are concerned,

Page 26: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 23

relay logic comprises purely of contacts and coils, represented in their inactive states.

o Typically a few rungs of a control circuit might look something like this: (in relay logic)

o The contacts could represent switches, relay contacts or any type of N/O (normally open) or N/C (normally closed) control device. A coil can represent any electrical consumer or output device, such as a motor, a contractor, a lamp or whatsoever. Certain abbreviations will normally be used to describe a device where applicable.

o A glossary of typical symbols and abbreviations relevant to relay logic appears on the following page. Please study these as you will often require this information.

NOW VIEW THE VIDEO TO REVIEW NO. 1 (PLC-2).

Page 27: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 24

GLOSSARY OF BASIC ELECTRICAL SYMBOLS

Page 28: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 25

PLC-2: SELF TEST EXERCISE NO. 1 INSTRUCTIONS

o Without consulting the Resource Notes, or the video, answer the questions below. o When completed check your answers.

QUESTIONS YES NO

1. What do the rungs of a ladder logic diagram represent? ANS: ________________________________________________ _____________________________________________________

2. What do the rails of a ladder logic diagram represent? ANS: _________________________________________________ _____________________________________________________

3. What is the primary purpose of setting out an automatic process system in ladder form? ANS: _________________________________________________ _____________________________________________________ _____________________________________________________

4. What are the most basic symbols used on a typical relay logic diagram? ANS: _________________________________________________ _____________________________________________________

5. In what state are all devices represented on a diagram? ANS: _________________________________________________ _____________________________________________________

Page 29: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 26

RESOURCE NOTES: CONTROL DEVICES AND LADDER LOGIC INTRODUCTION

o Understanding (i.e. being able to read) a ladder diagram is dependent upon your ability to identify circuits and the various devices utilised.

o As an introduction, you should become familiar with those devices most commonly used in relay controlled systems.

o For purposes of explanation, we have classified them into -input, output and logic devices.

INPUT DEVICES (DIGITAL ON/OFF)

The devices so far mentioned are classified (generally) as discrete or digital or two state devices. They cause a definite ON, or an OFF, only condition.

Page 30: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 27

Another class of input devices is the analogue transducer. This type sends a varying (voltage) signal to the controller. Typical analogue devices are as follows: INPUT DEVICES (ANALOGUE)

OUTPUT DEVICES The most usual output devices are two state (on or off) and they include:

Page 31: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 28

There are other output types but these require complicated explanation (e.g. analogue driven digital display units). Let us move on to typical: LOGIC DEVICES The most basic of all relay logic devices is, naturally, the RELAY, or more technically the electromechanical relay.

o The primary portion of a relay is its energising element which is its magnetic coil. o The armature is coupled to the contacts via a mechanical link. This link carries the

common contact. This contact makes with, or breaks from, the line contacts when the coil is energised (signalled).

o In relay logic the coil is usually represented as a circle and it is situated on the right hand side of the rung.

NB: It is the state of the relays contacts that determine the logic. A relay may carry just a

single set of contacts or multiple sets of normally open (n/o) and normally closed (n/c) contacts.

Page 32: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 29

For purposes of demonstration the relay logic that we shall be using in our block sorting machine is a triple pole, double throw type. Each set of contacts (three sets) can be wired either N/O or N/C. When the relay coil is energised the contacts will change to their ACTIVE state i.e., N/O contacts will close and N/C contacts will open. In this manner we will be able to control three independent circuits simply by activating or de-activating a single coil. In relay-ladder convention a relay is symbolised in the following manner and is placed on the right hand end of the rung. 1. The coil section Contacts are placed at the left hand side of the rung and are labelled 1 CR indicating that they belong to the coil (relay) CR1. Although the contacts may appear anywhere on the ladder· we simply have to associate them to their operating device (i.e. the relevant coil). 2. The contacts Another important type of relay is the Latching relay or Ratchet relay. Whereas a conventional relay will release (i.e. return to its inactive state) when the coil voltage is interrupted (switched off), the contacts on a Latching Relay will retain their current state when the coil has been energised, even momentarily. When signalled again· the contacts will revert back to their opposite state. Modern latching relays utilise a mechanical "over lock" system, often in the form of a pawl and ratchet.

Page 33: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 30

The moving contact is biased (by a spring-lever) to maintain contact with either of the fixed contacts. When the coil energises the pawl lever is attracted to the coil. The movement causes the pawl to rotate the ratchet wheel. The ratchet wheel pushes the moving contact spring arm. This action causes the switching action to take place. The contacts will remain in a particular state as long as the moving contact arm rests upon the high portion of the cam. TIMERS

The next important logic device we need to become familiar with is a Timer. Again there are various types (designs) but in effect all achieve a similar result. The purpose of a timer is to signal a change in state of a power flow once a pre-set time delay / cycle has expired. A typical electronic timer device is illustrated to the left.

The delay time is generally set manually and is entered using the dial on the front panel. Timer action (runtime) is then electromechanical or electronic. When the timer reaches its pre-set delay (times out) its internal relay contacts change-state (i.e. N/C will open and N/O will close). The contacts will remain in their active state until the power to the timer is interrupted. At this moment the timer will reset in readiness for another timing cycle. Delay time is typically from less than a second to hundreds of seconds depending on the setting.

Page 34: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 31

COUNTERS Most commonly you will come across an electromechanical or electronic counter device in a relay logic circuit. In our block sorting system we have installed an electrically operated counter featuring a digital display. In essence a counter operates in similar fashion to a timer.

The operator dials in a desired number (e.g. 10) which is the pre-set value. Each time the counter receives a voltage signal (count instruction) at its input circuit, the display advances by one digit. After ten (by example) signals have been received, the display tallies with the pre-set value and the counters internal contacts (logic contacts) change state causing an output signal to activate the next sequence (e.g. to activate another device). The counter's internal relay contacts will remain in their active state until the counters power supply is interrupted, at which time the display will reset to zero and the output contacts will revert to their inactive state.

NOW WATCH VIDEO PLC2 UP TO REVIEW BREAK NO. 2.

Page 35: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 32

PLC-2: SELF TEST EXERCISE NO. 2 INSTRUCTIONS

o Without consulting the Resource notes or the video, answer the questions below. o When completed check your answers.

QUESTIONS YES NO

1. What, in basic terms, is a discreet device? ANS: _________________________________________________ _____________________________________________________

2. What, in basic terms, is an analogue device? ANS: _________________________________________________ _____________________________________________________ _____________________________________________________

3. List 3 typical discrete sensor devices. a) _______________________________________________ b) _______________________________________________ c) _______________________________________________

4. List 2 typical analogue sensor devices. a) _______________________________________________ b) _______________________________________________

5. What is the most fundamental device used in relay logic control circuits? ANS: _________________________________________________ _____________________________________________________

6. Which part of a relay is represented with a circle? ANS: _________________________________________________ _____________________________________________________

7. What feature of a relay determines the "logic"? ANS: _________________________________________________ _____________________________________________________

Page 36: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 33

8. When a relay's coil is energised, what state do the associated contacts change to? ANS: _________________________________________________

9. How do we associate (link) the relays contacts on a ladder diagram? ANS: _________________________________________________ _____________________________________________________

10. What type of electro-mechanical device will retain a circuit, even if the system is de-energised? ANS: _________________________________________________ _____________________________________________________

11. A timer will "time out" causing its internal contacts to do what? ANS: _________________________________________________ _____________________________________________________

12. An electrical timer or counter will reset only when what happens? ANS: _________________________________________________ _____________________________________________________

Page 37: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 34

RESOURCE NOTES: RELAY LADDER LOGIC DIAGRAMS INTRODUCTION

o In this section we will concentrate upon the creation and interpretation of a typical relay logic ladder diagram.

o We shall introduce you to an industry acceptable method of ladder diagram layout and to the way in which an electrician would be able to affect the wiring.

o Always remember that relay circuits are physical circuits which are connected physically with real conductors. We call a relay circuit a "hardwired" circuit, whereas, as you'll discover in programme 3, a PLC circuit is a virtual or "soft wired" circuit.

o The reason that we are putting you through all this background is to help You in understanding that PLC circuits evolved through relay logic, and that You are probably familiar with hard wired circuits already.

o We begin now with a fairly basic situation where we want to set up a circuit which will control a motor by having it start, run for a period of time and then switch off. Such a circuit is shown in the next illustration.

LADDER DIAGRAM (for our desired circuit)

Page 38: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 35

Let us examine our diagram in detail:

1. Notice that there are only 3 rungs which are referenced (numbered) on the left of the diagram.

2. On the right side of the diagram there is detail pertaining to the description and function of a device (we'll come back to these).

3. Rung No.1 consists of a normally open push button switch (1 PB), this is our start switch. Next on the same rung is a normally closed push button switch (2PB), this is

the stop switch. On the right side of the rung is a coil symbol which represents our motor

control relay. The reference to motor exists outside the right rail.

4. Rung No.2 (which technically is a branch of rung No.1) comprises the normally open contacts (M1) of coil 1 M and a normally closed delay on contact (TMR1) associated with the timer (1TMR). Rung 2 is in fact known as a retain or "latching" circuit" (we'll explain this shortly).

5. Rung NO.3 begins with the N/O contacts (M1) of the motor control relay, because the label (M1) tells us this. The next device is the timer unit. Outside of the NO.3 rung we see the reference to the timer.

o Let us go back to the MOTOR reference -underneath this reference we see the numbers 2,3. These numbers refer to the rungs on the diagram which contain any contacts that are controlled by the control relay 1 M.

o If we look at the TIMER reference we see the number 2 which is underlined (6). What this says is that the timer's relay contacts are part of the circuit on rung No.2 and that they are normally closed (N/C). If the number was not underlined -we would assume the timer relay contacts to be N/O.

OPERATION Let us now examine how the circuit operates, or if you prefer, let's trace the power flow along each rung.

Page 39: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 36

o The first rung is the start point and shows a series circuit. If we (the operator) activate 1 PB, power will flow via the contacts of 1 PB (now closed) through the N/C contacts of 2PB and to the motor relay coil (1 M). We call this circuit an AND circuit since both the start switch AND the stop switch must be closed for power to flow from the left rail to the right rail. Power flow would cease if either switch were to open. However on this rung all that we will cause to happen will be to energise the coil of the motor control relay.

o Rung two contains the latching or retain circuit for the motor relay. The motor relay contact 1 M is wired in series with the relay contacts of a timer. At this time we need to offer some explanation about a latching circuit.

o Assume that we had just one series circuit, as in rung No.1:

If we pressed 1 PB (i.e. closed those contacts), power would flow from left to right because the circuit is now completed or closed. When we let go of 1 PB it will revert to its N/O state, and power will cease to flow. The motor relay would therefore de-energise (drop out). Now it would be really stupid for an operator to have to keep his finger on the start button in order to keep the motor running! So we need to latch the circuit in order to keep the power flowing even when 1 PB reverts to its inactive state (N/O). To do this we connect one set of the relay's contacts in parallel with the start switch, in effect like this:

Now what will happen?

1. Power will flow initially, as before, in rung 1 when the operator pushes 1 PB. 2. The N/O motor relay contacts 1 M will change state and close passing power to rung

1. 3. Upon release of 1 PB, power will continue to flow along rung1 to the relay via the

branch rung 2.

Page 40: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 37

4. Power flow will be interrupted only if 2PB is pressed (stop button). Coil M1 will de-energise and contact 1 M will revert to its N/O state, interrupting the power flow in the retain circuit.

N.B.: Rung No.2 in our diagram is called an OR circuit since the power flow to the motor control relay (on rung 1) is true when the contacts (1 PB) on rung 1 OR the contacts (1 M) on rung 2 are closed.

o Let’s get back to our diagram. We have included a timer which requires a little explanation.

o The timer itself receives its power (operating power) via rung No.3, but only when relay contact 1M is closed. You’ve probably noticed that these contacts are associated with the coil M1 on rung 1.

o The timer’s relay contacts have been placed on rung 2 and are specified normally closed. The symbol used is known as a “delay off” symbol, which simply means that the contacts (which form part of the retain circuit) will remain closed until a pre-set delay or time has elapsed, at which moment they will be caused to open.

o When the timer relay activates (or times out), the retain circuit is interrupted and, as if pressing 2PB, the motor will stop.

o As the power flow ceases in all branches (because the motor relay contacts have returned to their inactive or normally open position), the power to the timer will be interrupted and the timer will reset in readiness for the next timing cycle.

o The system can only be started via 1PB, but now as You can see, it can be stopped by the operation of either 2PB of TMR1.

CONCLUSION For purposes of our requirements we really need go no further, in relay logic. Once you have grasped these principles you will be ready to move on to PLC fundamentals.

NOW VIEW THE VIDEO PLC 2 UP TO THE END.

Page 41: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 38

PLC-2: SELF TEST EXERCISE NO. 3 INSTRUCTIONS

o Without consulting the Resource notes or the video, answer the questions below. o When completed check your answers.

QUESTIONS YES NO

1. In the space below sketch a relay ladder circuit to satisfy the following conditions: A base motor circuit with:

o Stop and Start control. o Retain control. o Timer control.

DIAGRAM:

Page 42: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 39

2. In Your own words explain the operation or power flow through rung No.1. (Refer to Your diagram) ANS: _________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________

3. In Your own words explain how the "latching" circuit operates. ANS: _________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________

4. In your own words explain how the timer circuit controls the motor, i.e. how it stops the motor. ANS: _________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________ _____________________________________________________

Page 43: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 40

PROGRAMMABLE LOGIC CONTROLLER PROGRAMME 3: HARDWARE AND LADDER LOGIC

OBJECTIVE When you have completed this programme which has been sub divided into three parts, you will be able to:

o Describe the purpose and function of I/O's. o Decipher address locations and devices involved in PLC ladder logic diagrams. o Describe how a CPU processes input signals to control the state of outputs.

PROCEDURE

o Read the Resource notes for each section. o View the relevant section of the video (PLC-3). o Complete the self-check exercise which follows the Resource notes.

RESOURCES REQUIRED The resources for this programme are:

o Your workbook. o Tech A.V. video programme No. PLC-3.

Page 44: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 41

RESOURCE NOTES: HARDWARE AND LADDER LOGIC INTRODUCTION

o In the previous programme we built up our basic understanding of relay controlled systems and their associated logic diagrams.

o We identified various (typical) input devices and saw how they gather information (i.e. how they were activated).

o We then identified digital and analogue devices, and learnt how the type of information (signal) that each sends differs.

o We overviewed output devices and saw that they are always (basic) two state devices that receive either yes or no messages from the logic circuit.

o We finally examined the operation of three important logic devices namely a relay, a timer and a counter. Using the relay ladder logic diagram we explained how input, output and logic devices are combined to create an automatic control system.

o We shall now begin to look at PLC controlled systems, armed with an understanding of relay logic.

INPUT AND OUTPUT PROCESSING

o As we work through the various stages of PLC processes, it always helps if we can remember certain keys. One important key is to remember that in PLC systems, input devices and output devices remain as we always knew them - they are the same as in Relay logic.

o Input devices send electrical signals (voltage) to the PLC via its input interface. o Output devices receive electrical signals from the PLC via an output interface. o Input and Output interfaces are generally referred to as I/Os'. o I/O’s may be fixed or integral with (built into) the PLC unit. o Some I/Os' are modular (separate), but are connected via plug-in connectors to the

PLC unit.

o Voltages, arriving as input signals to the Input interface, are sometimes too high to be fed directly into the Processing unit, which has its own internal power supply, typically 5 volts.

Page 45: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 42

o Contained within an I/O interface (or module) will be an isolation and conditioning (op to coupled) circuit which effectively prevents the voltages from external devices entering the CPU (Central Processor).

Typical input interface circuit (one channel shown).

o Likewise, output signals from the PLC are buffered via relays which isolate the

processor from the working devices. Typical output interface circuit (one channel shown).

o External devices are connected physically to terminal blocks. Inputs are connected to the Input interface and Outputs to the output interface.

o Every terminal is clearly marked with its own unique reference. We call these references the address locations.

NOTE: Various methods of identifying address locations are used by different manufacturers. You will usually have to refer to the PLC manufacturers data to identify their particular address notations.

Page 46: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 43

o By example, one major manufacturer uses:

'X' to denote an input address (e.g. X0 to X7). 'Y' to denote an output address (e. g. Y0 to Y7).

o In schematic form the input connections to a PLC are usually arranged with one

input terminal allocated for each external device. A common return line completes each input circuit. (See diagram below).

o In similar fashion we would connect the working devices to their individual address locations so that the processor knows where to direct its output signals.

o Apart from the physical connection of external devices, to their respective address locations, there will be no further hard wiring necessary.

NOW VIEW THE VIDEO (PLC-3) UP TO REVIEW NO. 1.

Page 47: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 44

PLC-3: SELF TEST EXERCISE NO. 1 INSTRUCTIONS

o Without consulting your notes or the video answer the questions that follow. o When completed check your answers.

QUESTIONS YES NO

1. What is the term we use to refer to the input and output interfaces on a PLC unit? ANS: _________________________________________________ _____________________________________________________

2. What prevents external input signal voltage from entering the Processor circuits? ANS: _________________________________________________ _____________________________________________________

3. What do we call the references that are marked at each PLC input or output point? ANS: _________________________________________________ _____________________________________________________

4. What devices are usually connected to the inputs? ANS: _________________________________________________ _____________________________________________________

5. What devices are typically connected to the outputs? ANS: _________________________________________________ _____________________________________________________

Page 48: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 45

RESOURCE NOTES: HARDWARE AND LADDER LOGIC INTRODUCTION

o In this part of the programme we shall learn how to identify the various symbols and notations used in PLC ladder logic diagrams.

o Although we have now become familiar with Relay symbols and notations you will now find yourself, in Programmable Logic Control, having to think differently. It actually helps to try and imagine that you are the PLC's brain and you will be examining all the information given to you in terms of how you see the various circuits.

PLC LADDER LOGIC DIAGRAMS

o One of the noticeable differences between Relay and PLC diagrams is that devices are no longer identified for what they are. For example a PB (push button switch) is now a simple contact upon which the address location is noted e.g.

o The address location defines the exact I/O connection point. No two I/O address locations can share the same identity.

o Under PLC control we can arrange for any input to switch any output and the great advantage is that we can do this without any physical wiring between connections!

o The creation of a PLCladder diagram is made with a special software package via a personal computer (PC) or a hand held programmer. The PLC software programme has been specially written to enable us to easily access any contacts or coils anywhere in a circuit.

o Contacts may feature several times, on various rungs, depending on the system requirements. This is only possible owing to the fact that each input and output has its own address location.

o Inputs may often be combined, in series and / or parallel, to activate any combination of outputs. All that the operator has to do is select the appropriate input or output device and place it into the relevant circuit.

o The composition of a PLC ladder diagram generally conforms to certain conventions -although programmes will vary in style amongst manufacturers, all however tend to do the following: Use contact symbols as input devices.

Use coil symbols as output devices.

Write the address location for each device above or beneath

that device.

Page 49: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 46

Let us study the PLC ladder diagram of our block sorting machine: o You will notice that all input address locations are prefixed by the letter X (this is

dictated by the manufacturer). o All the inputs marked X have the input (circuit) terminal number following the X. For

example X1 relates to the input signal arriving at X1. o Similarly output addresses are prefixed with the letter Y in our example. The

numeral provides the reference to output address location. o What are all the input devices on the block sorting machine, and to what addresses

have they been assigned? Let’s itemise them. X0 is the start button. X1 is the stop button. X2 is the upper limit switch. X3 is the lower limit switch.

o Let’s now itemise the output devices and their addresses. Y0 is the conveyors motor. Y1 is the run lamp (indicator lamp). Y2 is the solenoid valve (ejector). Y3 is an alarm buzzer. Y4 is the stop lamp.

o In our example, using a particular programme we can also label each device on screen. This is purely a convenience for us. As far as the PLC is concerned it does not need to know the name or type of device. It is purely interested in:

The address location to which each device is connected, and What to do with ON/OFF signals appearing at these input points.

NOW VIEW THE VIDEO PLC-3 UP TO REVIEW NO. 2.

Page 50: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 47

PLC-3: SELF TEST EXERCISE NO. 2 INTRODUCTION

o Without consulting your resource notes or video, answer the following questions. o Check your answers when completed.

QUESTIONS YES NO

1. In a PLC ladder logic diagram what symbols are used to denote the following: a) an input device: _____________________________________ b) an output device: ___________________________________

2. What information is always provided, on a ladder diagram, along with a symbol? ANS: _________________________________________________ _____________________________________________________

3. As far as a Processor is concerned it needs only know two details, which are? a) _______________________________________________ b) _______________________________________________

Page 51: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 48

RESOURCE NOTES: HARDWARE AND LADDER LOGIC INTRODUCTION

o In order to understand how PLC ladder logic functions, we must first learn to describe how a PLC processes the ON/OFF input signal.

o Once this has been achieved we need to know in effect how the PLC uses this information to control the state of the outputs.

o In this section of the programme we shall explain these important functions. INPUT SIGNAL PROCESSING

o It is now necessary for you to use some basic imagination because from this point on we shall be describing virtual processes, so let us begin by imagining that at each input connection is a tiny virtual control relay. The relay is, in essence, a single throw double pole device featuring both N/O and N/C contacts. The CPU (Central Processing Unit) does exactly this -it recognises the input as relay contacts.

o The CPU sees the relay as part of a circuit, just as if it were a typical hard wired relay circuit.

o If the lamp is connected through the relay's N/O contacts then it will only light up when the relay's coil is energised, causing the contacts to change state.

o The coil will only energise when it receives a YES or ON voltage signal via the external switch. (See illustration).

o Conversely, if we now connect the lamp circuit through the N/C contacts, then the lamp will light up (circuit is complete) when the relay coil receives a NO or OFF voltage signal. Then when the relay receives a YES or ON voltage signal, the coil will activate, causing the N/C contacts to change state (i.e. open) and the lamp circuit will be interrupted, causing the lamp to switch off.

Page 52: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 49

o In the PLC virtual environment – the imagery relay responds just like a physical relay. o When, for example, we place a normally open contact onto a rung (in the logic), the

processor will see it as an instruction to activate an output device when a YES or ON voltage signal is present at the input address.

o The opposite is also true – when we place a normally closed contact onto a rung, the processor sees it as an instruction to activate an output device when a NO or OFF voltage signal is present at the input address.

This is rather confusing to our minds, unless we try to think like a PLC! What, in essence, the processor is doing is this:

o It looks at each instruction in terms of the symbol it sees. o When it sees a normally open (N/O) ―‖― contact symbol, it interprets this as an

instruction to pass a signal to the output device, when an ON voltage signal is present at the input. In other words it interprets what an N/O contact does in its active state (i.e. it will close and pass power).

o In practical terms the processor examines the input location to see if a voltage signal is present, and, if it sees/finds that signal, it will pass power along the rung to the output device. We call this an examine ON circuit, because the processor is looking for an ON voltage signal at the input address location (X0).

o In the example below, we see a simple PLCcircuit which the operator entered via his user programme. The circuit simply controls a motor via a start switch.

Circuit Explanation: When the operator activates the start-switch, an ON voltage signal will appear at input location X0 (to which the start switch is connected). The programme will examine input location X0 for an on voltage signal, and, when it finds it there, will pass power along the rung to output coil Y0, which will in turn run the motor. The motor however will not run unless it finds the ON condition it is looking for.

Conversely, when we enter a normally closed contact into the logic, the controller sees this as an instruction to examine the input location (X0) for an offvoltagesignal, and, if it finds this condition, to pass power along the rung to the output device. In our example then, the motor will run until the start switch (X0) is activated or closed. We call this an examine off circuit, because the processor is looking for an OFF voltage signal at the input address location X0.

Page 53: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 50

o Therefore a circuit, in PLC logic, will only pass power along the rung to an output device when all the required (programmed) conditions are met. The rung is then said to be TRUE.

o In the example below, let us examine a typical series circuit (also called an AND circuit), featuring a combination of examine on and examine off contacts.

On the above rung X0 = Start switch.

X2 = Safety switch. Y0 = Output coil (motor).

If the rung is true - the motor will run. What instructions are being given to the processor? EXPLANATION

1. The processor examines X0 (start switch) for an ON voltage signal, and, since the start switch has not yet been activated, it does not find the condition it is looking for. There is no power flow across the rung.

2. The processor then examines X2 (safety switch) for an OFF voltage condition, (because that's the way we've programmed the logic), and it does not find it since our safety switch is wired normally closed -sending an ON voltage signal until activated.

3. Now the operator activates the start switch and an ON voltage signal appears at input X0. The processor now finds the condition it was programmed to look for (examine X0 for an ON condition), and power flows across the rung to X2.

4. Since the condition at X2 has not yet been satisfied, power will not reach the output coil, and the motor will not run.

Page 54: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 51

5. Now the operator activates the safety switch, causing an OFF voltage condition at input X2. The processor finds the condition it was looking for, (examine X2 for an OFF condition), and power passes across the rung, energising the output coil Y0.

6. Both conditions at X0 AND X2 are fulfilled, the rung is true and the motor runs.

CONCLUSION That is how the PLC combines ON and OFF signals from various devices, and decides whether or not to pass power to output devices.

NOW VIEW THE VIDEO PLC-3 UP TO THE END.

Page 55: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 52

PLC-3: SELF TEST EXERCISE NO. 3 INSTRUCTIONS

o Without consulting your notes, or the video, answer the following questions. o Check your answers when completed.

QUESTIONS YES NO

1. How does the Central Processing Unit of a PLC see an input location? ANS: _________________________________________________ _____________________________________________________

2. How does the CPU see a contact symbol entered in the user programme? ANS: _________________________________________________ _____________________________________________________ _____________________________________________________

3. How does the CPU interpret this symbol? ANS: _________________________________________________ _____________________________________________________

4. How does the CPU interpret this symbol? ANS: _________________________________________________ _____________________________________________________

5. Where does the CPU look for voltage signals? ANS: _________________________________________________ _____________________________________________________

6. If the CPU finds a voltage or an ON signal at an address location, what does it do in respect of the contact entered in the user programme? ANS: _________________________________________________ _____________________________________________________

Page 56: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 53

7. If the CPU finds an ON voltage signal at the address location where N/O contacts are programmed into the logic, it will? (tick correct answer) a) Pass power in the rung. b) Interrupt power in the rung.

8. If the CPU finds an ON voltage signal at the address location where a set of N/C contacts have been specified, it will? (tick correct answer) a) Pass over the rung. b) Not pass over the rung.

9. If the CPU finds an OFF (NO) voltage signal at the address location where N/C contacts have been entered into the logic, it will? (tick correct answer) a) Pass power in the rung. b) Not pass power in the rung.

10. If the CPU finds an OFF (NO) voltage signal at the address location where N/O contacts have been entered into the logic, it will? (tick correct answer) a) Pass power in the rung. b) Not pass power in the rung.

11. In your own words describe what is meant when we say a circuit is true. ANS: _________________________________________________ _____________________________________________________ _____________________________________________________

Page 57: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 54

PROGRAMMABLE LOGIC CONTROLLER PROGRAMME 4: A SPECIALISED COMPUTER

OBJECTIVE When you have completed this programme which has been sub divided into three parts, you will be able to:

o Describe how the PLC processes information by a process called SCAN, and describe the basic operation of the CPU and its memory circuits.

o Describe the internal logic devices that exist in the virtual world of the PLC. o Explain the operation of a contacts, coils, timers and counters that appear in a

typical PLCladder logic diagram. PROCEDURE

o Read the Resource notes for each section. o View the relevant section of the video (PLC-4). o Complete the self-check exercise which follows the Resource notes.

RESOURCES REQUIRED The resources for this programme are:

o Your workbook. o Tech A.V. video programme PLC-4.

Page 58: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 55

RESOURCE NOTES: THE PLC AS AN INFORMATION PROCESSOR INTRODUCTION

o This module follows on from Programme NO.3 and provides you with an understanding of how a PLC operates from the PLC's point of view.

o You will recall that a PLC communicates with external devices via an input interface and an output interface.

o We saw how the user programme is displayed in the form of a ladder logic diagram featuring symbolic notation and I/O addresses that the PLC understands and responds to.

o Next, we learnt that a PLC responds to an input signal in the form of an ON or OFF voltage as it examines the input address location for the condition specified by the "instruction" given by the contact symbol entered on the ladder rung.

o Now we will discuss how the PLC processes the information that it receives from the external input devices.

HOW THE PLC PROCESSES INFORMATION

o In essence, a PLC is a solid state device meaning that it has no moving parts. All processing is accomplished electronically via integrated electronic circuitry. Through this technology a PLCexamines and records the state of each input, then decides what the state of a particular output should be by following the user programme, then activates the specified output / outputs.

o The heart of a PLC is the Central Processing Unit or CPU. o Typically a CPU has three main sections, namely:

Processor. Memory. Power supply.

Page 59: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 56

o The power supply is simply an electronic device, which converts the incoming AC voltage to a low voltage DC supply, typically 5 and 12 volts.

o The processor is the part that does the “thinking” and “calculating”. It is here that the PLC carries out the instructions at the request of the user-programme.

o On a regular basis the processor does the following: Checks the state of the inputs. Solves the user programme. Sets the state of the outputs.

o It performs the above cycle on a continuous basis several times every second. We call this process SCAN.

o The memory section is required for storing instructions and data. o There are two kinds of memory within the central processing unit namely:

1. System memory called ROM, and 2. Application memory called RAM.

o In effect the system memory contains all the information required to activate the processor and the processor can do nothing until it receives instructions from the system memory.

o We refer to the system memory as ROM or read-only-memory, since the processors “reads-only” the information contained in this memory.

o Let’s look at application memory called Random-Access-Memory(RAM). Information stored in RAM concerns the input, output and logic processing used when the PLC executes the ladder logic instructions specified by the user-programme.

o The random access memory can be “read from” and “written to” by the processor during programme execution.

Page 60: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 57

HOW MEMORY FUNCTIONS

o Memory is most commonly found within "integrated circuits" or "microchips". o Encapsulated within the integrated circuit (IC) is thousands of minute electronic

devices and circuits. These are arranged to form a matrix of memory cells.

o Each memory cell is in effect a miniature two state switch that can be turned on or off by an external control signal.

o Similar in effect to a latching relay, each memory cell will remain in a particular state (on or off) until it is instructed to change to the opposite state.

o The system memory arranges the memory cells into groups of, typically, 16 cells, and a group of cells called a register.

o Each register has a specific address so that the processor knows where to find it, and each register contains a particular piece of information which the processor can use during a scan cycle.

Page 61: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 58

o The information stored in a register depends on the state of each tiny switch (memory cell) in the register.

o Registers are used to store input and output conditions as well as data e.g. when the processor must perform a mathematical calculation, it does so by manipulating the data stored in different registers assigned for data handling.

o The "switches" we have used to help us understand the way a memory circuit functions, are in fact binary digits or bits (Binary digits), and each bit will have a value of either zero (0) or one (1).

o A group of bits (16) is called a WORD which is the fundamental unit of information used in most computer systems.

NOW WATCH THE VIDEO PLC4 UP TO REVIEW BREAK NO. 2.

Page 62: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 59

PLC-4: SELF TEST EXERCISE NO. 1 INTRODUCTION

o Without consulting your resource notes or video, answer the following questions. o Check your answers when completed.

QUESTIONS YES NO

1. Name the three main sections of a CPU. a) _______________________________________________ b) _______________________________________________ c) _______________________________________________

2. What is the function of the processor? ANS: _________________________________________________ _____________________________________________________

3. Name the three things a processor does during a scan cycle. a) _______________________________________________ b) _______________________________________________ c) _______________________________________________

4. What are the two main functions of the memory section? a) _______________________________________________ b) _______________________________________________

5. Name the two kinds of memory in the CPU a) _______________________________________________ b) _______________________________________________

6. What is the function of the ROM? ANS: _________________________________________________ _____________________________________________________

7. What is the function of the RAM? ANS: _________________________________________________ _____________________________________________________ _____________________________________________________

Page 63: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 60

8. The system memory arranges the memory cells into groups of cells. How many cells are usually found in a group, and what do we call this group of cells? a) _______________________________________________ b) ________________________________________________

9. Why does a register need to have a specific address? ANS: _________________________________________________ _____________________________________________________

10. A binary digit or bit can have either one of two values. Name them: ANS: _________________________________________________

11. Name the fundamental unit of information used in most computer systems. ANS: _________________________________________________

Page 64: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 61

RESOURCE NOTES: INTERNAL LOGIC DEVICES INTRODUCTION

o In this next section we will overview Internal Logic Devices, what they are and how they function in a typical PLC managed system.

o To appreciate how they work, it helps to see them from the PLC's point of view since they exist inside the PLC as virtual logic devices and are not part of the real world of electro-magnetic switching devices.

o Keep in mind however, that PLC logic is fashioned from relay logic so the same basic switching principles apply for PLC logic as they do for relay controlled logic.

INTERNAL LOGIC DEVICES EXPLAINED

o Let's look at the PLC ladder logic diagram of a block sorting machine. We have chosen this example since it will clearly explain the function of all the logic and switching circuits used in a typical PLC based control system. (Refer to diagram on facing page.)

o We begin with rung 1.

o Here we find a normally closed contact T1 and a coil designated CO. The contacts T1 represent the switching contacts associated with a timer which we have captioned the "end of cycle" timer.

o CO is in fact an internal relay since it controls power flow "within" the PLC. Both these devices are imaginary but they do exist and they do function according to the instructions entered into the PLC from the user programme.

o On rung 7 we see the end of cycle timer.

Page 65: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 62

o On rung 5, we find a counter CT1 and on rung 6, the contacts which are associated with this logic device. The counter, like the internal relay and timer, is imaginary but it does work, as we shall see later on in the explanation.

o Now we are ready to explain the operation of each rung of the diagram. We down-load the programme into the PLCand place it in the run mode.

o As previously explained, the PLCbegins its SCAN cycle and several times every second, it examines each rung updating the inputs, solving the logic and setting the state of the outputs.

o As the PLCscans the programme, it finds that contact C0 on rung 2 is normally closed, and since the internal relay C0 has not yet been energised, its contact remains closed passing power across the rung to an output coil Y4 turning on the stop indicator lamp.

o Notice that although C0 and Y4 have been entered into the logic as output coils, they each have a very specific function. C0 is not part of the real world, but Y 4 is able to communicate with the real world through the output interface (Y 4 is an output point on our PLC).

Page 66: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 63

o Now it’s time to run the block sorting machine, so we activate the start switch sending an ON voltage signal to input location X0.

o On its very next scan cycle, the PLC reads this condition into an input register and we call this process "updating the inputs".

o Returning to the ladder diagram, let's see what happens on rung 1. X0 has been entered into the logic as an EXAMINE ON contact, so the logic finds the condition it is looking for and power flows along the rung to X1.

o The stop switch (wired to input Xi) is also sending an ON voltage signal (we will return to this point later), so once again the logic is satisfied and power continues across the rung to timer contact T1.

o Since timer T1 is inactive, its normally closed contacts (T1) remain closed, and power finally reaches internal coil CO and it becomes energised.

o Inside a register, a bit changes state from a 0 to a 1, recording this event. o All the contacts associated with C0 now change to their active state (normally open

contacts will close and normally closed contacts will open). o Based on the user programme, the processor performs the necessary logic and

updates the outputs by sending the latest information to the output register. o The start switch is latched on, the stop lamp turns off and on rung 3, power flows to

output coils Y0 and Y1 activating the conveyor motor and the run indicator lamp.

o Before we leave rung 1, notice that the stop switch has been entered into the logic as an EXAMINE ON contact. This may appear confusing, but remember that the stop switch, in its de-activated state IS sending an ON voltage signal to input X1. The logic

Page 67: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 64

is therefore satisfied and power flows along the rung until such time as the stop switch is activated.

N.B.: As we explain the ladder logic diagram, it is important to remember that we use relay based terminology when describing the operation of the circuits because that is the way we understand power flow -however as far as the PLC is concerned, these contacts and coils are only symbols, but the PLC knows exactly what to do in the logic when it sees a particular type of symbol (as shown below).

MEANS EXAMINE THE INPUT FOR AN ON CONDITION AND IF THE CONDITION IS TRUE PASS POWER ALONG THE RUNG.

MEANS EXAMINE THE INPUT FOR AN OFF CONDITION AND IF THE CONDITION IS TRUE PASS POWER ALONG THE RUNG.

MEANS A RELAY COIL WITH NORMALLY OPEN AND NORMALLY CLOSED CONTACTS AS SPECIFIED IN THE USER PROGRAMME.

NOW VIEW THE VIDEO PLC-4 UP REVIEW BREAK NO. 2.

Page 68: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 65

PLC-4: SELF TEST EXERCISE NO. 2 INTRODUCTION

o Without consulting your resource notes or video, answer the following questions. o Check your answers when completed.

QUESTIONS YES NO

1. Name one important characteristic of internal logic devices ANS: _________________________________________________

2. Name three internal logic devices a) _______________________________________________ b) _______________________________________________ c) _______________________________________________

3. When a normally open contact is entered into the logic by the user programme, what is its function? ANS: _________________________________________________ _____________________________________________________

4. What is the function of a normally closed contact when written into the PLC programme? ANS: _________________________________________________ _____________________________________________________

5. What is the basic function of a coil? ANS: _________________________________________________ _____________________________________________________

Page 69: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 66

RESOURCE NOTES: THE PLC AS AN INFORMATION PROCESSOR INTRODUCTION

o In this section of the programme, we continue our discussions concerning the PLC as an information processor. Working our way, rung by rung, we will continue to evaluate each device specified on the ladder logic diagram and how it works to control the functions of the block sorting machine.

THE PLC LADDER LOGIC DIAGRAM EXPLAINED

o We are ready to explain the block sorting operation, so let's look at the logic necessary to reject the long blocks and count the short blocks.

o Each time a long block passes the sensors, it will activate both the upper limit switch X2, and then a moment later, the lower limit switch X3 (since they have been mechanically aligned this way).

o The processor during its scan cycle checks the state of the inputs and finds an ON voltage condition at inputs X2 and X3 and updates the input register with this information.

o With a Data Access Unit connected to the output port of the PLC, we can view the status of the input register as shown below. Reading the top line of the display from left to right, we can see the status of input address locations X0 through to X7. Xi, X2 and X3 are active (on).

Page 70: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 67

o Now on rung 4, X2 has been entered into the logic as an examine on contacts, so when the ON condition is found, power passes across the rung to output coil Y2 to which the ejector solenoid is connected.

o The output register is updated with the latest information, the solenoid valve is activated and the long block is ejected from the conveyor belt.

o At the same time down on rung 5, we find a contact Y2 which is activated when the coil Y2 is energised.

o In its normal or inactive state, the contact Y2 is closed, but when the coil Y2 is energised, it opens, interrupting the power flow along rung 5.

o This simply means that the block counter will not receive a count signal when the lower limit switch X3 is active, since we do not want to count the long blocks. N.B.: Although coil Y2 is required to activate the solenoid valve, it is a type of

internal relay just like the other internal logic devices and we can use its status to pass power to other circuits in the logic. All that is required is that we specify the correct address location when we enter the normally open or normally closed contact.

o Let's discuss what occurs when a short block is sensed. Because of its height, it will only activate the lower sensor sending an on voltage signal to input address location X3.

o The PLCrecords this event, and via the logic, power flows across the rung to counter CT1 and a count is recorded.

Page 71: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 68

N.B.: Since the short block cannot activate the upper limit switch, contacts Y2 remain in their inactive or normally closed position allowing power to pass from Y3 to the counter.

o Before we leave rung 5 (diagram below), you will notice that on lower part of rung 5, a connection is made to the counter via the "end of cycle" timer contact T1. This is the counter's reset line, and when the required number of blocks have been counted, and timer T1 has "timed out", these normally open contacts close, resetting the counter to zero.

o Let's move to rung 6 and examine the operation of the counter.

o We know that the counter must advance every time a short block actuates the lower limit switch and we require that 10 blocks must be counted before the machine stops. On rung 6 we find the logic that makes this happen.

o The contact you see is an "equal to" type and its function is to compare the status of two registers. In one register we tell the processor to store a constant (K10), and in the other register, store the actual count taking place as each short block is sensed. When the data stored in the one register is equal to the data stored in the other, this contact will close passing power along the rung, through the normally closed contact T1, to output coil Y3.

Page 72: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 69

o Once Y3 energises, the buzzer sounds since it is connected to the output point on the PLCaddressed as Y3.The contact Y3 on the lower part of rung 6 closes, latching the coil Y3, and the buzzer continues to sound until the "end of cycle" timer has timed out as we shall see later.

o Now we move to rung 7 to examine the operation of the timer T1. o Contact Y3 on rung 7 has now closed since coil Y3 is latched on (by contact Y3).

Power passes along the rung to timer T1 and the timer begins its timing cycle.

o The operation of a timer is similar to that of a counter since the processor will compare a pre-set value in one register to the actual elapsed time in another, and when the data stored in each register agrees, the timer's contacts will change over from their inactive to their active state.

o Now an important point to remember is that the timer is only operative as longas it receives a power signal via the contacts Y3. Should the power flow be interrupted, the timer will reset to zero. For this reason, we must latch the output coil Y3 since it supplies power to the timer.

o In this example we have loaded our timer with a value K30, which means that the "delay on" time will be exactly 3 seconds. Once the timer has reached this pre-set value, the sorting machine will stop. Let's see how this is achieved.

o On rung 1 we have a contact T1 which is normally closed (as discussed earlier). Now once the timer has completed its cycle, this contact opens, interrupting the flow of power on rung 1.

o Immediately, internal relay C0de-energises, and the retain circuit opens since contact C0 on rung 1 returns to its inactive state (open).

o On rung 3, contact C0 opens de-activating coils Y3 and Y4 which causes the conveY0r motor to stop and the run lamp to tum off.

o On rung 2, contact C0 returns to its inactive state (closed), and the stop light turns on.

Page 73: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 70

o At the same instant on rung 6, power flow to coil Y3 is interrupted as timer contact T1 moves to its active state and opens.

o CoilY3 de-energises and power to the timer is interrupted (contact Y3). The timer resets to zero ready to commence another cycle when the machine is again switched on.

o One final point to notice is the coil on rung 8 of the diagram. This is the END coil and is absolutely necessary since the processor knows that when it sees this symbol, it must return to rung 1 and begin the next scan cycle.

o This completes the resource notes for module 4 of the PLC series.

NOW VIEW THE VIDEO TO THE END.

Page 74: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 71

PLC-4: SELF TEST EXERCISE NO. 3 INTRODUCTION

o Without consulting your resource notes or video, answer the following questions. o Check your answers when completed.

QUESTIONS YES NO

1. What is the purpose of the normally closed contact Y2 (refer diagram below)?

ANS: __________________________________________________ ______________________________________________________ ______________________________________________________ _______________________________________________________

2. In your own words, explain the operation of the "equal to" contact on rung 6 of the diagram below.

ANS: __________________________________________________ ______________________________________________________ ______________________________________________________ ______________________________________________________

Page 75: PROGRAMMABLE LOGIC CONTROLLERSPROGRAMMABLE LOGIC CONTROLLERS (PLC) Learner Guide TABLE OF CONTENTS INTRODUCTION PAGE 1 PLC PROGRAMME 1: FUNDAMENTAL AUTOMATIC CONTROLS OBJECTIVES &

Back to Table of Contents 72

3. In your own words, explain how the counter is reset.

ANS: __________________________________________________ ______________________________________________________ ______________________________________________________ ______________________________________________________

4. Explain the purpose of the retain circuit on rung 6.

ANS: __________________________________________________ ______________________________________________________ ______________________________________________________ ______________________________________________________ ______________________________________________________ ______________________________________________________

5. Explain the function of the "end" coil on rung 8 of the diagram.

ANS: __________________________________________________ _______________________________________________________ _______________________________________________________ _______________________________________________________