0% found this document useful (0 votes)
415 views

PLC PPT MAIN

Uploaded by

debnath35/11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
415 views

PLC PPT MAIN

Uploaded by

debnath35/11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 46

PLC

(Programmable logic controllers)


Programmable logic controller:
• A programmable logic controller (PLC) is a digital electronic
device that uses a programmable memory to store
instructions and to implement functions such as logic,
sequencing, timing, counting and arithmetic in order to
control machines and processes and has been specifically
designed to make programming easy.
• The term logic is used because the programming is primarily
concerned with implementing logic and switching operations.
• Inputs devices, e.g. switches, and output devices, e.g. motors,
being controlled are connected to the PLC and then the
controller monitors the inputs and outputs according to the
program stored in the PLC by the operator and so controls the
machine or process.
• PLCs are similar to computers but have certain features
which are specific to their use as controllers. These are:
1. They are rugged and designed to withstand
vibrations, temperature, humidity and noise.

2. The interfacing for inputs and outputs is inside the


controller.

3. They are easily programmed and have an easily


understood programming language. Programming is
primarily concerned with logic and switching
operations.
Basic PLC Structure
• Figure shows the basic internal structure of a PLC. It consists
essentially of a central processing unit (CPU), memory, and
input/output interfaces.
• The CPU controls and processes all the operations within the
PLC. It is supplied with a clock with a frequency of typically
between 1 and 8 MHz.
• This frequency determines the operating speed of the PLC and
provides the timing and synchronization for all elements in the
system.
• A bus system carries information and data to and from the CPU,
memory and input/output units.
• There are several memory elements: a system ROM to give
permanent storage for the operating system and fixed data,
RAM for the user's program, and temporary buffer stores for
the input/output channels.
Fig: Architecture of a PLC
Input/output
• The input and output units provide the interface between the
system and the outside world and are where the processor
receives information from external devices and
communicates information to external devices.
• The input/output interfaces provide isolation and signal
conditioning functions so that sensors and actuators can
often be directly connected to them without the need for
other circuitry.
• Inputs might be from limit switches which are activated when
some event occurs, or other sensors such as temperature
sensors, or flow sensors.
• The outputs might be to motor starter coils, solenoid valves,
etc. Electrical isolation from the external world is usually by
means of optoisolators
•Figure shows the basic form of an
input channel.

•The digital signal that is generally


compatible with the microprocessor
in the PLC is 5 V d.c.

•However, signal conditioning in the


input channel, with isolation, enables
a wide range of input signals to be
supplied to it.

Fig: Input channel


• The terms sourcing and sinking are used to describe the way in which d.c. devices
are connected to a PLC. With sourcing, using the conventional current flow
direction as from positive to negative, an input device receives current from the
input module (Figure (a)).

• If the current flows from the output module to an output load then the output
module is referred to as sourcing (Figure (b)). With sinking, an input device supplies
current to the input
• module (Figure 14.3(c)).

• If the current flows to the output module from an output load then the output
module is referred to as sinking (Figure (d)).

Fig: (a), (b) Sourcing, (c), (d) sinking


Inputting programs:
• Programs are entered into the input/output unit from
small hand-held programming devices, desktop
consoles with a visual display unit (VDU), keyboard and
screen display, or by means of a link to a personal
computer (PC) which is loaded with an appropriate
software package.

• Only when the program has been designed on the


programming device and is ready is it transferred to the
memory unit of the PLC.
Forms of PLCs:

• PLCs were first conceived in 1968. They are now widely


used and extend from small self-contained units, i.e.
single boxes, for use with perhaps 20 digital
input/outputs to rack-mounted systems which can be
used for large numbers of inputs/outputs, handle digital
or analogue inputs/outputs, and also carry out
proportional plus integral plus derivative (PID) control
modes.
Input/output processing
• A PLC is continuously running through its program
and updating it as a result of the input signals.
• Each such loop is termed a cycle.
• There are two methods that can be used for
input/output processing:
• continuous updating
• and mass input/output copying
Continuous updating:
• Continuous updating involves the CPU scanning the
input channels as they occur in the program
instructions.

• Each input point is examined individually and its


effect on the program determined.

• There will be a built-in delay, typically about 3 ms,


when each input is examined in order to ensure that
only valid input signals are read by the
microprocessor.
Mass input/output copying:
• Because, with continuous updating, there has to
be a 3 ms delay on each input, the time taken to
examine several hundred input/output points
can become comparatively long. To allow a more
rapid execution of a program, a specific area of
RAM is used as a buffer store between the
control logic and the input/output unit.
• Each input/output has an address in this
memory.
Input/output addresses:
• The PLC has to be able to identify each particular
input and output and it does this by assigning
addresses to each, rather like houses in a town
have addresses to enable post to be delivered to
the right families.
Ladder Logic means
• Ladder logic was originally a written method to document
the design and construction of relay racks as used in
manufacturing and process control. Each device in the relay
rack would be represented by a symbol on the ladder
diagram with connections between those devices shown.

Ladder diagram, better known as ladder logic, is a programming


