Sei sulla pagina 1di 20

1.

Programmable Logic Controller (PLC)

Definition

A Programmable Logic Controller, or PLC for short, is simply a special computer device used for
industrial control systems. Used in many industries such as oil refineries, manufacturing lines,
conveyor systems and so on. Where ever there is a need to control devices the PLC provides a
flexible way to "softwire" the components together.

The basic units have a CPU (a computer processor) that is dedicated to run one program that
monitors a series of different inputs and logically manipulates the outputs for the desired control.
Very flexible way to be programmed while also providing the advantages of high reliability (no
program crashes or mechanical failures), compact and economical over traditional control
systems.

Introduction

A programmable logic controller (PLC) is a small, modular solid state computer with
instructions that can customized to perform a particular task. PLCs, which are commonly used
in industrial control systems (ICS) for a wide variety of industries, have largely replaced
mechanical relays, drum sequencers and cam timers.

PLCs are useful tools for repeatable processes because they have no mechanical parts
and can gather information. Each central processor unit (CPU) continually loops through an
input scan, program scan, output scan and housekeeping mode, repetitively performing a single
task while monitoring their conditions. The information can be used as a feedback to improve
the processes, some of which can be performed automatically according to the
device’s/programmers coding.

It also take up less space, able perform more complex tasks and are more customizable
than the mechanical technologies which they have replaced. Known for their ability to operate
continuously without maintenance and have had a great impact on digitizing a great many
industries, particularly manufacturing field. The very first PLC, was invented by Dick Morley in
1969 for General Motors and performed uninterrupted for 20 years before being retired.
Five programming languages are used to code PLCs, as specified by International
Electrotechnical Commission (IEC) 61131. They are Ladder Logic, Function Block Diagram
(FBD), Structured Text (ST), Instruction List (IL) and Sequential Function Chart (SFC). Should
significant code changes be required and the PLC's memory is embedded, the controller can be
recoded in place. When the PLC's memory is not embedded on the circuit board and significant
code changes are required, the memory can be removed from an exterior slot on the PLC and
replaced without requiring the assistance of a programmer on site.

PLC Block Diagram

PLC Block Diagram

Programming a PLC
In these modern times a PC with specially dedicated software from the PLC manufacturer is
used to program a PLC. The most widely used form of programming is called ladder logic.
Ladder logic uses symbols, instead of words, to emulate the real world relay logic control, which
is a relic from the PLC's history. These symbols are interconnected by lines to indicate the flow
of current through relay like contacts and coils.

The completed program looks like a ladder but in actuality it represents an electrical circuit. The
left and right rails indicate the positive and ground of a power supply. The rungs represent the
wiring between the different components which in the case of a PLC are all in the virtual world of
the CPU.

In this simplest of examples a digital input (like a button connected to the first position on the
card) when it is pressed turns on an output which energizes an indicator light.

Simple ladder logic example

The completed program is downloaded from the PC to the PLC using a special cable that’s
connected to the front of the CPU. The CPU is then put into run mode so that it can start
scanning the logic and controlling the outputs.

PLC Assembly

A programmable logic controller is a specialized computer used to control machines and


processes. Therefore, it shares common terms with typical PCs like central processing unit,
memory, software and communications. Unlike a personal desktop computer though the PLC is
designed to survive in a rugged industrial atmosphere and to be very flexible in how it interfaces
with inputs and outputs.

The components that make a PLC work can be divided into three core areas such as :
i) The power supply and rack
ii) The central processing unit (CPU)
iii) The input/output (I/O) section
Modular Rack Based

PLCs come in many shapes and sizes. They can be so small as to fit in your shirt pocket while
more involved controls systems require large PLC racks. Smaller PLCs (a.k.a. “bricks”) are
typically designed with fixed I/O points. It’s called “modular” because the rack can accept many
different types of I/O modules that simply slide into the rack and plug in.

The Power Supply and Rack

