SlideShare a Scribd company logo
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Writing Simple PLC
Ladderlogic Programs
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Presented by
Doctor Steve Mackay
Dean of Engineering
of the
Engineering Institute of
Technology
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
What you will gain from this
presentation
• An understanding of the key elements of
ladderlogic programs
• Look at simple programs
• Examine design and troubleshooting of a PLC
program
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Objectives
In this chapter, the following will be covered:
• Introduction to PLC programming
• Types of programming languages
• Basic programming instructions
• Advanced programming instructions
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Introduction
Whilst on the subject of PLC programming, an
immediate question that comes to mind, is
what components would be need to program a PLC?
The following components would be required:
• Computer with accessories
• Programming software
Just as tools cannot work alone, the same applies to
PLC applications. Hence, a good knowledge of ‘PLC
programming (languages)’ is very necessary.
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Computer with accessories
As the programming unit is usually taken near a
PLC panel, it is better to choose the PC
configuration of industrial type so that it
withstands the industrial environment easily.
Laptops are also a good option and handy
option! A PG-PLC communication cable (along
with PG unit) is essential for establishing a
physical link between the PG and the PLC.
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
PLC programming setup
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Programming software
The programming software allows the programmer / user to perform
the following functions:
• Develop PLC program in selected programming languages.
• Check the PLC program for correctness.
• Simulate the PLC program.
• Download or transfer the PLC program from the programming unit to
the PLC.
• Check status of an Online PLC program, running in PLC CPU.
• Modify or change the parameters of a PLC program online.
• Check status of a PLC and related I/O modules.
• Take backups of the PLC program by transferring program from PLC
to PG unit.
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
PLC programming steps
To develop a PLC program for any process or system,
simply follow the steps given below:
• Understanding the process and define the control
philosophy
• Ensure the preparation of a control strategy
• Create a flowchart
• Implement the flowchart, using selected
programming languages
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Understanding process and defining
control philosophy
1. Before developing a PLC program for a particular process, it is very
important to first understand the process. Right from program
development to commissioning, you will need the knowledge of the
process you are dealing with.
2. After doing that, develop a ‘Control Philosophy,’ which defines what
needs to be done for achieving process control under process limits
and serves as a platform for control program.
3. Since each process has different aspects of engineering, such as
operation, electrical, instrumentation, mechanical, chemical, etc., it
is important to formulate the ‘Control Philosophy’ jointly with
people who know and understand these various aspects.
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Preparation of control strategy
(algorithm)
Once the ‘Control Philosophy’ is formalized, the programmer can
start applying his mind at to how to accomplish the tasks
mentioned, in the most optimized manner.
1. Firstly, the ‘Control Philosophy’ task is divided into different
groups, by studying the sequence of events that take place /
happen in a process.
2. Next, the individual group tasks are further sub-divided into
parts and a solution (output results) is sought for all the
sections. This is referred to as the process of building an
‘Algorithm’ or control strategy.
3. After building the control strategy for the first time,
alternative approaches (to obtain similar output results),
should also be considered.
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Creating a flowchart
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Programming languages
The following languages are available for the
programming of an application:
1) Ladder diagram
2) Function block diagram
3) Instruction list
4) Sequential function chart
5) Structured text
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Ladder diagram
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Ladder program execution
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Basic logic instructions
These instructions are basically representative of the ON/Off
status of the inputs and also for changing the output
status. They are also referred as ‘Bit’ type instructions and
can be written as follows:
1. XIC (Examine if Close)
2. XIO (Examine if Open)
3. OTE (Turn a bit to ‘True’/’False’)
4. OTL (Latch a bit to ‘True’ state)
5. OTU (Latch a bit to ‘False’ state)
6. OSR (One Shot Rising)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
XIC (Examine if Close)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
XIO (Examine if Open)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
OTE (Turn a bit to ‘True’/’False’)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
OTL (Latch a bit to ‘True’ state)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
OTU (Latch a bit to ‘False’ state)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
OSR (One Shot Rising)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Timers
Timers and counters are some of the most
frequently used instructions in a program.
Unfortunately, very few people know about
the different type of timers that are available
and how these variations actually work.
Once fully understood, they definitely play a
vital role in effective programming
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Timer related general terms
• Timer Address: Each timer is given a unique address in the software.
Timers have an area reserved for them in the memory of your CPU.
Generally, PLCs have 128 or 256, or more number of timers available,
depending on the PLC’s make.
• Enable: This is a timer input signal that enables the timer. Generally,
it is given through an input signal or a bit.
• Preset Time Value: This is the target time by which the event
‘On/Off’ has to be delayed.
• Accumulated Time Value: This shows the current timer value once
timer is started.
• Timer Base: This is the value of time (usually indicated in milli-
seconds or seconds) by which the timer increments during running.
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
TON (On Delay Timer)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
TOF (Off Delay Timer)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
RTO (Retentive Timer)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Counter
The Counter is an instruction, which performs the ‘counting pulses of
inputs in a program’.
It functions very similarly to hardware timers, from an operation point
of view. It measures the pulses of an input signal and, according to its
type of action, is classified as:
• Up Counter (Increments the count on receiving pulse input).
• Down Counter (Decrements the count on receiving pulse input).
• Up-Down Counter (Increments as well as Decrements the count on
receiving pulse input).
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Counter related general terms
Counter Address: Each counter is given a unique address in the software. Counters have an area reserved
for them in the memory of the CPU. Generally, PLCs have 128 or 256 or more counters, depending on
the PLC manufacturer.
Counter Value: A 16-bit word is reserved for each counter in the system data memory. This is used for
storing the counter value (for the counter numbered from 0 to 999) in binary code.
Preset Value: The preset value (0...999) is specified in BCD at the "PV" input, as a constant (C#...)
• in BCD format via a data interface.
Count Up: When the RLO (result of logic operation) at the "CU" input changes from "0" to "1", the current
counter reading is incremented by 1 (upper limit = 999).
Count Down: When the RLO at the "CD" input changes from "0" to "1", the current counter reading is
decremented by 1 (lower limit = 0).
Set Counter: When the RLO at the "S" input changes from "0" to "1", the counter is set to the value
at the "CV" input.
Reset Counter: When RLO equals “1” at the ‘Reset Counter’ input, the counter is set to zero. If the Reset
condition is still fulfilled, the counter cannot be set and counting is not possible.
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
C-UP (Up Counter)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
C-DN (Down Counter)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
C-UD (Up-Down Counter)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Program flow control instructions
The further we delve into a program segment, the more likely it is that
we may need to execute an instruction (or a group of instructions)
based on certain condition.
That purpose is solved by ‘Program Flow Control’ instructions.
These instructions can be classified broadly as per the following
function:
• To control execution of sub-routines within the main program.
• To control execution of instructions within sub-routines.
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
JU (Jump Unconditional)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
JC (Jump if "RLO" bit =1)
If an un-conditional ‘Jump’ instruction is used,
the called set of instructions will execute each
time. However, it may not always be
necessary to execute the set of instructions
each time. To avoid doing this, conditions are
formulated for the execution of instructions,
and those conditions are grouped together to
generate a ‘RLO’ (Result of Logic Operation).
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
JCN (Jump if "RLO" bit =0)
This is very similar to the conditional jump instruction ‘JC’. The only
difference is that it executes the related block, but only when ‘RLO’ is
zero.
If the instruction ‘JCN’ is used in the main program of the example
shown in Fig. 8.9, then block (subroutine) PB10 will be executed only
when the ‘RLO’ before the ‘JC’ instruction is at logic ‘0’.
If the ‘RLO’ is not at logic ‘0’; then block (subroutine) PB10 will not be
processed or executed in that program cycle. The program execution
in OB1 (main block) will continue further.
Once again, it must be stressed that ‘RLO’ is the result of logic
operations that happened just before ‘JCN’ instruction.
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Master Control (MC)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Data load and transfer instructions
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
LOAD (LD)
This is a very commonly used instruction for ‘getting’
the data in an accumulator or a temporary storage
area.
It is basically used for ‘collecting’ the data from an
Input image table (PII), accumulator and data
registers. This instruction is used along with the
reference of the location from where the data has
to be collected.
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
TRANSFER (T)
This instruction is used, in conjunction with the ‘LOAD’
instruction, to transfer data collected to another
place. It is basically used for ‘transferring’ the data in
between the accumulator, data registers and the
output image table (PIQ).
Similarly to the ‘LOAD’ instruction, it is also used
along with a reference of the location to where the
data has to be transferred.
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
MOVE (MOV)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Arithmetic or math instructions
In general, it will be found that all PLCs makes always include the
following math functions:
• Addition - The capability to add one data register to another. It is
commonly called the ‘ADD’ instruction.
• Subtraction - The capability to subtract one data register from
another. It is commonly called the ‘SUB’ instruction.
• Multiplication - The capability to multiply one data register with
another. It is commonly called the ‘MUL’ instruction.
• Division - The capability to divide one data register into another. It is
commonly called the ‘DIV’ instruction.
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
ADDITION (ADD)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
SUBTRACTION (SUB)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
MULTIPLICATION (MUL)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
DIVISION (DIV)
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
System Programming
and Implementation
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Objectives
In this chapter, the following topics will be dealt
with:
• Introduction to system programming
• Formulating I/O list
• Developing program
• Program testing and simulation
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Introduction
PLC programming has been dealt with, in detail, in the previous chapter. Attention will
now be focussed on how to perform a PLC project’s system programming, and
implement it successfully. To do this in a systematic manner, one needs to
understand the following strategies.
• Taking process inputs
• Creating I/O list
• Deciding hardware configuration of the PLC system
• I/O address assignment
• Developing program structure
• Tips for developing a PLC program
• Program verification and simulation
• Creating documentation
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Taking process inputs
While taking process input’s (information), we should get information
about following:
• The battery limits of process we are supposed to control.
• Control philosophy and other process related documentation.
• Total electrical equipment list with detail specifications.
• Total instrument list with detail specifications.
• Abnormal conditions for process and individual equipment.
• Different operating modes for process and equipment and their
significance.
• Physical layout of PLC, operator stations and process.
• Specific requirement about voltage levels for field devices.
• Elements to be hardwired.
• Operator station requirements.
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Creating I/O list
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Deciding hardware configuration of PLC
system
• The following deciding factors should also be taken into consideration while going
for PLC configuration:
• Physical layout of process equipment (decides whether to go for local I/Os or
remote I/Os).
• Specifications of instruments and other devices.
• Nature and volume of process (decides type of CPU and I/Os to be used).
• Voltage standards (decides type of modules and PLC interrogation voltages).
• Communication requirement of PLC (decides CPU, communication modules,
communication medium).
• Future expansion in process (CPU and interface cards should accommodate further
expansion).
• Compatibility with operator stations.
• Technical competitiveness.
• Readily available spares.
• After sales technical support.
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Typical PLC Hardware configuration
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
I/O addressing
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Developing program structure
Try to focus on individual pieces one by one. Ask the following
questions to yourself:
• What is the physical division of piece of process?
• What are the inputs for this piece of process?
• What are the outputs for this piece of process?
• What other information required?
• What is the sequence of operation?
When you start thinking about these questions, keep the piece of
process at the centre, and you are gradually moving towards the
solution.
Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare
Hot slab rolling process
Technology Training that Workswww.idc-online.com/slideshare
Thank You For Your Interest
If you are interested in further training, please visit:
IDC Technologies Short Courses:
Two-day practical courses available to the public:
http://www.idc-online.com/slideshare

More Related Content

PPTX
Use of plc in industrial automation
PPT
Plc Siemens Training Notes
PPT
Programming logic controllers (plc)
PDF
Timer in PLC and its Types.pdf
PDF
PLC Troubleshooting & Maintenance
PPTX
Programmable Logic Controller(PLC)
PDF
Plc ppt
PPTX
Basics of Automation, PLC and SCADA
Use of plc in industrial automation
Plc Siemens Training Notes
Programming logic controllers (plc)
Timer in PLC and its Types.pdf
PLC Troubleshooting & Maintenance
Programmable Logic Controller(PLC)
Plc ppt
Basics of Automation, PLC and SCADA

What's hot (20)

DOCX
Plc and scada report
PPTX
Plc (PROGRAMMABLE LOGIC CONTROLLER)
PDF
PPTX
DOCX
summer internship report on PLC & SCADA
PPT
Programmable logic controller(plc)
PPTX
PLC(Programmable Logic Controller)-Control system Engineering.
PDF
Plc basics
PPTX
ppt on PLC automation
PPTX
Basics of electrical control panel
PPT
PLC Basic
PPTX
Industrial automation (PLC, SCADA, VFD & HMI)
PDF
Plc report with project
PDF
Programmable logic controller - Siemens S7-1200
PDF
Summer Internship Report on PLC
PPTX
Plc example presentation
DOC
Training Report on PLC & SCADA
PPTX
PLC ARCHITECTURE AND HARDWARE COMPONENTS
PPTX
Automatic railway gate control using arduino uno
PPTX
programmable logic controller presentation
Plc and scada report
Plc (PROGRAMMABLE LOGIC CONTROLLER)
summer internship report on PLC & SCADA
Programmable logic controller(plc)
PLC(Programmable Logic Controller)-Control system Engineering.
Plc basics
ppt on PLC automation
Basics of electrical control panel
PLC Basic
Industrial automation (PLC, SCADA, VFD & HMI)
Plc report with project
Programmable logic controller - Siemens S7-1200
Summer Internship Report on PLC
Plc example presentation
Training Report on PLC & SCADA
PLC ARCHITECTURE AND HARDWARE COMPONENTS
Automatic railway gate control using arduino uno
programmable logic controller presentation
Ad

Viewers also liked (20)

PPTX
INDUSTRIAL AUTOMATION USING PLC
PPT
Chapter 2 ladder
PPT
Chapter 4 plc
PPTX
Programmable Logic Controller and ladder logic programming
PDF
Practical Troubleshooting and Problem Solving of Modbus Protocols
PPT
Plc presentation
PPTX
ppt on PLC
PPTX
PLC LADDER DIAGRAM
PPT
Internship Ccan-Greening of Richmond
DOC
What is plc splitter
PPT
Smart Instruments, Fieldbus, Ethernet and Wireless
PPT
SNMP Network Management the Essentials
PDF
Componentes hidarulicos y neumaticos
PPT
Rmcc graphics 3
PPT
Enofneeja Schakeling
PPT
BSP & Hose Fittings
DOCX
Modul praktikum instruksi dasar
PPTX
Practical Fundamentals of E-Manufacturing, MES and Supply
PDF
Texas Instruments Smart Meter Board
PPT
Programmable Logic Controllers (PLCs) and SCADA Systems
INDUSTRIAL AUTOMATION USING PLC
Chapter 2 ladder
Chapter 4 plc
Programmable Logic Controller and ladder logic programming
Practical Troubleshooting and Problem Solving of Modbus Protocols
Plc presentation
ppt on PLC
PLC LADDER DIAGRAM
Internship Ccan-Greening of Richmond
What is plc splitter
Smart Instruments, Fieldbus, Ethernet and Wireless
SNMP Network Management the Essentials
Componentes hidarulicos y neumaticos
Rmcc graphics 3
Enofneeja Schakeling
BSP & Hose Fittings
Modul praktikum instruksi dasar
Practical Fundamentals of E-Manufacturing, MES and Supply
Texas Instruments Smart Meter Board
Programmable Logic Controllers (PLCs) and SCADA Systems
Ad

Similar to Plc Programming Fundamentals (20)

PPT
Vt training plc_1
PPSX
Vt training plc_1
PDF
Summer Internship Report For PLC Programming of Traffic light through Ladder ...
DOCX
Training 17
PDF
Identify elements associated with the preparation of a programmable l.pdf
PPTX
MergeResult_2024_08_06_03_16_109[1].pptx
PDF
PLC TECHNICIAN HANDBOOK beginners in automation
PDF
Report on PLC traning
PDF
industrialautomation-130610121032-phpapp01.pdf
PPTX
Industrial automation
PPTX
Industrial Automation Using PLC
DOCX
training report. automation,plc , scada
PDF
PLC.pdf
PDF
TRAINING REPORT ON INDUSTRIAL AUTOMATION- PLC SCADA, VARIABLE FREQUENCY DRIVE
PPTX
Plc scada by bhushan kumbhalkar
PPTX
Introduction-to- PLC- Programming.pptx
PPTX
Industrial Automation Using PLC.
PDF
Automation.pdf
PPTX
plc ICS_PLC_Integration_Tools ICS_PLC_Integration_Tools.pptx
PPTX
Ipc presentation
Vt training plc_1
Vt training plc_1
Summer Internship Report For PLC Programming of Traffic light through Ladder ...
Training 17
Identify elements associated with the preparation of a programmable l.pdf
MergeResult_2024_08_06_03_16_109[1].pptx
PLC TECHNICIAN HANDBOOK beginners in automation
Report on PLC traning
industrialautomation-130610121032-phpapp01.pdf
Industrial automation
Industrial Automation Using PLC
training report. automation,plc , scada
PLC.pdf
TRAINING REPORT ON INDUSTRIAL AUTOMATION- PLC SCADA, VARIABLE FREQUENCY DRIVE
Plc scada by bhushan kumbhalkar
Introduction-to- PLC- Programming.pptx
Industrial Automation Using PLC.
Automation.pdf
plc ICS_PLC_Integration_Tools ICS_PLC_Integration_Tools.pptx
Ipc presentation

More from Living Online (20)

PDF
Practical Routers and Switches including TCI/IP and Ethernet for Engineers an...
PDF
Practical Project Management for Engineers and Technicians
PDF
Mechanical, Electrical and Instrumentation Engineering for Non-Engineers
PDF
Hands on Data-Communication, Networking and TCP/IP Troubleshooting
PDF
Fundamentals of Instrumentation, Process Control, PLCs and SCADA for Plant Op...
PDF
Practical Fundamentals of Heating, Ventilation & Air-Conditioning (HVAC) for ...
PDF
Practical Energy Efficiency, Design, Engineering & Auditing
PDF
High Voltage Electrical Compliance and Safety Operating Procedures
PDF
Practical Routers & Switches (Including TCPIP and Ethernet) for Engineers and...
PDF
Cybersecurity for Automation Control and SCADA Systems
PDF
Practical Process Control
PDF
Inspection, Testing and Commissioning of Electrical Switchboards, Circuit Bre...
PDF
Hands on Data Communications, Networking & TCP/IP Troubleshooting
PDF
Fundamentals of Instrumentation, Process Control, PLCs and SCADA for Plant Op...
PDF
Practical Industrial Flow Measurement for Engineers and Technicians
PDF
Practical Distribution & Substation Automation (Incl. Communications) for Ele...
PDF
Practical Boiler Control & Instrumentation for Engineers & Technicians
PDF
Practical Arc Flash Protection for Electrical Safety Engineers and Technicians
PDF
Practical Analytical Instrumentation in On-line Applications
PDF
Practical Alarm Management for Engineers and Technicians
Practical Routers and Switches including TCI/IP and Ethernet for Engineers an...
Practical Project Management for Engineers and Technicians
Mechanical, Electrical and Instrumentation Engineering for Non-Engineers
Hands on Data-Communication, Networking and TCP/IP Troubleshooting
Fundamentals of Instrumentation, Process Control, PLCs and SCADA for Plant Op...
Practical Fundamentals of Heating, Ventilation & Air-Conditioning (HVAC) for ...
Practical Energy Efficiency, Design, Engineering & Auditing
High Voltage Electrical Compliance and Safety Operating Procedures
Practical Routers & Switches (Including TCPIP and Ethernet) for Engineers and...
Cybersecurity for Automation Control and SCADA Systems
Practical Process Control
Inspection, Testing and Commissioning of Electrical Switchboards, Circuit Bre...
Hands on Data Communications, Networking & TCP/IP Troubleshooting
Fundamentals of Instrumentation, Process Control, PLCs and SCADA for Plant Op...
Practical Industrial Flow Measurement for Engineers and Technicians
Practical Distribution & Substation Automation (Incl. Communications) for Ele...
Practical Boiler Control & Instrumentation for Engineers & Technicians
Practical Arc Flash Protection for Electrical Safety Engineers and Technicians
Practical Analytical Instrumentation in On-line Applications
Practical Alarm Management for Engineers and Technicians

Recently uploaded (20)

PPTX
Big Data Technologies - Introduction.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Approach and Philosophy of On baking technology
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
KodekX | Application Modernization Development
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
Big Data Technologies - Introduction.pptx
Unlocking AI with Model Context Protocol (MCP)
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectral efficient network and resource selection model in 5G networks
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Approach and Philosophy of On baking technology
MYSQL Presentation for SQL database connectivity
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
20250228 LYD VKU AI Blended-Learning.pptx
KodekX | Application Modernization Development
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Understanding_Digital_Forensics_Presentation.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Chapter 3 Spatial Domain Image Processing.pdf

Plc Programming Fundamentals

  • 1. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Writing Simple PLC Ladderlogic Programs
  • 2. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Presented by Doctor Steve Mackay Dean of Engineering of the Engineering Institute of Technology
  • 3. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare What you will gain from this presentation • An understanding of the key elements of ladderlogic programs • Look at simple programs • Examine design and troubleshooting of a PLC program
  • 4. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Objectives In this chapter, the following will be covered: • Introduction to PLC programming • Types of programming languages • Basic programming instructions • Advanced programming instructions
  • 5. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Introduction Whilst on the subject of PLC programming, an immediate question that comes to mind, is what components would be need to program a PLC? The following components would be required: • Computer with accessories • Programming software Just as tools cannot work alone, the same applies to PLC applications. Hence, a good knowledge of ‘PLC programming (languages)’ is very necessary.
  • 6. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Computer with accessories As the programming unit is usually taken near a PLC panel, it is better to choose the PC configuration of industrial type so that it withstands the industrial environment easily. Laptops are also a good option and handy option! A PG-PLC communication cable (along with PG unit) is essential for establishing a physical link between the PG and the PLC.
  • 7. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare PLC programming setup
  • 8. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Programming software The programming software allows the programmer / user to perform the following functions: • Develop PLC program in selected programming languages. • Check the PLC program for correctness. • Simulate the PLC program. • Download or transfer the PLC program from the programming unit to the PLC. • Check status of an Online PLC program, running in PLC CPU. • Modify or change the parameters of a PLC program online. • Check status of a PLC and related I/O modules. • Take backups of the PLC program by transferring program from PLC to PG unit.
  • 9. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare PLC programming steps To develop a PLC program for any process or system, simply follow the steps given below: • Understanding the process and define the control philosophy • Ensure the preparation of a control strategy • Create a flowchart • Implement the flowchart, using selected programming languages
  • 10. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Understanding process and defining control philosophy 1. Before developing a PLC program for a particular process, it is very important to first understand the process. Right from program development to commissioning, you will need the knowledge of the process you are dealing with. 2. After doing that, develop a ‘Control Philosophy,’ which defines what needs to be done for achieving process control under process limits and serves as a platform for control program. 3. Since each process has different aspects of engineering, such as operation, electrical, instrumentation, mechanical, chemical, etc., it is important to formulate the ‘Control Philosophy’ jointly with people who know and understand these various aspects.
  • 11. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Preparation of control strategy (algorithm) Once the ‘Control Philosophy’ is formalized, the programmer can start applying his mind at to how to accomplish the tasks mentioned, in the most optimized manner. 1. Firstly, the ‘Control Philosophy’ task is divided into different groups, by studying the sequence of events that take place / happen in a process. 2. Next, the individual group tasks are further sub-divided into parts and a solution (output results) is sought for all the sections. This is referred to as the process of building an ‘Algorithm’ or control strategy. 3. After building the control strategy for the first time, alternative approaches (to obtain similar output results), should also be considered.
  • 12. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Creating a flowchart
  • 13. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Programming languages The following languages are available for the programming of an application: 1) Ladder diagram 2) Function block diagram 3) Instruction list 4) Sequential function chart 5) Structured text
  • 14. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Ladder diagram
  • 15. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Ladder program execution
  • 16. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Basic logic instructions These instructions are basically representative of the ON/Off status of the inputs and also for changing the output status. They are also referred as ‘Bit’ type instructions and can be written as follows: 1. XIC (Examine if Close) 2. XIO (Examine if Open) 3. OTE (Turn a bit to ‘True’/’False’) 4. OTL (Latch a bit to ‘True’ state) 5. OTU (Latch a bit to ‘False’ state) 6. OSR (One Shot Rising)
  • 17. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare XIC (Examine if Close)
  • 18. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare XIO (Examine if Open)
  • 19. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare OTE (Turn a bit to ‘True’/’False’)
  • 20. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare OTL (Latch a bit to ‘True’ state)
  • 21. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare OTU (Latch a bit to ‘False’ state)
  • 22. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare OSR (One Shot Rising)
  • 23. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Timers Timers and counters are some of the most frequently used instructions in a program. Unfortunately, very few people know about the different type of timers that are available and how these variations actually work. Once fully understood, they definitely play a vital role in effective programming
  • 24. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Timer related general terms • Timer Address: Each timer is given a unique address in the software. Timers have an area reserved for them in the memory of your CPU. Generally, PLCs have 128 or 256, or more number of timers available, depending on the PLC’s make. • Enable: This is a timer input signal that enables the timer. Generally, it is given through an input signal or a bit. • Preset Time Value: This is the target time by which the event ‘On/Off’ has to be delayed. • Accumulated Time Value: This shows the current timer value once timer is started. • Timer Base: This is the value of time (usually indicated in milli- seconds or seconds) by which the timer increments during running.
  • 25. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare TON (On Delay Timer)
  • 26. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare TOF (Off Delay Timer)
  • 27. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare RTO (Retentive Timer)
  • 28. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Counter The Counter is an instruction, which performs the ‘counting pulses of inputs in a program’. It functions very similarly to hardware timers, from an operation point of view. It measures the pulses of an input signal and, according to its type of action, is classified as: • Up Counter (Increments the count on receiving pulse input). • Down Counter (Decrements the count on receiving pulse input). • Up-Down Counter (Increments as well as Decrements the count on receiving pulse input).
  • 29. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Counter related general terms Counter Address: Each counter is given a unique address in the software. Counters have an area reserved for them in the memory of the CPU. Generally, PLCs have 128 or 256 or more counters, depending on the PLC manufacturer. Counter Value: A 16-bit word is reserved for each counter in the system data memory. This is used for storing the counter value (for the counter numbered from 0 to 999) in binary code. Preset Value: The preset value (0...999) is specified in BCD at the "PV" input, as a constant (C#...) • in BCD format via a data interface. Count Up: When the RLO (result of logic operation) at the "CU" input changes from "0" to "1", the current counter reading is incremented by 1 (upper limit = 999). Count Down: When the RLO at the "CD" input changes from "0" to "1", the current counter reading is decremented by 1 (lower limit = 0). Set Counter: When the RLO at the "S" input changes from "0" to "1", the counter is set to the value at the "CV" input. Reset Counter: When RLO equals “1” at the ‘Reset Counter’ input, the counter is set to zero. If the Reset condition is still fulfilled, the counter cannot be set and counting is not possible.
  • 30. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare C-UP (Up Counter)
  • 31. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare C-DN (Down Counter)
  • 32. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare C-UD (Up-Down Counter)
  • 33. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Program flow control instructions The further we delve into a program segment, the more likely it is that we may need to execute an instruction (or a group of instructions) based on certain condition. That purpose is solved by ‘Program Flow Control’ instructions. These instructions can be classified broadly as per the following function: • To control execution of sub-routines within the main program. • To control execution of instructions within sub-routines.
  • 34. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare JU (Jump Unconditional)
  • 35. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare JC (Jump if "RLO" bit =1) If an un-conditional ‘Jump’ instruction is used, the called set of instructions will execute each time. However, it may not always be necessary to execute the set of instructions each time. To avoid doing this, conditions are formulated for the execution of instructions, and those conditions are grouped together to generate a ‘RLO’ (Result of Logic Operation).
  • 36. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare JCN (Jump if "RLO" bit =0) This is very similar to the conditional jump instruction ‘JC’. The only difference is that it executes the related block, but only when ‘RLO’ is zero. If the instruction ‘JCN’ is used in the main program of the example shown in Fig. 8.9, then block (subroutine) PB10 will be executed only when the ‘RLO’ before the ‘JC’ instruction is at logic ‘0’. If the ‘RLO’ is not at logic ‘0’; then block (subroutine) PB10 will not be processed or executed in that program cycle. The program execution in OB1 (main block) will continue further. Once again, it must be stressed that ‘RLO’ is the result of logic operations that happened just before ‘JCN’ instruction.
  • 37. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Master Control (MC)
  • 38. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Data load and transfer instructions
  • 39. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare LOAD (LD) This is a very commonly used instruction for ‘getting’ the data in an accumulator or a temporary storage area. It is basically used for ‘collecting’ the data from an Input image table (PII), accumulator and data registers. This instruction is used along with the reference of the location from where the data has to be collected.
  • 40. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare TRANSFER (T) This instruction is used, in conjunction with the ‘LOAD’ instruction, to transfer data collected to another place. It is basically used for ‘transferring’ the data in between the accumulator, data registers and the output image table (PIQ). Similarly to the ‘LOAD’ instruction, it is also used along with a reference of the location to where the data has to be transferred.
  • 41. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare MOVE (MOV)
  • 42. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Arithmetic or math instructions In general, it will be found that all PLCs makes always include the following math functions: • Addition - The capability to add one data register to another. It is commonly called the ‘ADD’ instruction. • Subtraction - The capability to subtract one data register from another. It is commonly called the ‘SUB’ instruction. • Multiplication - The capability to multiply one data register with another. It is commonly called the ‘MUL’ instruction. • Division - The capability to divide one data register into another. It is commonly called the ‘DIV’ instruction.
  • 43. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare ADDITION (ADD)
  • 44. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare SUBTRACTION (SUB)
  • 45. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare MULTIPLICATION (MUL)
  • 46. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare DIVISION (DIV)
  • 47. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare System Programming and Implementation
  • 48. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Objectives In this chapter, the following topics will be dealt with: • Introduction to system programming • Formulating I/O list • Developing program • Program testing and simulation
  • 49. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Introduction PLC programming has been dealt with, in detail, in the previous chapter. Attention will now be focussed on how to perform a PLC project’s system programming, and implement it successfully. To do this in a systematic manner, one needs to understand the following strategies. • Taking process inputs • Creating I/O list • Deciding hardware configuration of the PLC system • I/O address assignment • Developing program structure • Tips for developing a PLC program • Program verification and simulation • Creating documentation
  • 50. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Taking process inputs While taking process input’s (information), we should get information about following: • The battery limits of process we are supposed to control. • Control philosophy and other process related documentation. • Total electrical equipment list with detail specifications. • Total instrument list with detail specifications. • Abnormal conditions for process and individual equipment. • Different operating modes for process and equipment and their significance. • Physical layout of PLC, operator stations and process. • Specific requirement about voltage levels for field devices. • Elements to be hardwired. • Operator station requirements.
  • 51. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Creating I/O list
  • 52. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Deciding hardware configuration of PLC system • The following deciding factors should also be taken into consideration while going for PLC configuration: • Physical layout of process equipment (decides whether to go for local I/Os or remote I/Os). • Specifications of instruments and other devices. • Nature and volume of process (decides type of CPU and I/Os to be used). • Voltage standards (decides type of modules and PLC interrogation voltages). • Communication requirement of PLC (decides CPU, communication modules, communication medium). • Future expansion in process (CPU and interface cards should accommodate further expansion). • Compatibility with operator stations. • Technical competitiveness. • Readily available spares. • After sales technical support.
  • 53. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Typical PLC Hardware configuration
  • 54. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare I/O addressing
  • 55. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Developing program structure Try to focus on individual pieces one by one. Ask the following questions to yourself: • What is the physical division of piece of process? • What are the inputs for this piece of process? • What are the outputs for this piece of process? • What other information required? • What is the sequence of operation? When you start thinking about these questions, keep the piece of process at the centre, and you are gradually moving towards the solution.
  • 56. Technology Training that Workswww.idc-online.com/slideshare Technology Training that Workswww.idc-online.com/slideshare Hot slab rolling process
  • 57. Technology Training that Workswww.idc-online.com/slideshare Thank You For Your Interest If you are interested in further training, please visit: IDC Technologies Short Courses: Two-day practical courses available to the public: http://www.idc-online.com/slideshare

Editor's Notes

  • #2: Introduction Reviews current and emerging trends in the engineering employment market – with a focus on WA. My intention is to put things into perspective in the background of WA’s persistent skills shortage. So you can go away with a better idea of what employers are looking for and what qualification, skills and experience are “in-demand” Catch phrase has an underlying message. – particularly for prospective job applicants – more on that later.