You are on page 1of 30

PLC (Programmable Logic Controller)

INTRODUCTION

PLC (Programmable Logic Controller)


• A programmable logic controller (PLC) is a special form of microprocessor-
based controller that uses a programmable memory to store instruction and
to implement functions such as logic, sequencing, timing, counting and
arithmetic in order to control machines and processes and are designed to be
operated by engineers with perhaps a limited knowledge of computers and
computing languages.
• A programmable logic controller (PLC) is specialized computer use to control
machine and process
• It uses programmable memory to store instruction and specific functions that
include On/Off control, timing, counting, sequencing, arithmetic and data
handling.
Parts Of PLC (Programmable Logic Controller)

• The basic structure of programmable logic controller (PLC) design can be


classified into two parts.
I. PLC hardware
II. PLC Software
PLC Hardware
• PLC hardware parts consist of Central processing unit (CPU), Input/ Output
Modules, Communication port, Programming device and Power supply
PLC Software
• PLC software is a programming application for writing logic or programmable
language. Example: ladder, SFC(sequence function chart) etc.
Important parts of plc
• The most Important parts of PLC includes the following
i. Central Processing unit
ii. Power supply
iii. Input-Output Modules
iv. Programming Device
important parts of plc cont…
i. Central Processing Unit (CPU)
• Processing unit (CPU) is the brain of the PLC system. The function of the CPU is
to execute the logic we have downloaded into it.
• While executing the logic, PLC control all the IO modules connected with the
CPU as per the user-written program.
• The memory unit is used in the CPU for storing the PLC program and other
data involving for monitoring and controlling the industrial system.
important parts of plc cont…
ii. Input and Output Modules
• IO modules are common to all PLC types, which are used to make
communication between CPU and field devices.
• Examples of input modules: pushbutton, switch, proximity switch, sensor,
etc...
• Examples of output modules: contactors, motor stator, valves, alarms, etc…
We have two different classifications of IO modules
a) Fixed IO Module
b) Modular IO module
important parts of plc cont…
Fixed IO Module
• Fixed or compact module types will be having IO modules designed with CPU.
• In One rectangular box (device), we will be having all components of PLC
except the Programming device.

Modular IO module
• Modular Type is nothing but a single module for each “n” number of IOs.
• If we need 6 number of Analog input signals then we have to use a standard 8
channel or 16 channel or 32 channel AI module.
• Similarly, If we want to connect 20 digital input signals to the PLC then we need
a 32 channel DI module in the PLC.
• Power supply will be one module, CPU will be another separate module,
different input, and output modules. If we have redundancy in the PLC then
extra modules will be required
important parts of plc cont…
iii. Power supply.
• PLC needs 24 volts DC supply for its operation. Some PLCs work with 230 volts
AC supply.
• The power supply details of PLC depend on the type of PLC model,
manufacturer of PLC, or as per the geographic location and standards.
• For IO modules, we need a separate power supply for its operation. Some
micro PLC types can able to supply power for their modules.
• But in a larger PLC system, we have to give a separate power supply for its
operation.
• In fixed or compact type PLC, we can connect the power supply to the inbuilt
positive and negative terminals.
• In modular type PLC, power supply modules are provided with each rack unit
where CPU, IO modules, and any other modules will be installed. This power
supply module will take care of the requirements of power for that rack unit.
important parts of plc cont…
iv. Programming Device
• Programming Device is used to enter the required program into the memory of
the processor. The program is developed in the device and then transferred to
the memory unit of the PLC . The memory unit is where the program is stored
that is to be used for the control actions to be exercised the microprocessor. The
most common used programming device is the PC (person computer).
• The programs used by the program are similar to a schematic for a relay control
circuit. In a relay control system, we used to wire the circuit using hardwires for
making the application/logic whereas, in PLC, we have software for doing the
same but without hardwires.
• We have different PLC languages which will be used for building the logic behind
the application.
• There are five languages for writing the PLC program, in that ladder logic is
mostly using one in the control industry.
PLC PROGRAMMING LANGUAGE
Plc programming language
• Programming language is a computer language engineering to
create a standard form of commands. These commands can be
interpreted into a code by a machine.
• There are different programming languages used in PLC. These
include the following:
i. Ladder Logic
ii. Structured Text
iii. Functional Block Diagram
iv. Sequential Flow Charts
v. Instruction List
Plc programming language cont…
LADDER LOGIC
• Ladder Logic the type of programming language that is used to
develop software for programmable logic controllers (PLCs) used in
industrial control applications. The name is based on the
observation that programs in this language resemble ladders ,with
two vertical rails and a series of horizontal rungs between them.
• On the left side, ladder logic instructions are set as conditions,
while the ones on the right side are instructions that are triggered if
the conditions are met. Each rung of the ladder spans from left to
righr and is executed from top to bottom by the PLC
PLC programming language cont…
• How to write a PLC ladder logic program
The power flow of the rung is taken from the left hand vertical across
the rung
Each rung represents one operation in control process.
Each rung of the ladder logic diagram represents a condition of the
input/output/memory bit, and it may contain more than one input in
different configurations.
A ladder diagram is read from top to bottom
PLC programming language cont…
ADVANTAGES OF LADDER LOGIC
Intuitive and self documenting, i.e excellent graphical representation
and well understood circuit design concepts.
Excellent debugging tools. It shows proper power flow and hence
easy to understand the diagram logic and to debug faults
Efficient representation for the discrete logic.
Reliable parts.

