Programable Logic controller questions 1-3
MODULE TITLE: PROGRAMMABLE LOGIC CONTROLLERS
TOPIC TITLE: PROGRAMMABLE FACILITIES
LESSON 1: LATCHING RELAYS AND BASIC TIMERS
PLC - 6 - 1
© Teesside University 2011
Published by Teesside University Open Learning (Engineering)
School of Science & Engineering
Teesside University
Tees Valley, UK
TS1 3BA
+44 (0)1642 342740
All rights reserved. No part of this publication may be reproduced, stored in a
retrieval system, or transmitted, in any form or by any means, electronic, mechanical,
photocopying, recording or otherwise without the prior permission
of the Copyright owner.
This book is sold subject to the condition that it shall not, by way of trade or
otherwise, be lent, re-sold, hired out or otherwise circulated without the publisher's
prior consent in any form of binding or cover other than that in which it is
published and without a similar condition including this
condition being imposed on the subsequent purchaser.
________________________________________________________________________________________
INTRODUCTION ________________________________________________________________________________________
This lesson covers, as revision, some of the previously learned basic material
which must be known because of its fundamental importance in PLC theory.
By continually using the basics it is possible to make advances whilst
consolidating work already covered. The explanations given continue to show
ladder diagrams in different formats so that you can learn different types of
representation.
The work covered takes us through the final steps in switching logic, and
clarifies the presentation of ladder diagrams before progressing to introduce
new items such as retentive devices and basic timer operation.
________________________________________________________________________________________
YOUR AIMS ________________________________________________________________________________________
On completing this lesson you should be able to:
• organise the order of presentation of ladder diagram elements such
that they will be suitable for the majority of PLCs
• understand the idea of programming ladder diagram blocks
• explain the difference between retentive and non-retentive device
identification and operation
• explain the basic operation of PLC timer facilities.
1
Teesside University Open Learning (Engineering)
© Teesside University 2011
________________________________________________________________________________________
STUDY ADVICE ________________________________________________________________________________________
This lesson makes reference to previous lessons so ensure that you have them
at hand.
________________________________________________________________________________________
CORRECT PROGRAMMING METHODS ________________________________________________________________________________________
All pieces of computer equipment are programmed in ways which follow
strictly laid down rules. If the programmer programs in one way and the PLC
interprets in another, then, quite often, the computer program either won't run
at all or it will run in a way different from that expected. People new to
computer equipment always seem amazed when a program doesn't run
properly due to, what appears to be, the most trivial reason. Comments such
as: "Well, it should have worked. I only missed out a comma", are all too
common. In programming a PLC the same level of exactness is required.
Admittedly the program listing may not contain commas, full stops, question
marks etc. but the characters which are allowed must be in precise order before
being keyed into the machine.
At this point we will revise some material from previous lessons and use this to
illustrate what the PLC will accept and how it interprets it.
Consider a practical circuit problem.
Four switches SW1, SW2, SW3 and SW4 are used to control a load. The load
is switched on if SW1, SW3 and SW4 are all closed at the same time or if
SW2, SW3 and SW4 are all closed at the same time. Let us examine some of
the circuit wiring possibilities.
2
Teesside University Open Learning (Engineering)
© Teesside University 2011
FIG. 1
FIG. 2
FIG.3
Electricians are trained to observe what is called correct polarity, which
essentially means that if this were a mains powered circuit the switches would
always be placed in the live conductor and the load would always be connected
to the neutral conductor. This same order of presentation was mentioned in
Lesson 1 of Topic 4 (on ladder diagrams) where the convention is that the load
is always placed last on the rung.
Load
Supply Supply
SW4SW3
SW2
SW1
Load
Supply Supply
SW4 SW3
SW2
SW1
Load
Supply Supply
SW4 SW3
SW2
SW1
3
Teesside University Open Learning (Engineering)
© Teesside University 2011
An acceptable diagram would therefore be:
FIG. 4
We should consider the question:
"does the order of presenting the switches make any difference?"
In an attempt to answer this question we will refer back to the work of
Lesson 2 in Topic 4. At this time we looked at Boolean expressions which
were written to represent the functions fulfilled by switching circuits.
The diagram and expression shown below serve as a reminder.
FIG. 5
Expression OUT 23 = 001 AND 002
OUT 23 = 001.002
Write down an expression for the circuit of FIGURE 6.
Out 23
002001
Load
Supply Supply
SW4SW3
SW2
SW1
4
Teesside University Open Learning (Engineering)
© Teesside University 2011
FIG. 6
OUT 24 =
OUT 24 =
Now write an expression for the circuit of FIGURE 7.
FIG. 7
Notice that the circuit operation is the same as the circuit of FIGURE 6.
OUT 24 =
OUT 24 =
Before going on, check your answers with those given on page 31.
You should notice that a degree of clarity has been added to the expressions by
the use of brackets.
004 003
005
Out 24
003 004
005
Out 24
5
Teesside University Open Learning (Engineering)
© Teesside University 2011
If such expressions are to be keyed-in to a PLC then it is unlikely that the
keypad would show any brackets. The clarification would therefore not be
possible.
A program listing for the expression of the diagram of FIGURE 7 is given
below in FIGURE 8.
Check through this simple listing – do you think it is correct?
STEP OP CODE OPERAND
001 LD 004
002 AND 003
003 OR 005
004 OUT 24
FIG. 8
________________________________________________________________________________________
Well, a particular machine may accept the program listing in the form given,
but the machine's interpretation of the circuit operation is not likely to be the
same as that of the actual circuit!
Consider the circuit of FIGURE 9.
FIG. 9
004 003
005
Out 24
6
Teesside University Open Learning (Engineering)
© Teesside University 2011
Write down an expression for this circuit.
OUT 24 =
OUT 24 =
Answer given on page 31.
Check the listing given below against the expression provided for the circuit of
FIGURE 9.
STEP OP CODE OPERAND
001 LD 004
002 AND 003
003 OR 005
004 OUT 24
FIG. 10
Now, compare the diagrams of FIGURE 7 and FIGURE 9 and the listings of
FIGURE 8 and FIGURE 10.
You should notice that the two diagrams are different but the two listings are
the same!
If the listing were keyed in, which circuit operation would the PLC perform?
....................................................................................................................................................
________________________________________________________________________________________
7
Teesside University Open Learning (Engineering)
© Teesside University 2011
The answer is that the circuit of FIGURE 9 is the most likely interpretation.
Were you correct?
If this is the case then how can we program the PLC such that it will behave in
the same way as the circuit of FIGURE 7?
Checking the diagram we can see that OUT 24 will be energised if input 004 is
closed at the same time as one or other or both of inputs 003 and 005. If the
circuit is redrawn but the operation remains the same then we can obtain
another diagram which is equivalent to that of FIGURE 7. This has been done
with FIGURE 11 below.
FIG. 11
Examine the diagram to ascertain similarity of operation.
A suitable listing may be:
STEP OP CODE OPERAND
001 LD 003
002 OR 005
003 AND 004
004 OUT 24
Check this listing against the diagram of FIGURE 11.
003 004
005
Out 24
8
Teesside University Open Learning (Engineering)
© Teesside University 2011
Notice now that the circuit behaves in the same way as that of FIGURE 7 but
the listings for the two circuits are not the same.
GENERAL RULE
It is wise and the convention to draw ladder diagram circuits with multiple ORed
contacts nearest to the positive rail (left upright). For example, the circuit of
FIGURE 12 (below) would be better drawn as the circuit of FIGURE 13.
FIG.12
FIG. 13
Similarly the circuit of FIGURE 14 would be better drawn as the circuit of
FIGURE 15.
002 001
003
Out 20
004
001 002
003
Out 20
004
9
Teesside University Open Learning (Engineering)
© Teesside University 2011
FIG. 14
FIG. 15
For you own benefit, write down a program listing for the diagram of FIGURE 13.
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
________________________________________________________________________________________
Out 25
006
001 002004
003
005
002 004
003
Out 25
005
006
001
10
Teesside University Open Learning (Engineering)
© Teesside University 2011
A suitable answer is given on page 31.
We can now return to the question posed earlier. Does the order of presenting
the switches make any difference?
In the circuit diagram sense the answer is no. However, in the ladder diagram
sense the derived listing is more likely to produce the anticipated operation if
the previously stated general rule is observed. A suitable ladder diagram for
reliable programming would be as shown in FIGURE 16.
FIG. 16
We may now attempt to compile program listings for slightly more
complicated switching circuits.
Consider the circuit of FIGURE 17.
FIG. 17
OUT 22 001
002
006 003
004
Load Y001SW1X001
SW2 X002
SW3 X003
SW4 X004
11
Teesside University Open Learning (Engineering)
© Teesside University 2011
Compile a ladder diagram listing for this circuit.
STEP OP CODE OPERAND
001
002
003
004
005
006
007
Now examine the circuit of FIGURE 18. I hope that you agree that the circuits
of FIGURE 17 and FIGURE 18 behave differently!
FIG. 18
Now compile a listing for the diagram of FIGURE 18.
OUT 22 001 006
002 003
004
12
Teesside University Open Learning (Engineering)
© Teesside University 2011
STEP OP CODE OPERAND
001
002
003
004
005
006
007
Compare this listing with the previous listing (for FIGURE 17). It is very
likely that the two listings have turned out to be the same! The two circuits,
however, are not the same. If your two listings are the same how would you
expect the PLC to know which circuit behaviour to perform? Clearly only one
interpretation can be made by the machine and that is likely to be for the
circuit of FIGURE 18. How then can we program for the FIGURE 17 circuit
operation?
To avoid misinterpretation between the programmer and the machine some
manufacturers utilise a block programming approach. This means that the
rung must be diagrammatically broken up into distinct blocks before
programming. The diagram of FIGURE 17 would become two blocks as
shown in FIGURE 19.
13
Teesside University Open Learning (Engineering)
© Teesside University 2011
FIG. 19
Each block is programmed as a separate rung and then linked together before
driving the output.
A suitable listing may be:
STEP OP CODE OPERAND
001 LD 001
002 AND 006 BLOCK a
003 OR 002 ................................................
004 LD 003 BLOCK b
005 OR 004 ................................................
006 AND LD ..............................THE LINK
007 OUT 22
The AND LD instruction logically ANDs the two partially completed blocks, a
and b.
If block programming appears too troublesome there are other ways of
obtaining the same circuit behaviour. The two diagrams of FIGURE 20 and
001
002
006
Block a Block b
OUT 22 003
004
LINK
14
Teesside University Open Learning (Engineering)
© Teesside University 2011
FIGURE 21 will produce the same effect as FIGURE 19. Inspect each circuit
in turn to check that you agree that this is so.
FIG. 20
R001001 006
002
OUT 22003 R001
004
By using a memory relay (R001)
15
Teesside University Open Learning (Engineering)
© Teesside University 2011
FIG. 21
When programming PLCs there are often many acceptable solutions to a given
problem. It is only in the simplest of circuits that just one correct solution is
likely.
The diagrams of FIGURES 20 and 21 have the disadvantage of making the
program listings longer because more circuit elements are specified. This also
means that more memory will be taken up when these are programmed into the
PLC. Program memory is limited (often by only a given number of steps
being allowed) and should not be wasted by inefficient programming methods.
OUT 22001 006
001 006
003
004
003
004
002
002
By splitting the circuit up and identifying every possible flow path
16
Teesside University Open Learning (Engineering)
© Teesside University 2011
________________________________________________________________________________________
LATCHING RELAY OPERATION ________________________________________________________________________________________
In certain applications of programmable controllers it may be required for the
system to "remember" the occurrence of an event for future use. In the human
sense we remember events by storing them in our memory and this same
method is used by PLC programmers. The advantage with a PLC is that the
event can easily be stored as data within the electronic memory circuits and
can, just as easily, be forgotten by having the data cleared from the same
circuits. The PLC can, therefore, be programmed to "remember" or "forget"
quite readily.
We don't need to look very far to find a practical example of an event which a
PLC may be required to remember. Consider, for instance, the operation of a
pelican crossing.
The green road traffic light is normally biased to be on for the majority of the
time so that the road traffic is kept on the move. When a pedestrian wishes to
cross the road a push switch must be pressed to make the traffic lights change
from green through to red to cause the traffic to stop. The change in the road
traffic lights will not happen immediately the push has been operated, but the
controller will remember the switch press event. The pedestrian may stop
pressing the push switch once the event has been recognised and remembered.
This is signalled back to the pedestrian by the lighting up of the wait sign.
We can design a circuit to fulfil this part of the operation. Consider the circuit
diagram shown in FIGURE 22.
17
Teesside University Open Learning (Engineering)
© Teesside University 2011
FIG. 22
The circuit is quite readily converted into ladder diagram format for PLC
programming (returning to ladder diagrams using the X, Y, etc. format).
FIGURE 23 shows an equivalent ladder diagram.
FIG. 23
X001
R000
R000
R000
R000
Y004
not complete
PUSH
R1/1
RELAY
R1/2
R1/3
WAIT SIGN
Relay used to remember the pressing of the push switch
Relay retaining contacts
Contacts used to signal to the next step in the light change sequence (rung not complete)
R1
18
Teesside University Open Learning (Engineering)
© Teesside University 2011
When the push switch (X001) closes the R000 relay turns on. Once on, all
contacts carrying the R000 identification will operate. In the diagram the N/O
R000 contacts connected across the X001 input will close causing the R000
relay to be retained or held in the on state. The X001 contacts can now be
opened by the pedestrian releasing the push switch but the R000 relay will
remain in the on state, hence remembering that the switch has been pressed.
The R000 contacts in the second rung will also close and so the Y004 output,
supplying the wait sign, will also be on.
The R000 contacts in the third rung must be used to supply a signal for the rest
of the light change procedure to be initiated.
This arrangement, therefore, remembers the event of pushing the switch.
However, once R000 is energised by the closing of the input contacts (X001) it
will remain on permanently – even after the pedestrian has crossed the road.
Only one method would be available to turn off the R000 relay and that would
be to switch off the supply! Otherwise R000 is said to be latched in the on
state.
Clearly the ladder diagram requires alteration to provide a means of resetting
the R000 relay to the off state. A simulated loss of supply can be performed
by programming a suitable set of N/C contacts in series with the relay. This
inclusion into the first rung in shown in FIGURE 24. The contacts (arbitrarily
called R013) may, for instance, open when the red and amber road lights
operate. This would extinguish the wait sign and reset the R000 relay at a
suitable point in the light change sequence.
In this simplified explanation the setting and resetting of the relay is controlled
from the same rung of the diagram. Further, the relay may be reset by a loss of
power supply which may be a decided disadvantage in applications where the
resetting must be controlled.
19
Teesside University Open Learning (Engineering)
© Teesside University 2011
FIG. 24
________________________________________________________________________________________
RETENTIVE LATCHING RELAYS ________________________________________________________________________________________
If certain relays are on before a power failure but are subsequently not on when
the power is restored after the power failure then the operation of the PLC will
be affected.
For this reason most manufacturers allocate an area of fixed size within the
battery-backed RAM which may be used for retentive latching relay purposes.
If relays within this area are latched on and a power failure occurs the latching
is remembered during the power failure because of the battery backing. When
power is restored and the PLC restarts its program it can continue from the
point at which power was lost. Physical output relays are not normally
retentive.
The programmer needs to know how many retentive relays have been
provided. The PLC needs to be able to determine whether the programmer
X001
R000
R000
R000
R000
Y004
not complete
R013
20
Teesside University Open Learning (Engineering)
© Teesside University 2011
intends the use of a retentive relay or a non-retentive relay within a given
program. To achieve this, retentive relays may require an identifying letter or
may use identifying numbers within a range allocated for this purpose.
Alternatively, they may require a different programming method to be used to
signify the retentive device.
When latching devices are used the SET conditions and the RESET conditions
are sometimes specified by different lines of programming which may appear
some distance apart (this method needs to be watched out for).
In almost all cases if both the set and the reset conditions arise at the same
time then the reset conditions will have priority (the latching device will not
latch on).
The two diagrams below are provided as examples of retentive and non-
retentive programming methods used by leading PLC manufacturers.
FIG. 25
X004
R000
R000
X004
L000
X005
L000
X005
Non-retentive through power failure
Retentive through power failure
The difference is in the use of R or L relay identification.
21
Teesside University Open Learning (Engineering)
© Teesside University 2011
FIG. 26
At this point we will move away from straightforward switching logic to
examine some of the other programmable facilities commonly available within
the PLCs. Such facilities, which are not strictly switching, may not follow
Boolean rules. This gives wider possibilities of variations between
manufacturers. It is, therefore, very important not to make the mistake of
assuming a machine's operation without close reference to the manufacturer's
manual.
004
MR000
MR000
004
KR000
005
005
Non-retentive through power failure
Retentive through power failure
SET LINE
RESET LINE
S
R
22
Teesside University Open Learning (Engineering)
© Teesside University 2011
________________________________________________________________________________________
TIMERS ________________________________________________________________________________________
For many years the ability to introduce some form of timing or time delay into
the operation of a circuit has proved to be a very valuable asset to control
technology. Timers of various descriptions have been used in the past for a
variety of applications. At one time a manual operative would be employed to
switch a load on or off at a given time of the day. This practice is now
considered costly and unacceptable. Time switches, synchronised to the
frequency of the a.c. mains supply, are used to maintain switching at preset
times of the day or night. Such devices are ideal for switching on/off mains
loads at the same time each day (central heating boilers, security lights etc.).
Unfortunately, because they cover a 24 hour period, the settings may not be
very exact and the smallest timed period (often limited by the mechanical
construction) would be just too large for many applications. Certain other
applications may require very short time periods which are not necessarily
related to the time of day.
Consider, for example, the STAR/DELTA starting requirements of a three-
phase induction motor. At one time (and occasionally even now), motors of
this type used to be started manually. The operator would move the starting
lever to the STAR position for starting, then wait for a short period to allow the
rotor to pick up speed before switching over to the DELTA (run) position to
allow the machine to attain its normal running speed. The introduction of a
mechanical timing device (similar to clockwork) allowed the same motor to be
started and run up to speed remotely from the operator.
In pneumatic control, similar delay timing can be achieved by allowing
compressed air to enter a chamber via a restriction. The air pressure within the
chamber gradually increases until it is sufficient to operate an electrical
pressure switch. In this case the switch operation is delayed by a period of
23
Teesside University Open Learning (Engineering)
© Teesside University 2011
time determined by the air pressure of the supply line and the nature and size
of the restriction.
More recently, and certainly since the introduction of integrated circuits,
electronic timers have become more widely available. For industrial purposes
these can be obtained in self-contained modules which clip onto DIN rail and
have the electrical connections provided by terminals at the top and bottom.
Quite often the time setting is adjustable over a given range by turning a dial so
that a pointer indicates on a scale the time setting chosen. When settings
outside of the range are required the timer unit must be replaced by a different
unit.
Obviously in the few types of timing devices mentioned the number and type
of electrical switching contacts provided are very limited.
The provision of timers within programmable logic controllers is considered to
be a basic facility even though a timer may not be considered to be a logic
device in the same way as an AND gate, OR gate etc. The need to purchase
separate timers is therefore avoided. A PLC timer facility may well rely upon
the operation of an electronic hardware timer I.C. fitted as part of the
microcomputer hardware. The use of the timers is, however, completely
arranged by the programming within the ladder diagram or program listing.
As with relays etc. timers can have any number of contacts, unlike the time
switches and other timers previously mentioned.
24
Teesside University Open Learning (Engineering)
© Teesside University 2011
________________________________________________________________________________________
TIMING OPERATIONS ________________________________________________________________________________________
When incorporating timers into ladder diagrams one of two modes of operation
is required.
DELAY IN SWITCHING ON
In this mode of operation a timer may be "enabled" to allow it to begin timing.
After a preset time period has elapsed the timer output will switch on. Any
contacts carrying the same identification as the timer will then operate i.e. N/O
timer contacts will close and N/C timer contacts will open. In this way a delay
exists between the timer being "enabled" and the timer output coming on. In
most cases, timers are preloaded by the programmer with a value representing
the required time period. As specified time intervals pass, the preset value is
decremented (i.e. reduced) by one. When the value is reduced to zero the timer
output will be switched on. Typically, the time intervals used are 0.1 second or
1 second.
If, for example, the timer has a 1 second timing interval and it is loaded with
the value 5 then, when it is enabled, the value 5 is reduced to 4 after one
second, further reduced to 3 after the next second and so on until its value is
zero. The timer output will then switch on. If, however, during the timing
sequence, the timer loses its enable signal then the preloaded value (5 in this
case) is immediately reinstated into the timer and the timer does not begin
decrementing again until it is next enabled. It is not uncommon for some
manufacturers to provide timers having different time intervals i.e. some with
1 second increments and others with 0.1 second increments. At least one
manufacturer leaves it to the user to select the timer interval by providing a
link wire which can be connected to one of a number of terminals inside the
machine so as to define a specific time increment. The user obviously needs to
25
Teesside University Open Learning (Engineering)
© Teesside University 2011
know what time interval is being provided. Here again assumptions should not
be made – consult the manual.
The ladder diagram of FIGURE 27 illustrates the arrangement for a typical
delay-in-on timer operation. In this case a timer identified as 06 is enabled by
the closing of the input contacts X003.
PROGRAM LISTING
STEP OP CODE OPERAND
019 LD X003
020 TIM 06 005
021 LD TIM 06
022 OUT Y000
FIG. 27
If input contacts X003 close, timer 06 begins to decrement. If X003 remains
closed continually for 5 seconds the timer output switches on. In rung 2 the
N/O contacts identified as TIM06 will close, thus switching on the physical
output Y000. Timers themselves are not physical outputs and so they must be
used to drive a physical output if an external effect from the timer is to be
obtained.
TIM 06
Rung 1
Rung 2
Y000
5 seconds
X003
TIM 06
26
Teesside University Open Learning (Engineering)
© Teesside University 2011
FIGURE 28 is a timing diagram which can be used to show the state of each
element in the ladder diagram with the passage of time.
FIG. 28
The timing diagram is read from left to right along the time axis. The timing
diagram shows that the output Y000 does not switch on until 5 seconds after
TIM 06 has been enabled by the closing of input X003. The timer output will
remain switched on until its enable signal is lost i.e. in this case until input
contacts X003 are opened.
DELAY IN SWITCHING OFF
The second mode of operation to be considered occurs when a timer is used to
produce a delay before switching something off. With this mode an output
may be switched on by the occurrence of a defined condition but the output
will only remain on for a specified period of time before being switched off.
Closes Opens
X003
TIM06
Y000
On
On
TIM06 output turns off
Y000 turns off
Time axis5 second delay
between X003 coming on and Y000 coming on
Off
Off
27
Teesside University Open Learning (Engineering)
© Teesside University 2011
The diagram of FIGURE 29 can be used as an example of this operation.
PROGRAM LISTING
STEP OP CODE OPERAND
016 LD X001
017 AND X003
018 AND NOT TIM 04
019 OUT Y002
020 LD X001
021 AND X003
022 TIM 04 007
FIG. 29
The switching logic of rung 1 is such that Y002 will be switched on if inputs
X001 AND X003 are both closed AND TIM 04 is not switched on.
i.e. Y002 = X001 AND X003 AND NOT TIM 04
Y002 = X001.X003.
The switching logic of rung 2 is such that TIM04 will be enabled to begin
timing if inputs X001 AND X003 are both closed. If they remain closed for a
period in excess of 7 seconds then, after 7 seconds, the TIM04 output will
switch on.
TIM 04
Y002
Rung 1
Rung 2
TIM 04
7 seconds
X001 X003 TIM 04
X001 X003
28
Teesside University Open Learning (Engineering)
© Teesside University 2011
The operation of the ladder diagram can now be assessed. When X001 and
X003 are both closed then the output Y002 will switch on and for the same
reason TIM 04 will be enabled to begin timing. If X001 and X003 remain
closed for 7 seconds then the timer will time out and TIM 04 output will come
on. All contacts with TIM 04 identification will change state. Therefore, in
the next program pass the N/C TIM04 contacts in rung 1 will open and switch
off the Y002 output. Y002 was switched on by the closing of X001 and X003
but only remained on for a delay of 7 seconds (the preset time of TIM 04).
The timing diagram of FIGURE 30 indicates this operation.
FIG. 30
The TIM 04 output will be disabled if either or both of X001 or X003 are
opened.
Y002
TIM04
On
Off
Time axis
X001
X003
X001 AND X003 AND NOT TIM04
7 second period
Timer 04 enabled
Timer 04 output on
Timer 04 output disabled by the
loss of X001
29
Teesside University Open Learning (Engineering)
© Teesside University 2011
Carefully examine the timing diagram to ensure that you are familiar with the
circuit operation.
You should now attempt the Self-Assessment Questions given on page 32.
30
Teesside University Open Learning (Engineering)
© Teesside University 2011
________________________________________________________________________________________
ANSWERS TO LESSON QUESTIONS ________________________________________________________________________________________
FROM PAGE 5
Expression for the circuit of FIGURE 6.
OUT 24 = (003 OR 005) AND 004
OUT 24 = (003 + 005).004
Expression for the circuit of FIGURE 7.
OUT 24 = 004 AND (003 OR 005)
OUT 24 = 004.(003 + 005)
FROM PAGE 7
Expression for the circuit of FIGURE 9.
OUT 24 = (004 AND 003) OR 005
OUT 24 = (004.003) + 005
FROM PAGE 11
Program listing for the ladder diagram of FIGURE 13.
STEP OP CODE OPERAND
001 LD 002
002 OR 003
003 OR 004
004 AND 001
005 OUT 20
31
Teesside University Open Learning (Engineering)
© Teesside University 2011
________________________________________________________________________________________
SELF-ASSESSMENT QUESTIONS ________________________________________________________________________________________
1. Draw a ladder diagram for each of the five expressions given below.
(a) OUT 22 = (002 AND 004) OR (003 AND 006)
(b) OUT 24 = 003 AND (004 OR 002 OR 007)
(c) OUT 23 = (002 OR 004) AND (003 OR 005)
(d) Y007 = (X005 AND ) OR R006
(e) Y000 = ((X001 OR R000) AND X003) OR R004
2. Explain the difference between retentive and non-retentive relays/devices.
3. FIGURE 31 shows a ladder diagram which incorporates:
X devices as physical inputs
R devices as memory relays
Y devices as physical outputs
and TIM devices as timers.
X003
32
Teesside University Open Learning (Engineering)
© Teesside University 2011
FIG. 31
The X001 input is connected to a push-to-make switch similar to a bell
push.
If this switch is momentarily pressed and then released at the point in time
indicated on the timing diagram of FIGURE 32 (when the condition of
the circuit elements is as indicated) then complete the remainder of the
timing diagram.
X001
R001
R001
R002
R001
TIM04
TIM04
TIM03
TIM04
Y003
R001
Y002
TIM04
TIM04
R002
TIM03
2 seconds
4 seconds
33
Teesside University Open Learning (Engineering)
© Teesside University 2011
Timing diagram for Question 3:
FIG. 32
1 sec
time intervals
TIM04
X001
R001
R002
TIM03
Y002
Y003
On
Off
Off
Off
Off
Off
Off
Off
Time when X001 closes
Time axis
Level of the ON state
34
Teesside University Open Learning (Engineering)
© Teesside University 2011
________________________________________________________________________________________
NOTES ________________________________________________________________________________________
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
35
Teesside University Open Learning (Engineering)
© Teesside University 2011
________________________________________________________________________________________
ANSWERS TO SELF-ASSESSMENT QUESTIONS ________________________________________________________________________________________
1. The ladder diagrams of FIGURE 33 show the implementation of the
expressions.
FIG. 33
(a)
(b)
002 004
003 006
002
004
007
003
002 003
004 005
X005 X003
R006
X001
R000
X003
R004
OUT 22
OUT 24
OUT 23
Y007
Y000
(c)
(d)
(e)
36
Teesside University Open Learning (Engineering)
© Teesside University 2011
2. In most respects retentive and non-retentive relays/devices behave in the
same way. One special difference, however, is in their behaviour during
and after a power-down condition.
Non-retentive devices are served by non battery-backed RAM which
means that the condition of such devices (whether on or off) is lost during
a power failure event and cannot be expected to be the same after the
power is restored. Retentive devices, on the other hand, will be served by
battery-backed RAM which means that the on/off condition before a
power failure will be retained and reinstated at the point in time when
power is restored.
3. Compare your timing diagram (FIGURE 32) with that given as FIGURE 34
below.
FIG. 34
TIM04
X001
R001
R002
TIM03
Y002
Y003
On
Off
On
Off
Off
Off
Off
Off
Off
4 seconds 2 seconds Time when X001 closes
37
Teesside University Open Learning (Engineering)
© Teesside University 2011
________________________________________________________________________________________
SUMMARY ________________________________________________________________________________________
In this lesson we have covered additional work on ladder diagrams and
completed basic switching logic. The new elements introduced were retentive
and non-retentive latching relays and PLC timer facilities. The next lesson in
this topic will cover a little more work on timers and their application within
practical problems.
38
Teesside University Open Learning (Engineering)
© Teesside University 2011
<< /ASCII85EncodePages false /AllowTransparency false /AutoPositionEPSFiles true /AutoRotatePages /None /Binding /Left /CalGrayProfile (Dot Gain 20%) /CalRGBProfile (sRGB IEC61966-2.1) /CalCMYKProfile (U.S. Web Coated \050SWOP\051 v2) /sRGBProfile (sRGB IEC61966-2.1) /CannotEmbedFontPolicy /Error /CompatibilityLevel 1.4 /CompressObjects /Tags /CompressPages true /ConvertImagesToIndexed true /PassThroughJPEGImages true /CreateJDFFile false /CreateJobTicket false /DefaultRenderingIntent /Default /DetectBlends true /ColorConversionStrategy /LeaveColorUnchanged /DoThumbnails false /EmbedAllFonts true /EmbedJobOptions true /DSCReportingLevel 0 /SyntheticBoldness 1.00 /EmitDSCWarnings false /EndPage -1 /ImageMemory 1048576 /LockDistillerParams false /MaxSubsetPct 100 /Optimize true /OPM 1 /ParseDSCComments true /ParseDSCCommentsForDocInfo true /PreserveCopyPage true /PreserveEPSInfo true /PreserveHalftoneInfo false /PreserveOPIComments false /PreserveOverprintSettings true /StartPage 1 /SubsetFonts true /TransferFunctionInfo /Apply /UCRandBGInfo /Preserve /UsePrologue false /ColorSettingsFile () /AlwaysEmbed [ true ] /NeverEmbed [ true ] /AntiAliasColorImages false /DownsampleColorImages true /ColorImageDownsampleType /Bicubic /ColorImageResolution 300 /ColorImageDepth -1 /ColorImageDownsampleThreshold 1.50000 /EncodeColorImages true /ColorImageFilter /DCTEncode /AutoFilterColorImages true /ColorImageAutoFilterStrategy /JPEG /ColorACSImageDict << /QFactor 0.15 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >> /ColorImageDict << /QFactor 0.15 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >> /JPEG2000ColorACSImageDict << /TileWidth 256 /TileHeight 256 /Quality 30 >> /JPEG2000ColorImageDict << /TileWidth 256 /TileHeight 256 /Quality 30 >> /AntiAliasGrayImages false /DownsampleGrayImages true /GrayImageDownsampleType /Bicubic /GrayImageResolution 300 /GrayImageDepth -1 /GrayImageDownsampleThreshold 1.50000 /EncodeGrayImages true /GrayImageFilter /DCTEncode /AutoFilterGrayImages true /GrayImageAutoFilterStrategy /JPEG /GrayACSImageDict << /QFactor 0.15 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >> /GrayImageDict << /QFactor 0.15 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >> /JPEG2000GrayACSImageDict << /TileWidth 256 /TileHeight 256 /Quality 30 >> /JPEG2000GrayImageDict << /TileWidth 256 /TileHeight 256 /Quality 30 >> /AntiAliasMonoImages false /DownsampleMonoImages true /MonoImageDownsampleType /Bicubic /MonoImageResolution 1200 /MonoImageDepth -1 /MonoImageDownsampleThreshold 1.50000 /EncodeMonoImages true /MonoImageFilter /CCITTFaxEncode /MonoImageDict << /K -1 >> /AllowPSXObjects false /PDFX1aCheck false /PDFX3Check false /PDFXCompliantPDFOnly false /PDFXNoTrimBoxError true /PDFXTrimBoxToMediaBoxOffset [ 0.00000 0.00000 0.00000 0.00000 ] /PDFXSetBleedBoxToMediaBox true /PDFXBleedBoxToTrimBoxOffset [ 0.00000 0.00000 0.00000 0.00000 ] /PDFXOutputIntentProfile () /PDFXOutputCondition () /PDFXRegistryName (http://www.color.org) /PDFXTrapped /Unknown /Description << /ENU (Use these settings to create PDF documents with higher image resolution for high quality pre-press printing. The PDF documents can be opened with Acrobat and Reader 5.0 and later. These settings require font embedding.) /JPN <FEFF3053306e8a2d5b9a306f30019ad889e350cf5ea6753b50cf3092542b308030d730ea30d730ec30b9537052377528306e00200050004400460020658766f830924f5c62103059308b3068304d306b4f7f75283057307e305930023053306e8a2d5b9a30674f5c62103057305f00200050004400460020658766f8306f0020004100630072006f0062006100740020304a30883073002000520065006100640065007200200035002e003000204ee5964d30678868793a3067304d307e305930023053306e8a2d5b9a306b306f30d530a930f330c8306e57cb30818fbc307f304c5fc59808306730593002> /FRA <FEFF004f007000740069006f006e007300200070006f0075007200200063007200e900650072002000640065007300200064006f00630075006d0065006e00740073002000500044004600200064006f007400e900730020006400270075006e00650020007200e90073006f006c007500740069006f006e002000e9006c0065007600e9006500200070006f0075007200200075006e00650020007100750061006c0069007400e90020006400270069006d007000720065007300730069006f006e00200070007200e9007000720065007300730065002e0020005500740069006c006900730065007a0020004100630072006f0062006100740020006f00750020005200650061006400650072002c002000760065007200730069006f006e00200035002e00300020006f007500200075006c007400e9007200690065007500720065002c00200070006f007500720020006c006500730020006f00750076007200690072002e0020004c00270069006e0063006f00720070006f0072006100740069006f006e002000640065007300200070006f006c0069006300650073002000650073007400200072006500710075006900730065002e> /DEU <FEFF00560065007200770065006e00640065006e0020005300690065002000640069006500730065002000450069006e007300740065006c006c0075006e00670065006e0020007a0075006d002000450072007300740065006c006c0065006e00200076006f006e0020005000440046002d0044006f006b0075006d0065006e00740065006e0020006d00690074002000650069006e006500720020006800f60068006500720065006e002000420069006c0064006100750066006c00f600730075006e0067002c00200075006d002000650069006e00650020007100750061006c00690074006100740069007600200068006f006300680077006500720074006900670065002000410075007300670061006200650020006600fc0072002000640069006500200044007200750063006b0076006f0072007300740075006600650020007a0075002000650072007a00690065006c0065006e002e00200044006900650020005000440046002d0044006f006b0075006d0065006e007400650020006b00f6006e006e0065006e0020006d006900740020004100630072006f0062006100740020006f0064006500720020006d00690074002000640065006d002000520065006100640065007200200035002e003000200075006e00640020006800f600680065007200200067006500f600660066006e00650074002000770065007200640065006e002e00200042006500690020006400690065007300650072002000450069006e007300740065006c006c0075006e00670020006900730074002000650069006e00650020005300630068007200690066007400650069006e00620065007400740075006e00670020006500720066006f0072006400650072006c006900630068002e> /PTB <FEFF005500740069006c0069007a006500200065007300740061007300200063006f006e00660069006700750072006100e700f5006500730020007000610072006100200063007200690061007200200064006f00630075006d0065006e0074006f0073002000500044004600200063006f006d00200075006d00610020007200650073006f006c007500e700e3006f00200064006500200069006d006100670065006d0020007300750070006500720069006f0072002000700061007200610020006f006200740065007200200075006d00610020007100750061006c0069006400610064006500200064006500200069006d0070007200650073007300e3006f0020006d0065006c0068006f0072002e0020004f007300200064006f00630075006d0065006e0074006f0073002000500044004600200070006f00640065006d0020007300650072002000610062006500720074006f007300200063006f006d0020006f0020004100630072006f006200610074002c002000520065006100640065007200200035002e00300020006500200070006f00730074006500720069006f0072002e00200045007300740061007300200063006f006e00660069006700750072006100e700f50065007300200072006500710075006500720065006d00200069006e0063006f00720070006f0072006100e700e3006f00200064006500200066006f006e00740065002e> /DAN <FEFF004200720075006700200064006900730073006500200069006e0064007300740069006c006c0069006e006700650072002000740069006c0020006100740020006f0070007200650074007400650020005000440046002d0064006f006b0075006d0065006e0074006500720020006d006500640020006800f8006a006500720065002000620069006c006c00650064006f0070006c00f80073006e0069006e0067002000740069006c0020007000720065002d00700072006500730073002d007500640073006b007200690076006e0069006e0067002000690020006800f8006a0020006b00760061006c0069007400650074002e0020005000440046002d0064006f006b0075006d0065006e007400650072006e00650020006b0061006e002000e50062006e006500730020006d006500640020004100630072006f0062006100740020006f0067002000520065006100640065007200200035002e00300020006f00670020006e0079006500720065002e00200044006900730073006500200069006e0064007300740069006c006c0069006e0067006500720020006b007200e600760065007200200069006e0074006500670072006500720069006e006700200061006600200073006b007200690066007400740079007000650072002e> /NLD <FEFF004700650062007200750069006b002000640065007a006500200069006e007300740065006c006c0069006e00670065006e0020006f006d0020005000440046002d0064006f00630075006d0065006e00740065006e0020007400650020006d0061006b0065006e0020006d00650074002000650065006e00200068006f00670065002000610066006200650065006c00640069006e00670073007200650073006f006c007500740069006500200076006f006f0072002000610066006400720075006b006b0065006e0020006d0065007400200068006f006700650020006b00770061006c0069007400650069007400200069006e002000650065006e002000700072006500700072006500730073002d006f006d0067006500760069006e0067002e0020004400650020005000440046002d0064006f00630075006d0065006e00740065006e0020006b0075006e006e0065006e00200077006f007200640065006e002000670065006f00700065006e00640020006d006500740020004100630072006f00620061007400200065006e002000520065006100640065007200200035002e003000200065006e00200068006f006700650072002e002000420069006a002000640065007a006500200069006e007300740065006c006c0069006e00670020006d006f006500740065006e00200066006f006e007400730020007a0069006a006e00200069006e006700650073006c006f00740065006e002e> /ESP <FEFF0055007300650020006500730074006100730020006f007000630069006f006e006500730020007000610072006100200063007200650061007200200064006f00630075006d0065006e0074006f0073002000500044004600200063006f006e0020006d00610079006f00720020007200650073006f006c00750063006900f3006e00200064006500200069006d006100670065006e00200071007500650020007000650072006d006900740061006e0020006f006200740065006e0065007200200063006f007000690061007300200064006500200070007200650069006d0070007200650073006900f3006e0020006400650020006d00610079006f0072002000630061006c0069006400610064002e0020004c006f007300200064006f00630075006d0065006e0074006f00730020005000440046002000730065002000700075006500640065006e00200061006200720069007200200063006f006e0020004100630072006f00620061007400200079002000520065006100640065007200200035002e003000200079002000760065007200730069006f006e0065007300200070006f00730074006500720069006f007200650073002e0020004500730074006100200063006f006e0066006900670075007200610063006900f3006e0020007200650071007500690065007200650020006c006100200069006e0063007200750073007400610063006900f3006e0020006400650020006600750065006e007400650073002e> /SUO <FEFF004e00e4006900640065006e002000610073006500740075007300740065006e0020006100760075006c006c006100200076006f0069006400610061006e0020006c0075006f006400610020005000440046002d0061007300690061006b00690072006a006f006a0061002c0020006a006f006900640065006e002000740075006c006f0073007400750073006c00610061007400750020006f006e0020006b006f0072006b006500610020006a00610020006b007500760061006e0020007400610072006b006b007500750073002000730075007500720069002e0020005000440046002d0061007300690061006b00690072006a0061007400200076006f0069006400610061006e0020006100760061007400610020004100630072006f006200610074002d0020006a0061002000520065006100640065007200200035002e00300020002d006f0068006a0065006c006d0061006c006c0061002000740061006900200075007500640065006d006d0061006c006c0061002000760065007200730069006f006c006c0061002e0020004e00e4006d00e4002000610073006500740075006b0073006500740020006500640065006c006c00790074007400e4007600e4007400200066006f006e0074007400690065006e002000750070006f00740075007300740061002e> /ITA <FEFF00550073006100720065002000710075006500730074006500200069006d0070006f007300740061007a0069006f006e00690020007000650072002000630072006500610072006500200064006f00630075006d0065006e00740069002000500044004600200063006f006e00200075006e00610020007200690073006f006c0075007a0069006f006e00650020006d0061006700670069006f00720065002000700065007200200075006e00610020007100750061006c0069007400e00020006400690020007000720065007300740061006d007000610020006d00690067006c0069006f00720065002e0020004900200064006f00630075006d0065006e00740069002000500044004600200070006f00730073006f006e006f0020006500730073006500720065002000610070006500720074006900200063006f006e0020004100630072006f00620061007400200065002000520065006100640065007200200035002e003000200065002000760065007200730069006f006e006900200073007500630063006500730073006900760065002e002000510075006500730074006500200069006d0070006f007300740061007a0069006f006e006900200072006900630068006900650064006f006e006f0020006c002700750073006f00200064006900200066006f006e007400200069006e0063006f00720070006f0072006100740069002e> /NOR <FEFF004200720075006b00200064006900730073006500200069006e006e007300740069006c006c0069006e00670065006e0065002000740069006c002000e50020006f00700070007200650074007400650020005000440046002d0064006f006b0075006d0065006e0074006500720020006d006500640020006800f80079006500720065002000620069006c00640065006f00700070006c00f80073006e0069006e006700200066006f00720020006800f800790020007500740073006b00720069006600740073006b00760061006c00690074006500740020006600f800720020007400720079006b006b002e0020005000440046002d0064006f006b0075006d0065006e0074006500720020006b0061006e002000e50070006e006500730020006d006500640020004100630072006f0062006100740020006f0067002000520065006100640065007200200035002e00300020006f0067002000730065006e006500720065002e00200044006900730073006500200069006e006e007300740069006c006c0069006e00670065006e00650020006b0072006500760065007200200073006b00720069006600740069006e006e00620079006700670069006e0067002e> /SVE <FEFF0041006e007600e4006e00640020006400650020006800e4007200200069006e0073007400e4006c006c006e0069006e006700610072006e00610020006e00e40072002000640075002000760069006c006c00200073006b0061007000610020005000440046002d0064006f006b0075006d0065006e00740020006d006500640020006800f6006700720065002000620069006c0064007500700070006c00f60073006e0069006e00670020006600f60072002000700072006500700072006500730073007500740073006b0072006900660074006500720020006100760020006800f600670020006b00760061006c0069007400650074002e0020005000440046002d0064006f006b0075006d0065006e00740065006e0020006b0061006e002000f600700070006e006100730020006d006500640020004100630072006f0062006100740020006f00630068002000520065006100640065007200200035002e003000200065006c006c00650072002000730065006e006100720065002e00200044006500730073006100200069006e0073007400e4006c006c006e0069006e0067006100720020006b007200e400760065007200200069006e006b006c00750064006500720069006e00670020006100760020007400650063006b0065006e0073006e006900740074002e> >> >> setdistillerparams << /HWResolution [2400 2400] /PageSize [612.000 792.000] >> setpagedevice