The rack is the component that holds everything together. Different sizes can hold more
modules depending on the needs of the control system. It has a backplane at the rear which
then allows the cards to communicate with the CPU. The power supply plugs into the rack as
well and supplies a regulated DC power to other modules that plug into the rack. The most
popular power supplies work with 120 VAC or 24 VDC sources.
PLC Power Supply and Rack

The Central Processing Unit (CPU)

The brain of the whole PLC is the CPU module. This module typically lives in the slot beside
the power supply. Manufacturers offer different types of CPUs based on the complexity needed
for the system.

The CPU consists of a microprocessor, memory chip and other integrated circuits to control
logic, monitoring and communications. The CPU has different operating modes. In
programming mode it accepts the downloaded program from the PC. The CPU is then placed
in run mode so that it can execute the program and operate the process.
PLC is a dedicated controller and will only process one program over and over again. One
cycle through the program is called a scan time and involves reading the inputs from the other
modules, executing the logic based on these inputs and then updated the outputs accordingly.
The scan time happens very quickly (in the range of 1/1000th of a second). The memory in the
CPU stores the program while also holding the status of the I/O and providing a means to store
values.
Input/Output (I/O) Modules

The I/O system provides the physical connection between the equipment and the PLC.
Opening the doors on an I/O card reveals a terminal strip where the devices connect.

The Modular (rack-based) PLC can be replaced and shifted from the PLC rack. In case of any
fault and maintenance purpose, the cards can be removed and reconnect properly without
replacing the entire PLC. Specific I/O cards can be chosen for custom applications.

In some PLCs there is a facility to change the rack even at the running time, without removing
the power supply. There are analoge I/O cards and discrete I/O cards and remote interface I/O
in the rack. If there is a deficiency of slots in some PLCs there are remote I/O slot to connect
one PLC with another PLC.

a) Digital/Discrete I/O
Digital/Discrete I/Os has only two states of operation ON/OFF. Process switches, pushbutton
switches, limit switches, and proximity switches are all examples of discrete sensing devices.

i) Digital Input :

When the hand switch is turned ON, current passes through the circuit which turns ON a LED
light. The light is sensed by a photosensitive device such as a phototransistor inside the
module, which in turn activates a bit (a single element of digital data) inside the PLC’s memory.
Each input channel has its own optocoupler, writing to its own unique memory register bit inside
the PLC’s memory.

Using photosensitive devices in the switching action protects the PLC processor from an
external current circuit. It isolates the circuit from peak or excess current in the external circuitry.

ii) Digital Output :


The output is given out from a PLC using a LED and when the light is emitted and there is a
photo sensing device at the other end. Which senses the light signal and turns ON the circuit.
Alternatively, small electromechanical relays may be used instead of opto-isolating
semiconductor switching elements such as transistors (DC) or TRIACs (AC).

Each output channel has its own optocoupler, driven by its own unique memory register bit
inside the PLC’s memory. Digital output cards for PLCs also typically have 4, 8, 16, or 32
channels.

b) Analog I/O

Modern PLC technology, though, is powerful enough to support the measurement, processing,
and output of analogue (continuously variable) signals. All PLC devices are digital devices, for
connecting continuous AC current to the PLC. The AC is to be converted to digital. Inside every
PLC analog to digital converters (ADC) are used to convert analog input value to digital value.
And used DACs Digital-to-Analog Converters to convert digital internal command to analog
output. Mostly analog inputs will be 4-20mA in range.
Analog I/O is commonly available for modular PLCs for many different analog signal types,
including :

• Voltage (0 to 10 volt, 0 to 5 volt)

• Current (0 to 20 mA, 4 to 20 mA)

• Thermocouple (millivoltage)

• RTD (millivoltage)

• Strain gauge (millivoltage)

Electromagnetic relay

A relay is usually an electromechanical device that is actuated by an electrical current.


Electromagnetic relays are those relay which operates on the principle of electromagnetic
attraction. It's a type of magnetic switch which uses the magnet to create a magnetic field. The
magnetic field created can be use to either open or close the switch and performing the
mechanical operation. Relays are like remote control switches and can be seen in many
applications nowadays because of their relative simplicity, longer life duration, and also proven
high reliability. Wide variety of applications that used relay throughout industry, such as in
telephone exchanges, digital computers and even automation systems.