DISADVANTAGES OF LADDER LOGIC


Poor data structure
Limited execution control
STRUCTURED TEXT PLC PROGRAMMING LANGUAGE
• As one of the PLC programming languages, Structured Text or just ST is based on
and resembles traditional programming languages like Python or Java.
• Structured Text is an up and coming, popular programming language used in PLCs.
This language is much different than ladder logic but it allows you to do all the same
things and more with a lot less space (visually and in terms of processor memory)
• Rather than being visual or graphics-based like ladder logic or Function Block
Diagram, Structured Text is just that, text!
• The user enters lines of code that execute sequentially, evaluate specific functions,
boolean checks, and energize appropriate outputs of the PLC. Structured Text
provides a simple transition into PLCs for those who have a background in a
traditional programming language such as C, C++, Java, or Python. Furthermore, it
can be easily manipulated in text processors, thus making it fast to implement
without the need for hardware.
Advantages of Structured Text PLC Programming

1.Intuitive to Other Programming Languages


As mentioned above, Structured Text is easy to learn for those who are
looking to transition from a software engineering background. It features the
same structures, programming paradigms, and functions that one would expect
to see in C or Java.
2.High Complexity
Structured Text allows for greater flexibility than other languages and thus
makes it easier to implement advanced functionality for those who master the
language.
3.Transferability
Structured Text is standardized among most PLC systems, thus making it easy
to migrate between platforms. You’ll find significant differences in other
languages between platforms, yet structured Text can be implemented in
Disadvantages of Structured Text
1. Difficult to Troubleshoot
When compared to ladder logic programming, structured Text is much
more complex from a troubleshooting standpoint. There are no visual
queues, less visual aids, and typically more code on a single line. Those
who aren’t comfortable with this language will have a hard time figuring
out the process flow.
2. Error-Prone
Structured Text provides greater flexibility to the user. However, this
flexibility comes at the cost of standardization. Users must use software
engineering best practices to create safe fallbacks and trap any potential
failures of the software.
Applications of Structured Text (ST)
The application of the ST language is very least compared to other
languages. Usually, a Programmer from an IT background is use ST
language because of His/her are familiarity with the higher-level
languages. ST is more popular in complex PLC programs.
FUNCTION BLOCK DIAGRAM
• Function Block Diagram is used for PLC programs which are
represented in the form of graphical blocks. It describes a function
between inputs and outputs that are connected in blocks by
connection lines.
• It represents signal or data flow into the function block and when it
executed in the PLC logic it results in one or more outputs. Each
function block is already pre-programed to do a certain function, the
user has to plug in the input and outputs.
ADVANTAGES OF FBD
• The FBD does work well with motion controls.
• The visual method is easier for some users.
• Flexible visual editor.
• The editor for FBD programming is very user friendly and provides a simple way
to create any layout.
• Ideal for complex programming structures.
DISADVANTAGES OF FBD
• It is more difficult to troubleshoot.
The code can get disorganized using this PLC
Programming language because you can place
the function blocks any where on the sheet.
APPLICATIONS OF FBD
• The most common applications of Function Block Diagram is that
It is used to establish PID Controllers. The visual aspect of FBD to
makes PID easy to implement, visualize, tune and troubleshoot in
the field.
SEQUENTIAL FUNCTION CHARTS (SFC)
• Sequential function charts is a language used in PLC programming which is a
graphical representation of the flow charts or steps, which is similar to flow chart
algorithms used in computer languages.
• In sequential function charts, we use steps and transitions to achieve the end
results.
• Steps act as a major function in the program. These steps house the action that
occur when you program them to happen.
• This decision can be used on timing, a certain phase of the process or physical
state of an equipment.
• Transitions are the instructions that you use to move from one step to another
step by setting conditions of true or false.
• It has a multiple paths,you can use branches to initiate multiple steps at one time.
ADVANTAGES OF (SFC)
• Process can be broken into major steps that can make
trouble shooting faster and easier
• You have direct access in the logic to see where a piece of
equipment faulted.
• It can be faster to design and write the logic due to the
ability to use repeated execution of individual pieces of
logic.

DISADVANTAGE OF (SFC)
• It does not always fit every application
Instruction list programming language

• Instruction List (IL) is a low level textual language which has a structure
similar to a simple machine assembler.
• Instruction list is suitable for those who likes coding and C languages. IL
offers a broad variety of operators representing those most frequently
discovered in present PLC proprietary instruction lists. Example of
programming.
• With IL the following operations can be executed:
• Logical (AND…), arithmetic (ADD…), compare (GT…) operations and
assignments (ST, S, R).
• Jumps within a section unconditioned / conditioned (JMP / JMP C, JMP
CN)
• Functions and function blocks unconditioned / conditioned (CAL / CAL C,
ADVANTAGES OF INSTRUCTION LIST PROGRAMMING
LANGUAGE
• suitable for those who likes coding and C languages. IL offers a
broad variety of operators representing those most frequently
discovered in present PLC proprietary instruction lists. Example
of programming.

DISADVANTAGES OF INSTRUCTION LIST PROGRAMMING


LANGUAGE
• There are few structuring possibilities with the command being
one of them

You might also like