MCT 4.2 PLC
MCT 4.2 PLC
MCT 4.2 PLC
(PLC)
MED, VAST 1
The programmable logic controller
(PLC)
MED, VAST 2
Detection and sorting of components in a packing line
• The objective of this application is to detect and sort P and Q, geometrically different
components, as they move along a conveyor.
• The components are deflected into two different pathways based on their size.
• Two sensors S1 and S2 are used to sense the height and to produce a sorting signal.
• When component P is in the sort area, both sensors turn ON which will energize the
sort solenoid, thereby deflecting the component down a different conveyor.
MED, VAST 3
Detection and sorting of components in a packing line
• When component Q is in sort area, sensor S1 registers the signal and prevents the
solenoid from being energized or deactivated to revert to its original position and
hence the direct conveying of component Q.
• The problem of control engineering here is slightly difficult in traditional terms, as the
registration of the sort solenoid coil is interpreted based on the logic of signals from
the sensors S1 and S2.
• The hard-wired relay wiring and connectivity of the system determine the rules
governing the control system and actions.
• These rules are subjected to change; therefore, the traditional form of controlling the
machine involves tedious and complex configurations.
• The relay has to be hardwired to perform a specific function and often relay wiring has
to be changed or modified in order to accommodate any changes in the system
requirement.
MED, VAST 4
The programmable logic controller (PLC)
• 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 PLCs find vast applications in the control and operation of automated
manufacturing process equipment and machinery, packaging and filling
equipment, chemical mixing, conveyor systems and distillation.
MED, VAST 5
The programmable logic controller (PLC)
MED, VAST 6
The programmable logic controller (PLC)
• Most automated factories employ PLCs in plant control
applications such as the automations of production and
assembly process.
• Initially, the PLC has been used to replace logic functions, but
its ever-developing features offer several advantages over a
conventional relay type of control.
• Owing to the fact that the structure of PLC is based on the same
principles of computer architecture, it is capable of performing
other functions such as counting, logistics, numerical
applications, comparing andMED,
processing
VAST
of signals. 7
The programmable logic controller (PLC)
• The PLC is designed to withstand vibrations, temperature, humidity
and noise.
• PLC has a great advantage in that the controller can be used with a
wide range of control systems and rules can be easily modified.
MED, VAST 12
Architecture of a PLC.
MED, VAST 13
CPU
• The CPU is the brain of the PLC, consisting of a microprocessor which interprets
the input signals and carries out the control actions according to the program
stored in its memory, communicating the decisions as an action signal to the
outputs.
• Memory required for desired program is EPROM, or EEPROM plus random
access memory (RAM).
• The user normally enters the desired programs in relay ladder logic to the CPU.
• The processor receives the input data from various sensing devices, executes the
instructions according to the stored program from memory and sends appropriate
output commands to the actuators and output devices.
• The power supply unit is needed to convert the AC voltage to the low DC voltage
necessary for the processor and to supply power to other circuits in the input and
output interface modules.
•
EPROM- erasable programmable read-only memory
EEPROM - a read-only memory whose contents can be erased and reprogrammed using a pulsed
voltage.
MED, VAST 14
CPU
• The function of the CPU is to control and process all the operations of
memory and I/O data in the system in accordance with the program.
• The CPU also houses the communication of circuits and power supply.
• The CPU executes the operating system, manages memory, monitors inputs,
evaluates the user logic and turns ON appropriate outputs. In order to do this, the
PLC is provided with a clock signal to sequence its internal operations.
• The internal paths along which signals flow are called buses. These buses
essentially carry the information in the digital form.
• There are three types of buses required in a PLC:
• 1. Data buses for communicating data between elements.
• 2. The address buses to read the address of locations for accessing stored data.
• 3. Control buses for internal control actions.
MED, VAST 15
CPU
• The essential elements of a microprocessor are as follows:
• 1. The CPU module contains the microprocessor and its associate
control circuitry. The control circuitry includes all the components
(excluding memory and peripherals) that must be connected to the
microprocessor to enable it to function.
• The CPU therefore must perform the following three tasks:
➢ provide a mechanism for fetching instructions from memory prior to
execution (communication with memory);
➢ include logic which decodes the operation code of each instruction
to generate a low-level control signal which performs data
manipulation specified by the instruction (interpretations of
instructions);
➢ mechanism for performing the data manipulation required by the
instruction set of the computer (execution of instruction).
MED, VAST 16
CPU
• 2. Monitors or registers are parts of the microprocessor, used for temporary
storage of data and address within CPU. A register is a byte (8 bits) or a word
(16 bits) or a long word (32 bits) of a memory.
• 3. Arithmetic logic unit (ALU): The ALU is responsible for data manipulation
and performs arithmetic and logical operations such as addition and subtraction.
In addition, the ALU contains a number of control inputs which specify the data
manipulation function to be performed. ALU is a combinational logic circuit,
whose output is an instantaneous function of its data and control inputs. It has no
storage facility.
• 4. Control unit: The control unit is used to control the timing of operation and to
control the units within the microprocessor to ensure that operations are carried
out in the correct order.
MED, VAST 17
The Programming Device
• The programming device is used to enter the required program
MED, VAST 19
Memory Unit
• The memory unit is where the rules are stored in the form of binary digits at
individual locations that are to be used for the control actions by the
microprocessor.
• There are two main types of memory, namely RAM and read-only memory
(ROM).
• There is a need to provide a battery backup in order to prevent loss of any data
• The ROM is designed for PC operating system so that the information stored in
addresses.
specific functions:
• There are several memory elements in the PLC system and they are divided into two
categories:
• 1. volatile;
• 2. non-volatile.
• The volatile memory will lose its stored information if power is disrupted and can be
easily altered, whereas non-volatile memory could provide the ability to retain the
• Some of the PLCs are used to hold system memory and some are used to hold user
memory.
MED, VAST 22
The broad classification of memory
unit.
MED, VAST 23
Memory Unit
• 1. RAM:
• RAM is for the user's program and data storage.
• It is designed so that information can be written into or read from the
memory and normally incorporated in the solid-state form contained in
an integrated circuit.
• Dynamic RAMs refreshed typically by external refresh circuits can
hold data for few million seconds. Pseudo-static RAMs are refreshed
internally, whereas the static RAM stored the data flip-flops.
• 2. ROM: (read-only memory ) The internal use and operation of the
PLC require ROM to give permanent storage for the operation
system.
• This non-volatile memory normally is designed so that the
information stored in the memory can only be read and cannot be
MED, VAST 24
changed.
Memory Unit
• 3. Programmable Read-Only Memory (PROM):
• PROM is a special type of ROM and allows initial and/or additional information to be
written into the chip and can be written into only once after being received from the
manufacturer.
programmer.
• It can be reprogrammed after having entirely erased with the use of an ultraviolet light
source.
• EEPROM: EEPROM is a non-volatile memory that can be erased using electrical pulses
MED, VAST 25
rather than ultraviolet light. The EEPROM can be electrically overwritten with new data.
I/O Unit
• The input and output sections are where
the processor receives information from
external devices and communicates
information to the external devices.
MED, VAST 26
I/O Unit
• In fixed I/O module the I/O terminals cannot be changed,
whereas in the modular system, there are several compartments
into which the I/O modules can be plugged.
MED, VAST 27
I/0 Processing
• The I/O unit provides the interface between the system and the outside
world, allowing for connections to be made through I/O channels to input
devices such as sensors and output devices such as motors and solenoids.
• The I/O unit provides the interface between the PLC and the I/O file
devices.
• The I/O channels provide signal interface so that sensors and actuators can
be directly connected to the PLC without the need for other circuitry.
• 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.
• The input signal from sensors and output to actuating devices can be
anyone of the following or a combination:
• 1. analog;
• 2. discrete/digital.
MED, VAST 28
Various input devices/sensors
• 1. Digital/discrete input • 2. Analog input devices:
devices: • potentiometer;
• mechanical switches; • linear variable
differential transformer;
• proximity switches; . • strain gauges;
• photoelectric switches; . • Temperature sensors;
• encoders; • Pressure sensors;
• liquid-level detector;
• temperature switches; .
• fluid flow measurement
• pressure switches. devices.
MED, VAST 29
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.
Points
➢continuous updating
➢mass input/output copying
➢I/O addresses
MED, VAST 30
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.
• This delay enables the microprocessor to avoid counting an
input signal twice, or, more frequently, if there is contact
bounce at a switch.
• A number of inputs may have to be scanned, each with a 3
ms delay, before the program has the instruction for a logic
operation to be executed and an output to occur.
Disadvantage : 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
MED, VAST 31
Mass input/output copying
• 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.
• At the start of each program cycle the CPU scans all the inputs
and copies their status into the input/output addresses in RAM.
• As the program is executed the stored, input data is read, as
required, from RAM and the logic operations carried out.
• The resulting output signals are stored in the reserved
input/output section of RAM.
• At the end of each program cycle all the outputs are transferred
from RAM to the output channels.
• The outputs are latched so that they retain their status until the
next updating.
MED, VAST 32
Mass input/output copying
• The sequence is:
• 1 Scan all the inputs and copy into RAM.
• 2 Fetch and decode and execute all program
instructions in sequence, copying output
instruction to RAM.
• 3 Update all output
• 4 Repeat the sequence.
➢A PLC takes time to complete a cycle of scanning inputs and updating
outputs according to the program instructions and so the inputs are not
watched all the time but only examined periodically.
➢A typical PLC cycle time is of the order of 10 to 50 ms and so the inputs
and outputs are updated every 10 to 50 ms.
➢Thus for a PLC with a cycle time of 40 ms, the maximum frequency of
digital impulses that can be detected will be if one pulse occurs every 40
MED, VAST 33
ms.
Ladder programming.
• PLC programming based on the use of ladder diagrams involves
writing a program in a similar manner to drawing a switching circuit.
• This involves each program task being specified as though a rung of
a ladder.
• 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.
• 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. MED, VAST 34
Ladder programming.
(a), (b) Alternative ways of drawing an electric circuit, (c) comparable rung in a ladder program.
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.
MED, VAST 35
Ladder programming.
MED, VAST 37
Temperature control system
➢ On/off temperature control in which the input goes from low to high when the temperature
sensor reaches the set temperature.
➢ The output is then to go from on to off
➢ The temperature with output to an operational amplifier connected as a comparator
➢ The program shows the input as a normally closed pair of contacts, so giving the on signal and
hence an output.
➢ When the contacts are opened to give the off signal then the output is switched off.
MED, VAST 38
Logic functions
MED, VAST 40
Design a ladder program where a normally open switch A
must be activated and either of two other, normally open,
switches Band C must be activated for a coil to be energized.
MED, VAST 41
Latch circuit
MED, VAST 44
Internal relays
MED, VAST 49
(a, ON delay; (b) OFF delay; (c) pulse delay
TON
MED, VAST 55
Counters
• Counters allow a number of occurrences of input signals to count
or record the number of times some event occurs.
• Counters are used when there is a need to count a specified
number of contact operations.
• e.g. where items pass along a conveyor into boxes, and when the
specified number of items has passed into a box, the next item is
diverted into another box.
• PLCs include some form of counting element and are set to some
preset number value.
• When this value of input pulses has been received, it will operate
its contact, the NO contacts would be closed and an NC contact
would be opened.
• There are two types of counters, namely, down counters and up
counters.
• Down-counters count down from the preset value to zero and up-
counters count from zero up to the preset value.
MED, VAST 56
Counters
MED, VAST 61
Control of a Process Tank
MED, VAST 62
Ladder diagram to achieve the operation of process tank
MED, VAST 65
MED, VAST 66
MED, VAST 67
MED, VAST 68
MED, VAST 69