Also known as General Propose Relay. The general-purpose relay is rated by the
amount of current its switch contacts can handle. Most versions of the general-purpose relay
have one to eight poles and can be single or double throw. A special type of high power relay,
it’s used mainly to control high voltages and currents in industrial electrical applications.
Because of these high power requirements, contactors always have double-make contacts. As
for the Time-Delay Relay, the contacts might not open or close for a certain period until the coil
has been energized. This is called delay-on-operate. Delay-on-release means that the contacts
will remain in their actuated position for a certain period until power has been removed from the
coil. A third delay is called interval timing. Contacts revert to their alternate position at a specific
interval of time after the coil has been fully energized. The timing of these actions may be a
fixed parameter of the relay, or adjusted by a knob on the relay itself, or can be remotely
adjusted through an external circuit.

The arrangement of contacts on a relay includes a form factor and a number of poles.
i) Form A : Normally Open (NO)
A contact that is Normally Open (NO), or “make” contact when it is energized. Opens
when the coil is de-energized and closes when the coil is energized. Form A contacts are
useful in applications that must switch a single power source of high current from a remote
location. A car horn, which cannot have a high current applied directly to the steering
wheel. A contact can be used to switch the high current to the horn.

ii) Form B : Normally Closed (NC)


A contact that is Normally Closed (NC) are useful in applications that require the circuit
to remain closed when the coil is not energized. When the coil is energized, it will open the
contact and break the circuit. An example of this is a machine’s motor that needs to run at
all times, but when the motor must be stopped, the operator can do so by activating a
Form B relay and breaking the circuit. Can be use in case of emergency for safety
porpose.

2. Programmable Logic Controller Ladder Diagram Programming

PLC Ladder Logic

Ladder logic is one of the big advantages of a code. In this case it's the PLC programming
language ladder logic. The user can “copy and paste” lines of ladder logic symbols from one
PLC program to another PLC program. By doing so, this will shorten the development time of a
project. When developing a new PLC program, the user does not have to invent everything from
the start. That is why user often make use of PLC program examples.

For new user, this may help them to learn the basic concept of the ladder logic and are able to
improve their understanding towards the ladder logic program.

But even though user come to a solution, there might be a smarter way to make that piece of
ladder logic. When looking at a ladder logic example, it may look different from other ladder
logic. This is due to the fact that every function the user want to implement in PLC program,
there are many different solutions.

Ladder Logic Elements


Ladder Logic Element, Description & Representation

Figure 1
X1 represent NO relay contact
Y1 represent Output relay

Figure 2
X1 represent NO relay contact
X2 represent NC relay contact
Y1 represent Output relay

Simple Start/Stop Ladder Logic Relay

The function can be used to start and stop anything.

In this ladder logic example, there are two inputs.

“Start button” or PLC input I0.0 (NO relay)


“Stop button” or PLC input I0.1 (NO relay)

The start button will activate the relay, or ladder logic relay M10.0. When the start button is
released, the relay will still be activated, because of the latch in ladder rung 2. This latching will
be broken when the stop button is activated.

Single Push Button On/Off Ladder Logic

This function is also called push on push off logic sometimes even flip-flop or toggle function. It
is the same function as the on/off button on the computer or mobile phone. When the button is
push for the first time, the output will be activated. Now, when the button is push for the second
time, the output will deactivate and turn off. The single push button has two functions: on and
off.
Example Single Push On and Off Ladder Logic

Timer and Counter Relay Ladder Logic

The timer relay sends an output signal to the counter relay so that it could counts every seconds
incrementally. After reaching certain set point, the counter will reset itself to 0. Below is the
example of the real time clock ladder logic using Timer and counter in the same ladder logic.
Example Real Time Clock Ladder Logic

Potrebbero piacerti anche