language used to program PLCs (programmable logic controllers).
... Contacts are placed in series to represent AND logic and in
parallel when using OR logic. As with real relays, there are
normally open contacts and normally closed contacts.
Ladder programming
• The form of programming commonly used with
PLCs is ladder programming.
• This involves each program task being specified as
though a rung of a ladder.
• Thus such a rung could specify that the state of
switches A and B, the inputs, be examined and if A
and B are both closed then a solenoid, the output,
is energized.
• Figure illustrates this idea by comparing it with an
• electric circuit.
The sequence followed by a PLC when carrying out a
program can be summarized as follows.
1 Scan the inputs associated with one rung of the ladder
program.
2 Solve the logic operation involving those inputs.
3 Set/reset the outputs for that rung.
4 Move on to the next rung and repeat operations 1, 2, 3.
5 Move on to the next rung and repeat operations 1, 2, 3.
6 Move on to the next rung and repeat operations 1, 2, 3.
7 And so on until the end of the program with each rung of
the ladder program scanned in turn. The PLC then goes
back to the beginning of the program and starts again.
• PLC programming based on the use of ladder diagrams involves writing a
program in a similar manner to drawing a switching circuit.

• The ladder diagram consists of two vertical lines representing the


power rails.

• Circuits are connected as horizontal lines, i.e. the rungs of the ladder,
between these two verticals.

• Figure shows the basic standard symbols that are used and an example
of rungs in a ladder diagram.

• In drawing the circuit line for a rung, inputs must always precede
outputs and there must be at least one output on each line.

• Each rung must start with an input or a series of inputs and end with an
output.
Figure : Ladder program
Figure: Switch controlling a solenoid
• To illustrate the drawing of a ladder diagram, consider a situation where the
output from the PLC is to energies a solenoid when a normally open start
switch connected to the input is activated by being closed (Figure(a)).
• The program required is shown in Figure(b)).
• Starting with the input, we have the normally open symbol ||. This might
have an input address X400. The line terminates with the output, the
solenoid, with the symbol ( ). This might have the output address Y430. To
indicate the end of the program, the end rung is marked.
• When the switch is closed the solenoid is activated.
• This might, for example, be a solenoid valve which opens to allow water to
enter a vessel.
Figure: Temperature control system
Logic functions
• The logic functions can be obtained combinations of switches (see Section 5.2)
and the following shows how we can write ladder programs for such
combinations (Figure).

Figure : (a) AND, (b) OR, (c) NOR, (d) NAND, (e) XOR
1 AND Figure (a) shows a situation where a coil is not energized
unless two, normally open, switches are both closed. Switch
A and switch B have both to be closed, which thus gives an
AND logic situation. The equivalent ladder diagram starts
with ||, labelled Input 1, to represent switch A and in series
with it ||, labelled Input 2, to represent switch B. The line
then terminates with ( ) to represent the output.

2 OR Figure (b) shows a situation where a coil is not energised


until either, normally open, switch A or B is closed. The
situation is an OR logic gate. The equivalent ladder diagram
starts with ||, labelled Input 1, to represent switch A and in
parallel with it ||, labelled Input 2, to represent switch B. The
line then terminates with ( ) to represent the output.
3 NOR Figure (c) shows how we can represent the ladder
program line for a NOR gate. Since there has to be an
output when neither A nor B have an input, and when
there is an input to A or B the output ceases, the ladder
program shows Input 1 in parallel with Input 2, with both
being represented by normally closed contacts.

4 NAND Figure (d) shows a NAND gate. There is no output


when both A and B have an input. Thus for the ladder
program line to obtain an output we require no inputs to
Input 1 and to Input 2.
5 EXCLUSIVE-OR (XOR) Figure(e) shows how we can draw
the ladder program line for an XOR gate, there being no
output when there is no input to Input 1 and Input 2 and
when there is an input to both Input 1 and Input 2. Note
that we have represented each input by two sets of
contacts, one normally open and one normally closed.
• Consider a situation where a normally open switch
A must be activated and either of two other,
normally open, switches B and C must be activated
for a coil to be energised.
• We can represent this arrangement of switches as
switch A in series with two parallel switches B and C
(Figure (a)).
• For the coil to be energised we require A to be
closed and either B or C to be closed. Switch A when
considered with the parallel switches gives an AND
logic situation.
• The two parallel switches give an OR logic situation.
We thus have a combination of two gates.
• The truth table is:
Fig: Switches controlling a solenoid

For the ladder diagram, we start with ||, labelled Input 1, to represent
switch A. This is in series with two || in parallel, labelled Input 1 and
Input 2, for switches B and C. The line then terminates with ( ) to
represent the output, the coil. Figure (b) shows the line.
• As a simple example of a program using logic gates,
consider the requirement for there to be an output
to the solenoid controlling the valve that will open a
shop door when the shopkeeper has closed a switch
to open the shop and a customer approaches the
door and is detected by a sensor which then gives a
high signal. The truth table for this system is thus
• This truth table is that of an AND gate and thus
the program for a PLC controlling the door is as
shown in Figure

Fig: Shop door system


