Date post: | 14-Apr-2018 |
Category: |
Documents |
Upload: | umairahmad143 |
View: | 256 times |
Download: | 1 times |
of 31
7/30/2019 Programmable Controller Logic
1/31
PROGRAMMABLE CONTROLLER LOGIC
7/30/2019 Programmable Controller Logic
2/31
What is a Programmable Logic
controller ?
A PLC consists of :
.a CPU contain an application Program,
and
. Interfacing input and output modules.CPU retrieves, decode, store, and processinformation. It executes the controller programstored in the PLC memory.
CPU is brain of a PLC and it function like a CPU
of a regular computerexcept thatCPU of aPLC uses special instructions and coding toperform its function.
7/30/2019 Programmable Controller Logic
3/31
PLC BLOCK DIAGRAM
Physical parts of a PLC
CPU has three parts:
. the processor:
It codes, decodes and
compute data.
. the memory system:
It stores both control
program and the
equipment connectedto the PLC.
. the power supply: Itprovides voltage & current
PLC needs to operate
7/30/2019 Programmable Controller Logic
4/31
MEMORY SYSTEM OF PLC
7/30/2019 Programmable Controller Logic
5/31
Memory system
It holds the operating system anduser memory
Operating system is system
software that co-ordinates the PLCladder program.
User memory stores Time & counter
Available memory choices -depending on user need: RAM, ROM& EPROM.
7/30/2019 Programmable Controller Logic
6/31
RAM, ROM & EPROM
Random Access Memory (RAM)
. Where data can be directly
addressed at any address.
. Data can be written in read from RAM.
. It is temporary storage, volatile (lost if
power is lost.
. It required batter back up to retain data
in the event of power loss.
7/30/2019 Programmable Controller Logic
7/31
Read Only Memory (ROM)
ROM is nonvolatile memory. It is used
to protect data or program from
accidental erasure.
Rom normally store programs the
define the capability of the PLC.
7/30/2019 Programmable Controller Logic
8/31
Erasable Programmable Read Only Memory
(EPROM)
It provides security against
unauthorized and unwanted changes
in a program.
EPROMs are designed to store data
in them but not easily altered.
They may be UVPROMs or
EEPROMs
7/30/2019 Programmable Controller Logic
9/31
Firmware
User or specific program burned into
EPROM.
Firmware gives the PLC its basic
functionality.
7/30/2019 Programmable Controller Logic
10/31
INPUT/OUTPUT SYSTEM
7/30/2019 Programmable Controller Logic
11/31
Input/Output (I/O) System
Section of PLC to which all of the field devices areconnected.
If CPU is thought as brain of a PLC, then I/O systemcan be thought its arm and legs.
I/O system physically carries out the control commandsfrom the program stored in the PLC memory.
I/O system has two main parts
. the rack: Enclosure attached to CPU to insert I/O
modules
. I/O modules: Circuit boards with connection
terminals to which field devices are wired.
I/O system creates physical connection between the fieldequipment and PLC.
In small PLC I/O modules are packaged as single unit.
7/30/2019 Programmable Controller Logic
12/31
Input Devices
Devices that supply signal/data to
PLC e.g. push buttons, switches and
measuring devices.
Input devices tells PLC Hay,
something is happening there.
Input devices may be either
Discrete or digital Input Devices, or
Analog Input Devices
7/30/2019 Programmable Controller Logic
13/31
Discrete or digital input devices
They provide two bitinformation.
Examples are pushbuttons,toggle switches, limitswitches, proximity
switches and contactclosures of relay
They are connected to PLCdigital input terminals onthe I/O module.
On condition is referred asa logic 1(HIGH) and OFFcondition as logic 0 (LOW).
7/30/2019 Programmable Controller Logic
14/31
Analog input devices
They provide informationas continuous, variablesignal.
Typical analog input mayvary from 0 to 20 mA, 4 to20 mA or 0 to 10 Volts.
Examples are leveltransmitter monitoring thelevel of liquid in a tank.pushbuttons, toggleswitches, limit switches,proximity switches and
contact closures of relayThey are connected to PLCanalog input terminals onthe I/O module.
7/30/2019 Programmable Controller Logic
15/31
Output Devices
They await signal/data from PLC to
perform their control.
Examples: lights, horns, motors and valve
They state in their previous state until PLC
says you need to turn on now or youd
better open up your valve a little more etc.
Input devices may be either. Discrete or digital Input Devices, or
. Analog Input Devices
7/30/2019 Programmable Controller Logic
16/31
Discrete or digital Output devices
They are either in ON orOFF condition
Examples are digilalactuators are solenoids,contactor coils, lamps etc.
They are connected to PLCdigital input terminals onthe I/O module.
On condition is referred asa logic 1(HIGH) and OFFcondition as logic 0 (LOW).
7/30/2019 Programmable Controller Logic
17/31
Analog Output devices
They operate incontinuous, variablemanner.
Their output may vary from0 to 20 mA, 4 to 20 mA or0 to 10 Volts that drive an
analog meter.Examples are speed,weight, temperature orlevel of liquid in a tank.pushbuttons, toggle
Complex output device
may be a current topneumatic transducer withair-operated flow-controlvalve.
7/30/2019 Programmable Controller Logic
18/31
PLC SCAN CYCLE
7/30/2019 Programmable Controller Logic
19/31
Scan Cycle
Monitor-Execute-Update
SCAN Cycle: PLC programis executed as a part ofrepetitive process calledSCAN.
1. CPU reads the status ofinputs
2. application programexecuted using
the status of the inputs.
3. Program completed, CPUperforms internaldiagnostics andcommunication tasks
4. scan cycle ends withupdating the outputs
Cycle Time depends on thesize of the program, thenumber of I/Os, and theamount of communicationrequired.
Monitor ..Checks inputs
Inputs
Scan Execute .. Executesthe
Program control program
Change .. and updatesOutputs the oputputs
7/30/2019 Programmable Controller Logic
20/31
Programming Languages
Program: Set of
instructions to
accomplish a task.
Types of Programs
Ladder Logic (LAD)
uses components
resembling elements
used in the diagram
format to describehardwired control.
7/30/2019 Programmable Controller Logic
21/31
Programming Languages
Left Vertical Line:Power conductor
Right Vertical Line:Return path
Rungs refer tonetworks having singleof several elementsbut only one outputcoil in each rung.
Ladder logic diagramare read from left-to-right, top-to-bottom.
7/30/2019 Programmable Controller Logic
22/31
Example LCD Program
1st Instructioncombination: I0.0,I0.1and Q0.0 represent ifinputs I0.0 and I0.1are energized output
relay Q0.0 energizes.2nd instructionCombination: I0.4,I0.5and Q1.1 represents ifeither
input 10.4 or 10.5 areenergized, outputrelay Q1.1 energizes.
7/30/2019 Programmable Controller Logic
23/31
Statement List (STL)
Another view of set of Instruction
Network 1
Operand I/O address
LD I0.0
A I0.1
= Q0.0
Network 2
LD I0.4
O I0.5
= Q0.1
7/30/2019 Programmable Controller Logic
24/31
Functional Block Diagram (FBD)
Another view of set of Instruction
Each function designated as a task
FUNCTIONS are indicated by rectangles
with input shown on its left-hand side andoutput shown on right-hand side.
Network 1
I0.0
I0.1
Network 2
AND
7/30/2019 Programmable Controller Logic
25/31
Selection of PLC
This decision will depend on the basic criteria
listed belowNumber of logic inputs and outputs-often 1k andup. Need is dictated by size of ladder diagramprogram. A ladder element will occupy only a fewbytes and will be listed in the manufacture
documentation.Number of special I/O modules- forexoticapplications- a large number add-on special cardsmay be required.
Scan Time -Typical 1 ms/ladder instruction.
Shorter the scan time, higher the cost of PLC.Communication-Serial and networked connectionallow the PLC to be programmed and talk to theother PLC.
Software- Programming and other software
determine the ease of programming anddebugging.
7/30/2019 Programmable Controller Logic
26/31
PLC MEMORY TIME ESTMATE- Part A
Project ID ------------------------
Name ------------------------------
Date: ------------------------------
Instructio
n type
Time Max Time
min
Instruction
memory (words
Instruction Data
(words)
Instruction Count Total
Memory
(words)
Min Time Max.
time
Contacts
Outputs
Timesa
counters
7/30/2019 Programmable Controller Logic
27/31
System Architecture
7/30/2019 Programmable Controller Logic
28/31
PLC Input & Output Circuits
7/30/2019 Programmable Controller Logic
29/31
Basic PLC Programming
Programming may be done offline or online
Offline Programming Mode: User program
editing, maintenance tasks. Need not to be
connected to programming device.Online Programming Mode: Programming
device connected required
Changes are downloaded in the PLC.Status of the I/Ov devices monitored
7/30/2019 Programmable Controller Logic
30/31
I/O Addressing
(SIEMENS S 7-200 SERIES)
The inputs and outputs are labeled at the wiringterminations and next to the status indicator.
Alphanumeric symbols identification of the I/Oaddress to which device is to be connected.
I = Discrete or digital inputQ = Discrete or digital input
For example:
I0.0 = Byte 0, Bit 0
I0.1 = Byte 0, Bit 1I1.0 = Byte 1, Bit 0
I1.1 = Byte 1, Bit 1
7/30/2019 Programmable Controller Logic
31/31
I0.0 Input 1
I0.1 Input 2
I0.2 Input 3
I0.3 Input 4
I0.4 Input 5
I0.5 Input 6
I0.6 Input 7
I0.7 Input 8
I1.8 Input 9
0.9 Input 10
I0.10 Input 11
I0.0 Input 12
I0.0 Input 13
I0.0 Input 14