Similar presentations:
Basics of PLC
1.
Instructor: Aliya SamatovaE-mail: a.Samatova@apec.edu.kz
2.
A programmable logic controller (PLC) is amodular industrial computer used to automate
the processes through real-time data
collection. PLC programming is special computer
code language used to control factory machines
or processes. Bit Logic (1’s and 0’s) are what
makes up the core foundation of the PLC code. A
PLC monitors machinery through input devices,
uses their vitals to make decisions and deploys
control output to take actions based on the
results of the program logic.
3.
1. I/O modulesAn I/O module in the PLC can be analog inputs, analog outputs, digital inputs, digital
outputs, or a combination of the these. The I/O module is the bridge between I/O
devices and the command unit. The input module collects information in the form of
signals from actuators, sensors, switches, or push buttons. After processing according
to the programmed logic of the PLC, the output modules send the signals to control
devices like relays, valves, motor starters, alarms, and pumps.
2. A CPU module
Based on a microprocessor, the CPU module deals with all the processing and
mathematical manipulation involved in the automation processes. It energizes or deenergizes the output in response to the input, manipulates memory locations, performs
arithmetic and logical operations, transfers data between the ladder logic and itself,
and executes the application program.
You will find two types of programs in a PLC CPU:
Operating System –Supervisory set of permanent instructions loaded during manufacturing.
Application Program –A customized program that determines the functionality of PLC on the basis of
the customers’ demands.
3. Programming Device
The key component required for PLC programming is an external programming device.
A PLC programming device can be a hand-held unit, a PC, or a desktop unit. Some of
these require software, while others need a special interfacing card to interface with a
PLC. An application program, generally in the form of ladder logic or C, is created in
these devices and loaded into the PLC.
Once transferred, the programming device can connect to other PLCs to load other
application software in their non-volatile memory. Hence, PLCs do not require a
connection with a programming device to function.
4.
5.
The operating system is the built-in PLCsoftware that allows it to turn on, determine
instruction sequences and implement all
functions other than those related to control.
Important duties of a PLC OS are:
Hot and Cold Start
Interrupt Handling
Executing Custom User Programs
Interfacing with External Programmable
Devices
Dealing and Updating the I/O Device Data
6.
The user program, added into the PLC according tothe user requirements, uses an IEC standard
programming language and implements control
functions such as fault detection, temperature
control, automatic filling system, stopping and
starting escalators and elevators, etc.
The user program consists of multiple functions that
allow the industry to dictate the output of PLC. Unlike
the operating system, the user program is editable,
making PLC a popular control device.
Professional PLC manufacturers have pre-designed
user program logics and templates to decrease the
overall deployment time. Once you make the order,
they can make final changes to these pre-made
implementations to create the final product.
7.
Textual Programming Languages◦ Instructions List (IL)
◦ Structured List (SL)
Graphical Programming Languages
◦ Ladder Diagram (LD)
◦ Sequential Flow Chart (SFC)
◦ Function Block Diagram (FBD)
8.
Instructions list closely resembles assembly language and iscommonly known as “Op-code.” Due to its textual nature, it
consumes very little space. Hence, it works best with hand-held
devices with limited memory but higher portability. You may
recognize it by the symbols it uses, for instance, Input=I, Output=Q,
Counter=C, and so on.
However, many programmers do not prefer Instructions Lists as it
demands a large amount of time to detect bugs, maintenance and
updates are harder due to their non-visual structure, and complex
mathematical functions are hard to implement through them.
Some key features of the Instructions List are:
Consists of lines of code, with each line representing exactly one
operation
Step-by-Step Layout
Easier addition of simple mathematical functions
Portability and multi-hardware support
Faster execution in PLCs
Editable without software, mouse, or laptop due to simple lines of
code
Suitable for simple and small PLC programs
9.
Structured language is a popular programming language thatresembles high-level languages like PASCAL, C, and C++. It includes
decision loops, case statements, IF-Then logic, and other features of
high-level languages, making it one of the most powerful PLC
programming languages to exist. Structured List is quickly being
adopted out of all the IEC standard languages, and today hybrid
languages involving SL and LD designs are also available.
Due to its textual nature, it requires proper structuring for easier
maintenance, and it is not available on all makes and models of PLCs.
Some key features of Structured List are:
Consists of decision loops, pointers, and case statements
Indents, list spacing, and loop structure layout
Quick addition of complex process logic
Highly portable from one hardware to another
Faster execution in PLCs than graphical languages
Easily understandable for fresh graduates
Suitable for large and complex PLC programs
10.
Sequential flowchart is the simplest type of PLCprogramming language, consisting of only
decision logics. It is similar in form and operation
to the flowcharts programming students learn to
make in their early days, with a start point,
decision boxes, and actions boxes. Inside the
action boxes, there is a repeatable set of
instructions written in a language of
programmers’ choice; for instance, a pick and
drop task involves only one active set of
instructions with exceptions.
SFC programming can lead to extremely long
charts if the logic is complex and is not
convertible into any other language.
11.
Functional block is the second most popularprogramming language due to its graphical nature
and easy-to-read structure. It resembles a ‘wiring
structure,’ connected together in an easy-tofollow path.
Some key features of the Function Block Diagram
are:
Easiest to read
Suitable for simple programs that implement
digital logic
Visually understandable for most viewers
Requires large space
Flow is hard to design and requires pre-planning
12.
Ladder Logic is the most widely utilized PLC programming languageall over the world, and rightly so. With its control-circuit-like
structure, consisting of rungs and power rails on either side, this
language was a convenient alternative to the relay logic of the 70s.
Ladder logic rungs have symbols representing the element
connected to them, including contact symbols, comparisons, timer
delays, output symbols, etc. As each input becomes ‘true,’ the
outputs become activated.
Some key features of Ladder Logic are:
Consists of symbols, rungs, and power-rails
Wire-like graphical layout
Implements timers, comparisons, basic math, trigonometry, and
data analysis
Suitable for both simple and complex programs
Extensively large ladder handling is difficult
It can be directly implemented without pre-planning
Suitable for programmers and non-programmers alike
Troubleshooting, bug handling, and maintenance are quick and
simple
informatics