BASIC PLC LAYOUT
Introduction to Programmable Logic Control.
The PLC, or Programmable Logic Controller, is a microprocessor based replacement for the
older control systems that used a large number of relays, timers and time delays. The outputs
from the PLC to control large motors etc will still go via large relays or contactors to
handle the large currents involved, but all the other relays, timers etc used to implement
the actual control system will be replaced by the PLC itself.
The method of drawing circuit diagrams involving large numbers of control relays, timers etc
came to be known as a LADDER DIAGRAM, because the Live and Neutral went down each side of
the drawing and the relay circuits went across like the rungs of a ladder.
A simple example is shown here of a motor ON/OFF switch. The ON push button switches RELAY 1
on, it is held on by it's own contact RL1/1 and the normally closed OFF button. When the
OFF button is pressed, the circuit is broken and RELAY 1 drops off. A second contact of
RELAY 1, RL1/2, switches the CONTACTOR which controls the MOTOR on and off.
This method of LADDER DIAGRAM representation is also used in PLC programming either as an
option or, as in the case of the TOSHIBA EX20 PLUS which we will use as an example, the
only method of circuit input. The advantage of retaining this type of input was the large
number of people, working in the control systems industry, who were already familiar with
the method, and who would be able to move over to the new technology relatively easily due
to this familiarity.
Relay logic control systems could be quite complex, especially those involving machinery
control and the protection of the operators of those machines. The example given here is
greatly simplified, but shows how quickly the complexity can increase. In this example the
motor control switch of the first example is combined with a coolant on/off switch and a
micro-switch which detects when the safety guard is in place. The circuit will not allow
the motor contactor to close even if on is pressed until the safety guard is down and the
coolant pump is running.
There now follows a rather odd example which might help to make clear the way in which PLC's
operate. A security man walks round a building and makes a list of all the offices empty
after people have gone home. Then he returns to his office and, using the list of empty
offices and his instructions, he makes a list of all switches to put on in the alarm system.
(This is a very complex alarm system with each room as a separate area!!) He then goes to
the alarm system panel and sets all the switches according to his list.....Later he walks
round the building again and makes a new list of empty rooms. Then he returns to his office
and, using the list of empty offices, his instructions and the list of what is already
switched from last time round, he makes a list of all switches to put on in the alarm system.
Finally he goes to the alarm system panel and sets switches according to his list. He then
sets off immediately to repeat the process because he is acting like a PLC and not a security
The second example is of a simple PLC system illustrating the same points as the story above.
Suppose four switches, labelled X0, X1, X2 and X3 were connected to the PLC as shown below.
Three lights operated by relays Y0, Y1 and Y2 inside the PLC are also connected.
This is the description of the PLC program for this example.
START: Read SWITCHES X0, X1, X2 and X3 and save the values in the table.
THEN: Do the following, IF X0 is ON THEN fill in Y0 in the table to be ON, OTHERWISE fill
Y0 in to be OFF.
IF X1 is ON THEN fill Y1 in the table to be OFF, OTHERWISE fill Y1 in to be ON.
IF X2 and X3 are BOTH ON fill Y2 in the table to be ON, OTHERWISE fill Y2 in to be OFF.
FINALLY: SET the RELAYS Y0, Y1 and Y2 to the values in the table. GO BACK to START to begin
The complete cycle of reading the inputs into a table, processing and writing results to a
table, and finally updating outputs is called a SCAN and the time taken to do it depends on
the amount of processing to do, in both examples!
Relating this to the PLC, scan times increase with the number of "rungs" in the LADDER
DIAGRAM. This will not normally be a problem but it is an area where the difference between
the real relays, timers etc of the old systems and the software versions of the PLC. The
scan time in the TOSHIBA EX20 PLUS, which is used as the PLC for this course, could be as
long as 20mS.
The process of SCANNING is illustrated in the diagram below.
ONE COMPLETE SCAN
Facilities of the TOSHIBA EX20 PLUS PLC.
The TOSHIBA EX20 PLUS is an example of an industrial standard PLC. It has been supplied in
a case with external switches and lamps as a training aid. The PLC inside is a standard
unit. The connections for the inputs are on the terminal strip at the top.
O O O O O O O O O O O O O O O O O O O O
L N N G S + C X X X X X X X X X X X X C
I 1 2 N T D O 0 0 0 0 0 0 0 0 0 0 0 0 O
V 0 0 D O C M 0 0 0 0 0 0 0 0 1 1 1 1 M
E 0 0 P O M 0 1 2 3 4 5 6 7 0 1 2 3 M
The input type used here is called a DRY CONTACT. Switches are connected between the "X"
connection and COMMON. ON is switch contact closed and OFF is switch contact open. The
circuit of the input is such that an open collector output could be used in place of the
switch, making connection to external sensors other than switches much easier. The LED
associated with each switch input is ON when the switch is ON, giving a visual check on
the input devices, which is very useful as they may be some distance from the PLC in an
industrial control situation. The Mains input terminals allow connection to 110 or 240
volts by connecting the neutral side to either the "100" or the "200" terminal. The +DCO
terminal is an output from the internal power supply but isolated from the internal +5 Volt
logic supply. This may be used to supply external devices needing power such as sensors
providing the total current taken does not exceed 100 mA.
The connections for the outputs are on the lower terminal strip. The output type used here
is RELAY CONTACT.
O O O O O O O O O O O O O O O O O O O O
NC NC R0 R1 R2 R3 R4 R5 R6 R7
The relay contacts are brought out to the pairs of terminals as labelled above. The LED
associated with each output is lit when the relay contacts are closed. The maximum load
current that can be handled by the contacts is 2 A (resistive) or 1 A (inductive). The
group of five LEDs in centre panel are used to indicate the status of the PLC unit.
The PROM LED on indicates that a PROM is plugged in under the cover marked "REMOVE COVER
TO INSERT ROM". The ROM is a semiconductor device used to store the PLC program as an
alternative to the RAM memory in the PLC. These devices provide a convenient way of
programming production PLCs as the code is easily changed by swapping the ROM, but cannot
be altered at the shop floor level.
The LOW BATT LED on indicates that the internal battery needs changing. It has a normal
life of about five years. It is used to retain the program in RAM, and any special data,
during periods of no mains power. These could be when the PLC is intentionally switched off,
or during a mains failure.
The ERROR LED on indicates that an error has been detected during the running of the program
in the PLC. This can be due to electrical noise, so precautions have to be taken in routing
of PLC cables and in the GND connection point used. Details about the best practice are
included in the manual with the PLC. If the LOW BATT LED is on as well, it means that the
battery failed during the running of the program.
The RUN LED on means that the HALT/RUN switch is in the RUN position causing the PLC to
execute, or carry out, the instructions in its program. If the STOP LINE is grounded during
the running of the program; the program stops and the RUN LED flashes until the STOP LINE
is disconnected from ground again.
The POWER LED on indicates that the mains power is connected and within tolerance to operate
the PLC circuits.
It can be seen from the above that a great deal of information about both the status of the
PLC and the state of the inputs and outputs is available from the LEDs on the top of the
PLC case. The socket at the right of the PLC top panel is marked PROGRAMMER and is where
the cable from the handheld LCD PROGRAMMER is plugged in.
How to power on and run the EX20 PLUS PLC.
The power to the PLC should be switched on and the HALT/RUN switch turned to the RUN position
without the LCD PROGRAMMER plugged in. The program previously loaded into the RAM, or
memory, will now run. The operation of the program can be checked. Switch ON the switch
marked X0. Relay Y0 will come ON, if X0 is switched OFF, Y0 will go OFF again. This is
not a very complicated program but it will illustrate some points about the use of the
PLC. Now plug in the LCD PROGRAMMER and look at the screen.
The screen has the version number of the device, the state of the HALT/RUN switch and a
"little flashing underline". This underline is known as a cursor and marks where the next
thing typed will appear on the screen. Now press the key marked ,
the screen will change to
MAIN UNIT V.1.1
The version number of the main unit, i.e. the PLC, is displayed along with the cursor as
before. Now press the same key again.
The display changes to show the first, and in this case the only, screen of the program.
A "screen" is a maximum of eight lines and is the most that can be fitted onto the display,
so all programs are thought of as being made up of screens. This does not affect the program
in the PLC which is one continuous unit but is for the user's convenience in programming.
The screen can be between one and eight lines to fit whatever logical pattern we want use,
as the number of screens is unlimited up to the maximum number of devices, i.e. switches,
relays etc that can be stored for one complete program.
| - |
The screen shows the state of the HALT/RUN switch and the state of the PROGRAMMER which
is MONIT, short for monitor. This means that the operation of the program is being "looked
at" or monitored. The space underneath this information can contain up to eight lines of
circuit diagram drawn in LADDER DIAGRAM form. The circuit here shows switch X000 connected
to relay Y000. When the switch is operated the display alters to include some "little
dashed lines" inside the switch symbol and inside the relay symbol. This is to indicate
that these devices are active at the moment. This shows that one of the uses of the LCD
PROGRAMMER is to help check out faulty systems, as the circuit diagram is loaded down from
the PLC into the LCD PROGRAMMER by pressing the keys that were pressed at the start of this
description. After loading the circuit its operation can be monitored by checking whether
devices are active or not as the program runs.