Timers and Counters
• However, there are tasks which can involve time
delays and event counting. These requirements
can be met by the timers and counters which are
supplied as a feature of PLCs. They can be
controlled by logic instructions and represented
on ladder diagrams.
• TIMER: A common approach used by PLC
manufacturers is to consider timers to behave like
relays with coils which when energised result in
the closure or opening of contacts after some
preset time.
• The timer is thus treated as an output for a rung
with control being exercised over pairs of
contacts elsewhere (Figure(a)). Others consider a
timer as a delay block in a rung which delays
signals in that rung reaching the output (Figure
(b)).

Figure: (a), (b) Delay-on timer


DATA HANDLING
Data handling is the process of ensuring that
research data is stored, archived or disposed off in a safe and
secure manner during and after the conclusion of a research
project. This includes the development of policies and procedures
to manage data handled electronically as well as through non-
electronic means.

• The previous parts of this chapter have been concerned with


the handling of individual bits of information, e.g. a switch being
closed or not. There are, however, some control tasks where it is
useful to deal with related groups of bits, e.g. a block of eight
inputs, and so operate on them as a data word. Such a situation
can arise when a sensor supplies an analogue signal which is
converted to, say, an 8-bit word before becoming an input to a PLC.
The operations that may be carried out with a
PLC on data words
• normally include:
• 1 moving data;
• 2 comparison of magnitudes of data, i.e.
greater than, equal to, or less than;
• 3 arithmetic operations such as addition and
subtraction;
• 4 conversions between binary-coded decimal
(BCD), binary and octal.
Data movement
• For data movement the instruction will contain the move data
instruction, the source address of the data and the
destination address of the data. Thus the ladder rung could be
of the form shown in Figure.
• Such data transfers might be to move a constant into a data
register, a time or count value to a data register, data from a
data register to a timer or counter, data from a data register
to an output, input data to a data register, etc.
Data comparison
For example, an alarm might be required to
be sounded if a sensor indicates a
temperature above 80°C and remain
sounding until the temperature falls below
70°C. Figure 14.32 shows the ladder
program that could be used. The input
temperature data is inputted to the source
address and the destination address
contains the set value. When the
temperature rises to 80°C, or higher
Arithmetic operations
• Some PLCs can carry out just the arithmetic operations of
addition and subtraction, others have even more arithmetic
functions. The instruction to add or subtract generally states
the instruction, the register containing the address of the
value to be added or subtracted, the address of the value to
which the addition or from which the subtraction is to be
made and the register where the result is to be stored. Figure
shows the form used for the ladder symbol for addition with
OMRON.
Code conversions
• All the internal operations in the CPU of a PLC are carried out
using binary numbers. Thus, when the input is a signal which is
decimal, conversion to BCD is used. Likewise, where a decimal
output is required, conversion to decimal is required. Such
conversions are provided with most PLCs. For example, with
Mitsubishi, the ladder rung to convert BCD to binary is of the
form shown in Figure. The data at the source address is in BCD
and converted to binary and placed at the destination address.
Shift Registers
• The term register is used for an electronic
device in which data can be stored. An internal
relay, see Chapter 7, is such a device.
The shift register is a number of internal relays
grouped together which allow stored bits to
be shifted from one relay to another. This
chapter is about shift registers and how they
can be used where a sequence of operations is
required or to keep track of particular items in
a production system.
Shift Registers
• A register is a number of internal relays grouped together, normally 8, 16 or
32. Each internal relay is either effectively open or closed, these states being
designated as 0 and 1. The term bit is used for each such binary digit.
Therefore, if we have eight internal relays in the register we can store eight
0/1 states. Thus we might have:

• and each relay might store an on-off signal such that the state of the register
at some instant is:

• i.e. relay 1 is on, relay 2 is off, relay 3 is on, relay 4 is on, relay 5 is off, etc.
Such an arrangement is termed an 8-bit register. Registers can be used for
storing data that originate from input sources other than just simple, single
on-off devices such as switches.
• With the shift register it is possible to shift stored bits. Shift registers require
three inputs, one to load data into the first location of the register, one as the
command to...
Internal Relays
• This chapter continues on from the previous
chapters on programming and introduces internal
relays. A variety of other terms are often used to
describe these elements, e.g. auxiliary relays,
markers, flags, coils, bit storage. These are one of
the elements giving special built-in functions with
PLCs and are very widely used in programming. A
small PLC might have a hundred or more internal
relays, some of them being battery backed so that
they can be used in situations where it is necessary
to ensure safe shutdown of plant in the event of
power failure. Later chapters consider other
common built-in elements.
Internal Relays
• In PLCs there are elements that are used to hold data, i.e. bits,
and behave like relays, being able to be switched on or off and
switch other devices on or off. Hence the term internal
relay. Such internal relays do not exist as real-world switching
devices but are merely bits in the storage memory that behave
in the same way as relays. For programming, they can be
treated in the same way as an external relay output and input.
Thus inputs to external switches can be used to give an output
from an internal relay. This then results in the internal relay
contacts being used, in conjunction with other external input
switches to give an output, e.g. activate a motor. Thus we
might have (Figure ):
• On one rung of the program:
– Inputs to external inputs activate the internal relay output.

You might also like