Unit 2
Unit 2
Unit 2
P.Srinivas
Assistant Professor
CONTENTS
Programmable logic controller (PLC) basics:
Definition
Overview of PLC systems
Input / Output modules
Power supplies and Isolators.
Basic PLC programming:
Programming On-Off inputs/ outputs.
Creating Ladder diagrams
Basic PLC functions
PLC Basic Functions
Register Basics
Timer Functions
Counter Functions.
INDUSTRIAL AUTOMATION
WHAT IS PLC
Definition
A PLC is a user friendly, Microprocessor based specialized
computer that carries out control functions of many types and
levels of complexity.
39
Ladder Diagram Programming
Language
• The programming language most commonly
used with programmable logic controllers is
the ladder diagram
• Ladder diagram programming is built into the
software of most PLCs
40
Ladder Diagram Programming
• Ladder logic language closely resembles hardwired relay
circuits
• The symbols represent an instruction set that perform
various logic and on-off functions
• There are five categories of instructions
– Relay Logic
– Timers
– Counters
– Data Manipulation
– Arithmetic
41
Relay Logic Instructions
• These are the most common instructions found in
PLCs
• The relay logic instructions are:
– Examine On -| |-
– Energize Output -( )-
– Branching - used to implement parallel inputs
– Examine Off -|/|-
– Latch On Output -(L)-
– Unlatch Output -(U)-
42
Construction of PLC Ladder Diagrams
PROCESS SCANNING CONSIDERATIONS
STEPS IN PLANNING A PROGRAM
FOR A LARGE PROCESS ARE
1.Define the process to be controlled
2.Make a sketch of the process operation.
3.Create a written step sequence listing for the process
4.Add sensors on the sketch as needed to carry out the control sequence.
5.Add manual controls as needed for process setup or operational checking.
6.Consider the safety of the operating personnel and make additions and
adjustments as needed.
7.Add mater stop switches as required for safe shutdown.
8.Create the ladder logic diagram that will be used as a basis for the PLC
program.
9.Consider the “what if’s” where the process sequence may go astray .
PLC Basic Functions
Register Basics
Timer Functions
Counter Functions.
Register Basics
• With in the PLC CPU, registers are found in
two locations.
Internal Registers
• Help the Control and Arithmetic Logic units
with in the processor to carry out their tasks.
External Registers
• To hold variable information.
Module Addressing
•I/O Modules along with the processor module
and power supply sit in a chassis, a physical
hardware assembly.
•I/O modules are actually placed in an I/O Rack.
•Each I/O module in turn consists of I/O groups
made up of set of terminals
Common Types of five PLC Registers
Holding Registers
Input Registers
Single
Group
Output Registers
Single
Group
Holding Registers
A holding or working register (HR)‘holds’ the
contents of a calculation , arithmetic or logic
Fig:PLC Registers
Input Registers : Single and Group
•The input register has basically the same
characteristics as the holding register except
that it is readily accessible to the input module’s
terminals or ports
•The number of i/p registers in a PLC is normally
one-tenth of that of holding registers
Input Group Register Scheme
Input Group/Input Port Numbering scheme
Output Registers : Single and Group
Like the input registers,the output registers has
basically the same characteristics as the holding
register .
It is readily accessible to the input module’s
terminals or ports
The number of i/p registers in a PLC is normally
equal to thr no.of input registers.
Output Group register Scheme
Timer Instructions
90
Timer Programming
• A separate address file for timers is provided in
PLCs
• File addresses begin at T4:0
• Once the address is entered, the following
characteristics are entered:
– Time base
– Preset value
– Accumulated value
91
Timer Words
• Each timer in a PLC uses three words to store data
• The second and third words store the preset and
accumulated values
• The first word contains status bits related to time
status
92
Timer On-Delay
• The Timer On-delay
begins timing when rung
conditions go true
• When the accumulated
value equals the preset
value, the timer stops
timing and the output is
energized as bit 13 is set
93
Timer On-Delay Application
94
Timer Off-Delay
• When the condition of the
rung goes false, the timer
off-delay begins timing
• When the accumulated
value equals the preset
value, the output is
energized
• When the rung goes true,
the counter is reset to
zero
95