Unit IV PLC Programming
Unit IV PLC Programming
PLC Programming
Contents
Introduction to PLC
Architecture of PLC
Selection of PLC
Latching
Timers
Counters
functions
Introduction
Timing
Counting
Arithmetic logic
Data Manipulation
Communication
Controllers: Faster
Application Requirement
Memory Requirement
CPU Requirement
Software Requirement
Operate interface
Communication requirement
Environmental Requirements
Components of PLC
Input Devices
Comparators
Input Output
Relay Sequencers
Video
From Relay to Computer Based
Controllers
Input and output variables are binary in nature
Special Functions e.g. time delay, counters are easy to change through
software
Architecture of PLC
Components of PLC
Input Module
Output Module
CPU
Memory
Power Supply
Programming Device
Communication
Channel
Input Module of PLC
Module Examines state of physical switches
Solenoids
It accepts 0 or 1 from the processor and uses it to turn ON or OFF Motors,
Lights, etc.
Output module channel has indicator to show ON/OFF of operations
Processor
Processor is computer
Brain of PLC
Uses Microprocessor
Memory
Types
cable
Types
System Bus: Communications between the I/P O/P ports & I/P O/P unit
Communication Channel
Types of PLC
Modular (Rack)
Processor
Types of PLC
After evaluation of Rung, last known state of each switch & relay contact is
considered
If any true path to the output device is detected then O/P is said to be
Bank Rule: To open the vault at least two officers must be present
Develop the ladder diagram to unlatch the door and turn ON the light when two
Solution:
When accumulated time ticks = preload value; timer itself becomes true
PLC Timer Function
EN =Enabled
DN =Done
Timer =T: 1
0.01 seconds
Preset =0.01 s x 500 = 5 s
current count
Example: Traffic Light
Red Light on for 31 seconds, Green light on for 28 seconds, amber light is on
for 6 seconds.
PLC Counter Function
Counter counts input changes from False to True
After becoming TRUE it actuates some other part of the Ladder Diagram
PLC Counter Function
EN =Enabled
DN =Done
Counter =C: 1
Preset =Counter gets to
TRUE
Accumulator =Holds the value of
current count
SCADA
Supervisory Control and Data Acquisition
Manufacturing,
Production
Power Generation
Fabrication
Refining
CR 1
CR 1 LA V1
CR 1 LA T:1
Time base 0.01
Preset 500
Accum 00
T1 M
T1 LB P2
P2
P2 V2
PLC Examples Conveyor
Start Push Button to start the conveyor motor
Bottles move past the photosensor & conveyor motor automatically after
the count of 25 Bottles
Counter to be set at zero after 25 counts
Conveyor motor can be stopped manually at any time
Count of the counter is reset manually by means of count reset button
Start Push Button to start the conveyor motor
Bottles move past the photosensor & conveyor motor automatically after the count of
25 Bottles
Counter to be set at zero after 25 counts
Conveyor motor can be stopped manually at any time
Count of the counter is reset manually by means of count reset button
Motor Start
Resetting Relay
(Rung 1)