Unit-I Introduction To PLC: What Is The Programmable Logic Controller (PLC) ?
Unit-I Introduction To PLC: What Is The Programmable Logic Controller (PLC) ?
Unit-I Introduction To PLC: What Is The Programmable Logic Controller (PLC) ?
INTRODUCTION TO PLC
What is the Programmable Logic Controller
[PLC]?
PLC is a solid-state control device or computerized industrial controller that
performs discrete or sequential logic in the factory or automation
environment.
Basically, PLC is a combination of software and hardware. It acts as the brain of the
machine or system for automation control systems.
The input/output modules in PLC are of two types. It can be either digital or analog.
Just like any other device or machine, we have to provide input to the PLC controller.
It yields output. For example, when the user presses a button, the motor starts. Here
the switch button is input. The motor is an output device .In PLC, to take the input
and to return the output, there are an I/O modules. The input modules are used for
providing an interface for input devices like different types of switches (push button
switch, selector switch, limited switch), sensors, etc. The output modules are used
for providing an interface for output devices like motor, fan, relay, light, lamp,
electric heater, solenoid valve, buzzer, etc.
2. Power Supply:
For PLC, we need an electrical power supply. The power supply provides power to all
other components to operates. It provides power to the input/output modules,
memory system, and processor. The function of the power supply is to provide the
DC or AC power to operate the PLC. Most of the PLCs work at 220VAC or 24VDC.
Central Processing Unit is the heart of the PLC system. The function of the CPU is to
store and run the PLC software programs. It helps to perform the basic arithmetic,
logic, controlling, and input/output operations specified by the instructions. It
consists of the three subparts as memory, processor and power supply.
4. Memory System:
A memory system is responsible for storing and retrieving data and information.
5.Programming Device:
It is the platform where the program or the control logic is written. It can be a
handheld device or a laptop or a computer itself.
If you look at the below PLC designing structure, it looks more like a rack. So, it is also
called as rack-mounted PLC.
Among all of them, mostly Ladder diagram (LD) programming language is used in the
industry.
Ladder diagram (LD) is also known as “Ladder Logic“. It is used with programmable
logic controllers. Generally, Ladder diagram is most popular all over the world
(including India). This language is easy to learn. If you look at the ladder diagram, it
looks similar to the electrical circuit diagram.
Advantages of LD:
•LD is simple logic construction and more reliable than an electronic circuit
controller.
• Easy to troubleshoot
•Shut down the power without the switch (i.e. hardware devices)
Instruction List (IL) is another type of PLC programming language. It uses the
mnemonic code. So the syntax of this programming language is easy to remember. In
general, AB PLC brand works on the Instruction List (IL) programming language.
Advantages of IL:
The “ST” and “STX” are also other abbreviations used for Structured Text PLC
language. It uses high-level programming language syntax. The syntax of ST is similar
to the syntax of a high-level programming language with loops, variables, conditions,
and operators.
Advantages of ST:
•ST is very easier to understand for both novice and experienced programmers.
•Because of its standard coding format, it is easy to edit and modify program written
in ST language.
Function block diagram (FBD) is a popular and easy way to write a program like a
Ladder Diagram. FBD is represented like box which consists of a number of lines of
code for putting different programming functions. It is a graphical language for
programming logic controller. So, it makes your job easy to describe a system.
• Input/ Output Section: The input section or input module consists of devices like
sensors, switches and many other real world input sources. The input from the
sources is connected to the PLC through the input connector rails. The output
section or output module can be a motor or a solenoid or a lamp or a heater,
whose functioning is controlled by varying the input signals.
• CPU or Central Processing Unit: It is the brain of the PLC. It can be a hexagonal or
an octal microprocessor. It carries out all the processing related to the input
signals in order to control the output signals based on the control program.
• Programming Device: It is the platform where the program or the control logic is
written. It can be a handheld device or a laptop or a computer itself.
• Power Supply: It generally works on a power supply of about 24 V, used to power
input and output devices.
• Memory: The memory is divided into two parts- The data memory and the
program memory. The program information or the control logic is stored in the
user memory or the program memory from where the CPU fetches the program
instructions. The input and output signals and the timer and counter signals are
stored in the input and output external image memory respectively.
Working of the Programmable Logic Controller
The most important working principle is- the PLC is operated by continuously
scanning programs. Scanning happens every time per millisecond. So, it is called as
the Scan Cycle.
For this scan cycle, PLC required a little amount of time in the range of milliseconds
or ms.
Firstly, PLC reads the on/off status of the external input signals. After scanning the
input, it gets stored in the input memory. This input included switches, pushbuttons,
proximity sensors, limit switches, pressure switches, etc.
This scanned input gets transferred to the CPU for processing from input memory.
The processor executes the programming instructions based on the input. After the
execution, the result (on/off) will be stored in the device memory.
When the program executes the last instruction, it will send the on/off status to the
output device memory. The outputs include solenoids, valves, motors, actuators, and
pumps.All three steps get completed under the scan time. The amount of time is
taken by the processor to read/sense the first input and execute the last output
called the Scan time. PLC is so fast as it can easily scan and execute the program in
few milliseconds i.e. 10-15 milliseconds.
Memory Structure of PLC
It consists of different sections like user program, system data, memory-mapped for
input and output and operating system.
The input device provides a signal to an input module. This input module is
connected with the CPU for the initial automated processes. CPU processes all the
input data.
After processing by CPU, it gives output data to the output module. The output
module provides a signal to the output device. The singles can be anything like
activating or deactivating output devices.
And the main function of the programming device is to change or monitor the PLC
programming.
There are two types of PLCs- Compact PLC and Modular PLC.
• In Compact PLC, the capability of the I/O module is fixed.
• In Modular PLC, the capability of the I/O module is not fixed.
The digital module is also called Discrete Module. In this module, the I/O signal work
on the binary system i.e. only 0 or 1 value. For the digital input module, only the 1-bit
signal is used. It is useful in the ON or OFF condition. Based on Input and Output, the
digital module is of two types.
The analog module is called a Continuous Module. Usually, the voltage or current is
given to the input module in the form of an analog signal. For the analog input
module, 12-bit or 13-bit signal is used.
Generally, analog input signals operate in the range of 4-20 mA, 0-20 mA, 1-5 V, etc.
This analog signal provides any intermittent value between the two extreme limits
(initial to final range) for the analog input module. Again, analog I/O modules are
also of two types.
MODULE ADDRESSING
The PLC has to be able to identify each particular input and output. It does this by
allocating addresses to each input and output. With a small PLC this is likely to be just
a number, prefixed by a letter to indicate whether it is an input or an output. Thus
for the Mitsubishi PLC we might have inputs with addresses X400, X401, X402, and so
on and outputs with addresses Y430, Y431, Y432, and so on, the X indicating an input
and the Y an output. Toshiba uses a similar system.
With larger PLCs that have several racks of input and output channels, the racks are
numbered. With the Allen-Bradley PLC-5, the rack containing the processor is given
the number 0 and the addresses of the other racks are numbered 1, 2, 3, and so on,
according to how setup switches are set. Each rack can have a number of modules,
and each one deals with a number of inputs and/or outputs. Thus addresses can be
of the form shown in Figure. For example, we might have an input with address
I:012/03. This would indicate an input, rack 01, module 2, and terminal 03.
With the Siemens SIMATIC S5, the inputs and outputs are arranged in groups of
eight. Each such group is termed a byte, and each input or output within a group of
eight is termed a bit.
The inputs and outputs thus have their addresses in terms of the byte and bit
numbers, effectively giving a module number followed by a terminal number, a full
stop (.) separating the two numbers. Figure shows the system. Thus I0.1 is an input at
bit 1 in byte 0, and Q2.0 is an output at bit 0 in byte 2.
The GEM-80 PLC assigns inputs and output addresses in terms of the module number
and terminal number within that module. The letter A is used to designate inputs,
and B outputs. Thus A3.02 is an input at terminal 02 in module 3, and B5.12 is an
output at terminal 12 in module 5.
In addition to using addresses to identify inputs and outputs, PLCs also use their
addressing systems to identify internal, software-created devices, such as relays,
timers, and counters.
These terms really only make sense when electric current is viewed from the
perspective of conventional flow, where the positive terminal of the DC power
supply is envisioned to be the “source” of the current, with current finding its way
“down” to ground (the negative terminal of the DC power supply).
In every circuit formed by the output channel of a PLC driving a discrete control
device, or by a discrete sensing device driving an input channel on a PLC, one
element in the circuit must be sourcing current while the other is sinking current.
A device that sinks current “sucks” current from the other device. If the discrete
device connecting to the PLC is not polarity-sensitive, either type of PLC I/O module
will suffice.
For example, the following diagrams show a mechanical limit switch connecting to a
sinking PLC input and to a sourcing PLC input:
Note the differences in polarity and labeling between the sinking card’s common
terminal and the sourcing card’s common terminal.
On the “sinking” card, the input channel terminal is positive while the common
(“Com”) terminal is negative.
and on the “sourcing” card, the input channel terminal is negative while the common
(“VDC”) terminal is positive.