0% found this document useful (0 votes)
23 views

PLC HW & Programming

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

PLC HW & Programming

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 171

Rayat Shikshan Sanstha’s

KARMAVEER BHAURAO PATIL


POLYTECHNIC,
SATARA

PLC Hardware & Programming


Department Of Electronics And Telecommunication Engineering
Control System and PLC
EJ5G Subject Code: 17536 Third Year Entc

Amit Nevase
Lecturer,
Department of Electronics & Telecommunication Engineering,
Karmaveer Bhaurao Patil Polytechnic, Satara
Objectives

The student will be able to:

 Understand classifications of control system.

 Understand Steady state, time response, and frequency


response analysis.

 Analyze the Stability of control system using RH criteria.

 Understand the fundamentals and diff. Hardware parts of


PLC.

 Draw ladder diagrams to program PLC


10/6/2016 Amit Nevase 3
Teaching & Examination Scheme

Teaching Scheme Examination Scheme

PAPER
TH TU PR TH PR OR TW TOTAL
HRS

03 -- 02 03 100 50# --- 25@ 175

 Two tests each of 25 marks to be conducted as per the schedule


given by MSBTE.
 Total of tests marks for all theory subjects are to be converted out
of 50 and to be entered in mark sheet under the head Sessional
Work (SW).

10/6/2016 Amit Nevase 4


Module I – Introduction to Control System
 Introduction to Control systems (4 Marks)
 Control System – Definition and Practical Examples
 Classification of Control System : Open Loop and Closed Loop Systems –
Definitions, Block diagrams, practical examples, and Comparison, Linear and
Non-linear Control System, Time Varying and Time In-varying Systems
 Servo System : Definition, Block Diagram, Classification (AC and DC Servo
System), Block diagram of DC Servo System.
 Laplace Transform and Transfer Function (4 Marks)
 Laplace Transform : Signifiance in Control System
 Transfer Function : Definition, Derivation of transfer functions for Closed loop
Control System and Open Loop Control System, Differential Equations and
transfer functions of RC and RLC Circuit
 Block Diagram Algebra (8 Marks)
 Order of a System : Definition, 0,1,2 order system Standard equation, Practical
Examples
 Block Diagram Reduction Technique: Need, Reduction Rules, Problems
10/6/2016 Amit Nevase 5
Module II – Time Response Analysis
 Time Domain Analysis (4 Marks)
 Transient and Steady State Response
 Standard Test Inputs : Step, Ramp, Parabolic and Impulse, Need, Significance
and corresponding Laplace Representation
 Poles and Zeros : Definition, S-plane representation
 First and Second order Control System (8 Marks)
 First Order Control System : Analysis for step Input, Concept of Time Constant
 Second Order Control System : Analysis for step input, Concept, Definition and
effect of damping
 Time Response Specifications (8 Marks)
 Time Response Specifications ( no derivations )
 Tp, Ts, Tr, Td, Mp, ess – problems on time response specifications
 Steady State Analysis – Type 0, 1, 2 system, steady state error constants,
problems

10/6/2016 Amit Nevase 6


Module III – Stability

 Introduction to Stability (4 Marks)


 Definition of Stability, Analysis of stable, unstable, critically stable
and conditionally stable
 Relative Stability
 Root locations in S-plane for stable and unstable system

 Routh’s Stability Criterion (8 Marks)


 Routh’s Stability Criterion : Different cases and conditions
 Statement Method
 Numericals Problems

10/6/2016 Amit Nevase 7


Module IV – Control Actions

 Process Control System (4 Marks)


 Process Control System – Block diagram, explanation of each block

 Control Actions (8 Marks)


 Discontinuous Mode : On-Off Controller, Equation, Neutral Zone
 Continuous modes: Proportional Controller (offset, proportional
band), Integral Controllers, Derivative Controllers – output
equations, corresponding Laplace transforms, Response of P, I, D
controllers
 Composite Controllers : PI, PD, PID Controllers – output equations,
response, comparison

10/6/2016 Amit Nevase 8


Module V – PLC Fundamentals
 Introduction (4 Marks)
 Evolution of PLC in automation, need and benefits of PLC in
automation
 Block Diagram of PLC (12 Marks)
 Block diagram and description of different parts of PLC -
 CPU Function, Scanning cycle, speed of execution, Power supply
function,
 Memory – function , organization of ROM and RAM
 Input modules – function, different input devices used with PLC
and their uses
 Output modules – function, different output devices used with
PLC and their uses
 Fixed and Modular PLCs
10/6/2016 Amit Nevase 9
Module VI – PLC Hardware and Programming
 PLC Hardware (8 Marks)
 Discrete Input Modules – Block diagram, typical wiring details, Specifications of
AC input modules and DC input modules. Sinking and sourcing concept in DC
input modules
 Discrete Output Modules – Block diagram, typical wiring details, Specifications
of AC output modules and DC output modules.
 Analog Input and output modules : Block diagram, typical wiring details and
specifications
 PLC Programming (16 Marks)
 I/O Addressing in PLC
 PLC Instruction Set : Relay instructions, timer instructions, counter instructions,
data handling instructions, logical and comparison instructions
 PLC programming examples based on above instruction using Ladder
programming

10/6/2016 Amit Nevase 10


Module-VI
PLC Hardware & Programming
Specific Objectives

Explain the details of diff. I/O modules of PLC.

Get familiar with the instruction set of PLC

system.

Develop PLC programming skills.

10/6/2016 Amit Nevase 12


Module VI – PLC Hardware and Programming
 PLC Hardware (8 Marks)
 Discrete Input Modules – Block diagram, typical wiring details, Specifications
of AC input modules and DC input modules. Sinking and sourcing concept in
DC input modules
 Discrete Output Modules – Block diagram, typical wiring details, Specifications
of AC output modules and DC output modules.
 Analog Input and output modules : Block diagram, typical wiring details and
specifications
 PLC Programming (16 Marks)
 I/O Addressing in PLC
 PLC Instruction Set : Relay instructions, timer instructions, counter instructions,
data handling instructions, logical and comparison instructions
 PLC programming examples based on above instruction using Ladder
programming

10/6/2016 Amit Nevase 13


Input Modules

 Input modules serve as the link between field devices and the
PLC’s CPU.

 Each input module has a terminal block for attaching input


wiring from each individual field input device.

 Typically input modules have either 8, 16 or 32 input terminals.

 The main function of an input module is to take the field device


input signal, convert it to a signal level that the CPU can work
with, electrically isolate it, and send the signal, by the way of the
backplane board, to the CPU.

10/6/2016 Amit Nevase 14


Discrete Input Modules

 The discrete input module is the most common input

interface used with programmable controllers.

Discrete input signals from field devices can be either

AC or DC.

10/6/2016 Amit Nevase 15


Discrete Input Modules
The most common types are listed below:
AC Input Modules DC Input Modules

24 VAC 24 V dc

48 VAC 48 V dc

120 VAC 10-60 V dc


240 VAC 120 V dc

120 Volts Isolated 230 V dc

240 Volts Isolated Sink/Source 5-50 V dc


24 VAC/DC 5/12 V dc TTL
10/6/2016 Amit Nevase 16
Typical Wiring Details

Input Input
Module Module

24 Volts
Common Common
230 Volts

Common Common
120 Volts

10/6/2016 Amit Nevase 17


Block diagram of AC input module

Input Bridge Noise & Threshold Input


Optical
Signal Rectifier Debounce Detector Isolation
Logic CPU Status
Filter Table

LED

10/6/2016 Amit Nevase 18


AC Input Module Specifications

 Voltage: This is the operating voltage at 47 to 63 Hertz

for the module.

 Inputs: This indicates the number of inputs the

module has.

10/6/2016 Amit Nevase 19


AC Input Module Specifications

 Points per common: This is the number of input points


that share the same common connection. As an
example, one 16 point input module could have all
input points sharing one common, and a different 16
point input module might have two groups of 8 input
points. Each group of 8 would have its own separate
common.

10/6/2016 Amit Nevase 20


AC Input Module Specifications

 Backplane Current Draw: Each module takes power


from the PLCs power supply to operate the electronics
on the module. This specification will be used when
calculating power supply loading.

 Maximum signal delay: Signal delay is the time it takes


for the PLC to pick up the field input signal, digitize it,
and store it in the memory. This specification is usually
listed for signal turning on and for a signal turning off.

10/6/2016 Amit Nevase 21


AC Input Module Specifications

 Nominal input current: this is the current drawn by an


input point at nominal input voltage.

 Maximum Inrush Current: this is the maximum inrush


current the module can handle.

 Maximum off state current: this is the maximum


amount of current, typically from leakage from a solid
state input device, that a module can accept while
remaining in an OFF state.
10/6/2016 Amit Nevase 22
Block diagram of DC input module

+
Input Power Noise & Threshold Optical Input
Signal Conversion Debounce Detector Isolation Logic CPU Status
- Filter Table

LED

10/6/2016 Amit Nevase 23


DC Input Module Specifications

 Maximum Off state current: This is the maximum

amount of leakage current allowed in an input circuit

from an input device that will keep the input circuit in

an OFF state.

10/6/2016 Amit Nevase 24


Sinking/Sourcing

Input
Device
+ +

Input Input
Module Module

- -
Input
Device
(a) (b)

10/6/2016 Amit Nevase 25


Sinking/Sourcing

Output Output
Module Module

- +

Output Output
Load Load
(c) (d)

10/6/2016 Amit Nevase 26


Module VI – PLC Hardware and Programming
 PLC Hardware (8 Marks)
 Discrete Input Modules – Block diagram, typical wiring details, Specifications of
AC input modules and DC input modules. Sinking and sourcing concept in DC
input modules
 Discrete Output Modules – Block diagram, typical wiring details,
Specifications of AC output modules and DC output modules.
 Analog Input and output modules : Block diagram, typical wiring details and
specifications
 PLC Programming (16 Marks)
 I/O Addressing in PLC
 PLC Instruction Set : Relay instructions, timer instructions, counter instructions,
data handling instructions, logical and comparison instructions
 PLC programming examples based on above instruction using Ladder
programming

10/6/2016 Amit Nevase 27


Output Modules

 Output modules serve as the link between the PLC’s


microprocessor and hardware field devices.
 Each output module has a terminal block for attaching output
wiring to go to each individual field output device.
 Typical output modules have either 8, 16 or 32 output terminals.
 The output signal once received from the CPU, must be stored
before being sent to each output module’s output screw
terminals.
 The storage area for output signals is called the output status
file.
10/6/2016 Amit Nevase 28
Discrete Output Modules

 Much like discrete inputs, discrete outputs are the


most commonly used type.

 Discrete output modules simply act as switches to


control output field devices.

 They fall into two classifications: solid state switching


and relay output switching.

10/6/2016 Amit Nevase 29


Common Discrete Output Modules
Discrete Output Modules

Solid State Outputs Relay Outputs

AC output Modules DC output Modules Relay Output modules

12, 24, 48 VAC TTL Level Relay Output

120 VAC 12, 24, 48 V dc Isolated relay output

230 VAC 120 V dc Relay output

230 V dc

24 V dc, sink

24 V dc, source
10/6/2016 Amit Nevase 30
Typical Wiring Details of Output Module

Output
Module
Output 2

Output 3

Output 4

Output 5
Load
120 VAC
Signal From
CPU operates switch COM

User supplied
Power for
Field devices

10/6/2016 Amit Nevase 31


Block diagram of AC output Module

Fuse
Signal Latch Triac Controlled
Optical Filter
From Logic Switching Device
Isolation
CPU Circuit Circuit

LED

10/6/2016 Amit Nevase 32


Block diagram of AC output Module

10/6/2016 Amit Nevase 33


Solid State Output Switching

 In solid state AC output module, a triac is used to


switch the AC high voltage and current controlling the
ON or OFF state of the field hardware device. A triac is
a solid state device used to switch AC.

10/6/2016 Amit Nevase 34


Relay Output Switching

 Relay output modules are also known as contact or dry


contact outputs.

 Even though relay output modules are used to switch AC


or DC loads, usually relay outputs are used to switch small
currents at low voltages, to multiplex analog signals, and to
interface control signals to variable speed drives.

 Relay output modules use actual mechanical relays, one


for each output point, to switch the output signal from the
output status file.
10/6/2016 Amit Nevase 35
Relay Output Switching
Common
to other L-1 L-2
points Output
Module

ON or OFF
Signal from
Output status
table
Fuse

Relay
Switching
Device

10/6/2016 Amit Nevase 36


Block diagram of DC output module

Power Fuse
Signal Latch Transistor Controlled
Optical Filter
From Logic Switching Device
Isolation
CPU Circuit Circuit

LED

10/6/2016 Amit Nevase 37


Specifications of DC output module
Sourcing Output Module Specifications
Operating Voltage 10/50 V dc

Number of Outputs 16

Output points per common 16

Backplane Current draw 0.280 amp at 5 V dc

ON= 0.1 ms
Maximum Signal Delay
OFF= 1.0 ms

Maximum OFF state leakage 1 mA

Minimum Load Current 1 mA

ON state voltage Drop 1.2 Volts at 10 amps


10/6/2016 Amit Nevase 38
Module VI – PLC Hardware and Programming
 PLC Hardware (8 Marks)
 Discrete Input Modules – Block diagram, typical wiring details, Specifications of
AC input modules and DC input modules. Sinking and sourcing concept in DC
input modules
 Discrete Output Modules – Block diagram, typical wiring details, Specifications
of AC output modules and DC output modules.
 Analog Input and output modules : Block diagram, typical wiring details and
specifications
 PLC Programming (16 Marks)
 I/O Addressing in PLC
 PLC Instruction Set : Relay instructions, timer instructions, counter instructions,
data handling instructions, logical and comparison instructions
 PLC programming examples based on above instruction using Ladder
programming

10/6/2016 Amit Nevase 39


Analog Input Module

User
Connection
+

Opto Backplane Input


A/D Micro
Converter Isolation Processor Interface CPU Status
VLSI Table

User
Connection
+

COM

10/6/2016 Amit Nevase 40


Module VI – PLC Hardware and Programming
 PLC Hardware (8 Marks)
 Discrete Input Modules – Block diagram, typical wiring details, Specifications of
AC input modules and DC input modules. Sinking and sourcing concept in DC
input modules
 Discrete Output Modules – Block diagram, typical wiring details, Specifications
of AC output modules and DC output modules.
 Analog Input and output modules : Block diagram, typical wiring details and
specifications
 PLC Programming (16 Marks)
 I/O Addressing in PLC
 PLC Instruction Set : Relay instructions, timer instructions, counter instructions,
data handling instructions, logical and comparison instructions
 PLC programming examples based on above instruction using Ladder
programming

10/6/2016 Amit Nevase 41


I/O Addressing

 The PLC has to be able to identify each particular input


and output. It does this by allocating addresses to each
input and output.

 With a small PLC this is likely to be just a number,


prefixed by a letter to indicate whether it is an input or
an output.

10/6/2016 Amit Nevase 42


I/O Addressing

 With larger PLCs that have several racks of input and


output channels, the racks are numbered.

 With the Allen-Bradley PLC-5, the rack containing the


processor is given the number 0 and the addresses of
the other racks are numbered 1, 2, 3, and so on,
according to how setup switches are set.

 Each rack can have a number of modules, and each


one deals with a number of inputs and/or outputs.
10/6/2016 Amit Nevase 43
I/O Addressing

I=Input Module
O=Output Number

X :X X X / X X
Terminal
Number

Rack
Number

10/6/2016 Amit Nevase 44


Module VI – PLC Hardware and Programming
 PLC Hardware (8 Marks)
 Discrete Input Modules – Block diagram, typical wiring details, Specifications of
AC input modules and DC input modules. Sinking and sourcing concept in DC
input modules
 Discrete Output Modules – Block diagram, typical wiring details, Specifications
of AC output modules and DC output modules.
 Analog Input and output modules : Block diagram, typical wiring details and
specifications
 PLC Programming (16 Marks)
 I/O Addressing in PLC
 PLC Instruction Set : Relay instructions, timer instructions, counter instructions,
data handling instructions, logical and comparison instructions
 PLC programming examples based on above instruction using Ladder
programming

10/6/2016 Amit Nevase 45


Programming Languages

 Ladder Diagram (LD):a graphical depiction of a process


with rungs of logic, similar to the relay ladder logic
schemes that were replaced by PLCs.

 Sequential Function Charts (SFC): a graphical depiction of


interconnecting steps, actions, and transitions.

 Instruction List (IL): assembler type, text based language


for building small applications or optimizing complex
systems.

10/6/2016 Amit Nevase 46


Programming Languages

 Function Block Diagram (FBD): a graphical depiction of


process flow using simple and complex
interconnecting blocks.

 Structured Text (ST): a high-level, text-based language


such as BASIC, C, or PASCAL specifically developed for
industrial control applications.

10/6/2016 Amit Nevase 47


PLC Ladder Programming

 A very commonly used method of programming PLCs


is based on the use of ladder diagrams.

 Writing a program is then equivalent to drawing a


switching circuit.

 The ladder diagram consists of two vertical lines


representing the power rails.

 Circuits are connected as horizontal lines, that is, the


rungs of the ladder, between these two verticals.
10/6/2016 Amit Nevase 48
In drawing a ladder diagram, certain conventions are adopted

 The vertical lines of the diagram represent the power


rails between which circuits are connected. The power
flow is taken to be from the left-hand vertical across a
rung.
 Each rung on the ladder defines one operation in the
control process

10/6/2016 Amit Nevase 49


In drawing a ladder diagram, certain conventions are adopted
 A ladder diagram is read from left to right and from top to
bottom. Left Right
Power Flow
Power Power
Rail Rail
Rung 1
Rung 2
Rung 3
Rung 4

END End Rung


 The top rung is read from left to right.
 Then the second rung down is read from left to right and so on.
 When the PLC is in its run mode, it goes through the entire ladder
program to the end, the end rung of the program being clearly
denoted, and then promptly resumes at the start
10/6/2016 Amit Nevase 50
Scanning Ladder Diagram

Right Read the status of all


Left Power Flow Power the inputs & store
Power Rail memory
Rail
Rung 1
Read the inputs from
Rung 2 memory & implement
the program, storing
Rung 3 in the outputs in
memory
Rung 4

Update all the


outputs
END End Rung

10/6/2016 Amit Nevase 51


In drawing a ladder diagram, certain conventions are adopted

 Each rung must start with an input or inputs and must


end with at least one output. The term input is used for
a control action, such as closing the contacts of a
switch. The term output is used for a device connected
to the output of a PLC, such as a motor. As the program
is scanned, the outputs are not updated instantly, but
the results stored in memory and all the outputs are
updated simultaneously at the end of the program scan

10/6/2016 Amit Nevase 52


In drawing a ladder diagram, certain conventions are adopted

 Electrical devices are shown in their normal condition.


Thus a switch that is normally open until some object
closes it is shown as open on the ladder diagram. A
switch that is normally closed is shown closed.

10/6/2016 Amit Nevase 53


In drawing a ladder diagram, certain conventions are adopted

 A particular device can appear in more than one rung


of a ladder. For example, we might have a relay that
switches on one or more devices. The same letters
and/or numbers are used to label the device in each
situation.

10/6/2016 Amit Nevase 54


In drawing a ladder diagram, certain conventions are adopted

 The inputs and outputs are all identified by their


addresses; the notation used depends on the PLC
manufacturer. This is the address of the input or
output in the memory of the PLC

10/6/2016 Amit Nevase 55


Module VI – PLC Hardware and Programming
 PLC Hardware (8 Marks)
 Discrete Input Modules – Block diagram, typical wiring details, Specifications of
AC input modules and DC input modules. Sinking and sourcing concept in DC
input modules
 Discrete Output Modules – Block diagram, typical wiring details, Specifications
of AC output modules and DC output modules.
 Analog Input and output modules : Block diagram, typical wiring details and
specifications
 PLC Programming (16 Marks)
 I/O Addressing in PLC
 PLC Instruction Set : Relay instructions, timer instructions, counter
instructions, data handling instructions, logical and comparison instructions
 PLC programming examples based on above instruction using Ladder
programming

10/6/2016 Amit Nevase 56


Relay Type Instructions

Sr. No. Instruction Description

1 XIC Examine if closed

2 XIO Examine if open

3 OTE Output Energize

4 OTL Output Latch

5 OTU Output Unlatch

10/6/2016 Amit Nevase 57


Representation of Contacts and Coils

 The ladder diagram language is basically a symbolic set


of instructions used to create the controller program.

 These ladder instruction symbols are arranged to


obtain the desired control logic that is to be entered
into the memory of the PLC.

 Because the instruction set is composed of contact


symbols, ladder diagram language is also referred to as
contact symbology.
10/6/2016 Amit Nevase 58
Representation of Contacts and Coils
 Representations of contacts and coils are the basic symbols
of the logic ladder diagram instruction set.
 The three fundamental symbols that are used to translate
relay control logic to contact symbolic logic are
- Examine If Closed (XIC),
- Examine If Open (XIO),
- Output Energize (OTE).
 Each of these instructions relates to a single bit of PLC
memory that is specified by the instruction’s address.
10/6/2016 Amit Nevase 59
Fundamental Symbols

Examine If Closed (XIC) Examine If Open (XIO)

Figure : Relay Contact Figure : Relay Contact

Output Energize (OTE)

Figure : Relay Coil

10/6/2016 Amit Nevase 60


Examine If Closed (XIC) Instruction
17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

1 I:012

I:012

04
Instruction is TRUE

17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

0 I:012

I:012

04
Instruction is FALSE
10/6/2016 Amit Nevase 61
Examine If Closed (XIC) Instruction

10/6/2016 Amit Nevase 62


Examine If Open (XIO) Instructions
17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

0 I:012

I:012

04
Instruction is TRUE
17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

1 I:012

I:012

04
Instruction is FALSE
10/6/2016 Amit Nevase 63
Examine If Open (XIO) Instructions

10/6/2016 Amit Nevase 64


Output Energize (OTE) Instruction

17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 O:013

17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 1 I:012

I:012 I:012 O:013

01 04 01

Figure : Output Energize (OTE) instruction - TRUE

10/6/2016 Amit Nevase 65


Output Energize (OTE) Instruction

17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 O:013

17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 I:012

I:012 I:012 O:013

01 04 01

Figure : Output Energize (OTE) instruction - FALSE

10/6/2016 Amit Nevase 66


Output Energize (OTE) Instruction

10/6/2016 Amit Nevase 67


OTL and OTU Instructions

Instruction Name Symbol Description

OTL sets the bit to "1"


when the rung
becomes true and
Output L
OTL retains its state when
Latch
the rung loses
continuity or a power
cycle occurs.
OTU resets the bit to
Output U "0" when the rung
OTU
Unlatch becomes true and
retains it.

10/6/2016 Amit Nevase 68


Module VI – PLC Hardware and Programming
 PLC Hardware (8 Marks)
 Discrete Input Modules – Block diagram, typical wiring details, Specifications of
AC input modules and DC input modules. Sinking and sourcing concept in DC
input modules
 Discrete Output Modules – Block diagram, typical wiring details, Specifications
of AC output modules and DC output modules.
 Analog Input and output modules : Block diagram, typical wiring details and
specifications
 PLC Programming (16 Marks)
 I/O Addressing in PLC
 PLC Instruction Set : Relay instructions, Timer instructions, counter
instructions, data handling instructions, logical and comparison instructions
 PLC programming examples based on above instruction using Ladder
programming

10/6/2016 Amit Nevase 69


Timer Instructions

Sr.
Instruction Name Description
No.
Counts time-based intervals when
1 TON On Delay Timer the instruction is true.

Counts time-based intervals when


2 TOF Off Delay Timer the instruction is false.
Counts time-based intervals when
the instruction is true and retains
3 RTO Retentive Timer the accumulated value when the
instruction goes false or when
power cycle occurs.

Resets a retentive timer’s


4 RES Reset accumulated value to zero.

10/6/2016 Amit Nevase 70


On Delay Timer Sequence
Input Timer

True

Rung Condition False

Time Period On Delay


Timed
Duration
True
On (Logic 1)
Timed Output Bit False
Off (Logic 0)
Preset Value= Accumulated Value

10/6/2016 Amit Nevase 71


TON – On Delay Timer Instruction

TON
TIMER ON DELAY
EN
Timer T4:0
Time Base 1:0 DN
Preset 15
Accumulated 0

 The On delay timer operates such that when the rung


containing timer is true, the timer timed out period
commences.
 At the end of the timer time out period, an output is made
active.

10/6/2016 Amit Nevase 72


TON – On Delay Timer Instruction
 Timer number —This number must come from the timer file. In the example
shown, the timer number is T4:0, which represents timer file 4, timer 0 in
that file. The timer address must be unique for this timer and may not be
used for any other timer.

 Time base —The time base (which is always expressed in seconds) may be
either 1.0 s or 0.01 s. In the example shown, the time base is 1.0 s.

 Preset value —In the example shown, the preset value is 15. The timer
preset value can range from 0 through 32,767.

 Accumulated value —In the example shown, the accumulated value is 0. The
timer’s accumulated value normally is entered as 0, although it is possible to
enter a value from 0 through 32,767. Regardless of the value that is
preloaded, the timer value will become 0 whenever the timer is reset.
10/6/2016 Amit Nevase 73
TON Instruction – Control Word

Timer Element
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Word
EN TT DN Internal Use 0

Preset Value PRE 1

Accumulated Value ACC 2

10/6/2016 Amit Nevase 74


TON Instruction – Control Word
 Enable (EN) bit —The enable bit is true (has a status of 1) whenever the

timer instruction is true. When the timer instruction is false, the enable bit is

false (has a status of 0).

 Timer-timing (TT) bit —The timer-timing bit is true whenever the

accumulated value of the timer is changing, which means the timer is

timing. When the timer is not timing, the accumulated value is not changing,

so the timer-timing bit is false.

 Done (DN) bit —The done bit changes state whenever the accumulated

value reaches the preset value. Its state depends on the type of timer being

used.

10/6/2016 Amit Nevase 75


Off Delay Timer Sequence
Input Timer

True

Rung Condition False

Timed Period Off Delay


Timed
Duration
True

Timed Output Bit On (Logic 1) False


Off (Logic 0)

Preset Value= Accumulated Value


10/6/2016 Amit Nevase 76
TOF – Off Delay Timer Instruction
TOF
TIMER OFF DELAY
EN
Timer T4:0
Time Base 1:0 DN
Preset 15
Accumulated 0

 The Off delay timer operation will keep the output


energized for a time period after the rung containing
the timer has gone false.

10/6/2016 Amit Nevase 77


TOF – Off Delay Timer Instruction
 Timer number —This number must come from the timer file. In the example
shown, the timer number is T4:0, which represents timer file 4, timer 0 in
that file. The timer address must be unique for this timer and may not be
used for any other timer.

 Time base —The time base (which is always expressed in seconds) may be
either 1.0 s or 0.01 s. In the example shown, the time base is 1.0 s.

 Preset value —In the example shown, the preset value is 15. The timer
preset value can range from 0 through 32,767.

 Accumulated value —In the example shown, the accumulated value is 0. The
timer’s accumulated value normally is entered as 0, although it is possible to
enter a value from 0 through 32,767. Regardless of the value that is
preloaded, the timer value will become 0 whenever the timer is reset.
10/6/2016 Amit Nevase 78
TOF Instruction – Control Word

Timer Element
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Word
EN TT DN Internal Use 0

Preset Value PRE 1

Accumulated Value ACC 2

10/6/2016 Amit Nevase 79


TOF Instruction – Control Word
 Enable (EN) bit —The enable bit is true (has a status of 1) whenever the

timer instruction is true. When the timer instruction is false, the enable bit is

false (has a status of 0).

 Timer-timing (TT) bit —The timer-timing bit is true whenever the

accumulated value of the timer is changing, which means the timer is

timing. When the timer is not timing, the accumulated value is not changing,

so the timer-timing bit is false.

 Done (DN) bit —The done bit changes state whenever the accumulated

value reaches the preset value. Its state depends on the type of timer being

used.

10/6/2016 Amit Nevase 80


RTO – Retentive Timer
RTO
RETENTIVE TIMER ON
EN
Timer T4:0
Time Base 1:0 DN
Preset 15
Accumulated 0

 A retentive timer accumulates time whenever the


device receives power, and it maintains the current
time should power be removed from the device.
 Once the device accumulates time equal to its preset
value, the contacts of the device change state.
10/6/2016 Amit Nevase 81
RTO – Timer Programmed Logic

PB1 RTO
RETENTIVE TIMER ON
EN
Timer T4:0
Time Base 1:0 DN
Preset 7
Accumulated 0

T4:2 PL

DN

10/6/2016 Amit Nevase 82


83

------------------------------------------------------------------------------------
Acc Value = Pre Value

------------------------------------------------------------------------------------
7
6
5
4

------------------------------------------------------------------------------------

Amit Nevase
------------------------------------------------------------------------------------
3
RTO – Timer Sequence

2
1
When rung condition goes false

0
Accumulated Value retained
------------------------------------------------------------------------------------
True

False

Off

Off
Off

On

On
On

Accumulated

PL Output
Timer T4:2
Time Input

Timer T4:2

10/6/2016
Enable Bit

Done Bit
Value
RES – Reset Instruction
Reset T4:2

RES

 Because the retentive timer does not reset to 0 when the


timer is de-energized, the reset instruction RES must be
used to reset the timer.
 The RES instruction given the same address (T4:2) as the
RTO.
 When reset pushbutton closes, RES resets the accumulated
time to 0 and DN bit to 0, turning output off.
10/6/2016 Amit Nevase 84
Module VI – PLC Hardware and Programming
 PLC Hardware (8 Marks)
 Discrete Input Modules – Block diagram, typical wiring details, Specifications of
AC input modules and DC input modules. Sinking and sourcing concept in DC
input modules
 Discrete Output Modules – Block diagram, typical wiring details, Specifications
of AC output modules and DC output modules.
 Analog Input and output modules : Block diagram, typical wiring details and
specifications
 PLC Programming (16 Marks)
 I/O Addressing in PLC
 PLC Instruction Set : Relay instructions, timer instructions, Counter
instructions, data handling instructions, logical and comparison instructions
 PLC programming examples based on above instruction using Ladder
programming

10/6/2016 Amit Nevase 85


Counter Instructions

Sr.
Instruction Name Description
No.
Increments the accumulated value at
each false-to-true transition and
1 CTU Up counter retains the accumulated value when
an off/on power cycle occurs.
Decrements the accumulated value at
each false-to-true transition and
2 CTD Down counter retains the accumulated value when
an on/off power cycle occurs.

Counts high-speed pulses from a high-


3 HSC High Speed Counter speed input.

Resets a counter’s accumulated


4 RES Reset value to zero.

10/6/2016 Amit Nevase 86


UP Counter Counting Sequence

Limit Switch Counter UP

Counter
Value

+4

ON
Accumulated Value= preset = output
OFF

10/6/2016 Amit Nevase 87


CTU – Up Counter Instruction
CTU
COUNT – UP COUNTER
CU
Counter C5:0
Preset 7 DN
Accumulated 0

C5:0/CU C5:0/OV
Counter Enable Bit Overflow Status Bit

C5:0/DN C5:0
Counter Reset
RES
Counter Done Bit Instruction

10/6/2016 Amit Nevase 88


89

------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
PRE Value =7
7

------------------------------------------------------------------------------------
7
6

6
5

Amit Nevase
5
CTU – Up Counter Sequence
4

4
3

3
2

2
TRUE 1

------------------------------------------------------------------------------------
FALSE

1
Accumulated

10/6/2016
Count Up

DN Bit of
Counter

Reset
Input

Value
CTU – UP Counter Instruction
 Counter Number —This number must come from the counter fi le. In
the example shown, the counter number is C5:0, which represents
counter file 5, counter 0 in that file. The address for this counter
should not be used for any other count-up counter.

 Preset Value —The preset value can range from 232,768 to 132,767.
In the example shown, the preset value is 10.

 Accumulated Value —The accumulated value can also range from


232,768 through 132,767. Typically, as in this example, the value
entered in the accumulated word is 0. Regardless of what value is
entered, the reset instruction will reset the accumulated value to 0.

10/6/2016 Amit Nevase 90


CTU – UP Counter Instruction Control Word

C5:N Bit 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00

Word
C5:N:0 CU CD DN OV UN UA INTERNAL USE (not addressable)
0
Word
C5:N:1 PRESET VALUE
1
Word
C5:N:2 ACCUMULATED VALUE
2

10/6/2016 Amit Nevase 91


CTU – UP Counter Instruction Control Word

 Count-Up (CU) Enable Bit —The count-up enable bit is


used with the count-up counter and is true whenever
the count-up counter instruction is true. If the count-
up counter instruction is false, the CU bit is false.

 Done (DN) Bit —The done bit is true whenever the


accumulated value is equal to or greater than the
preset value of the counter, for either the count-up or
the count-down counter.
10/6/2016 Amit Nevase 92
CTU – UP Counter Instruction Control Word
 Overflow (OV) Bit —The overflow bit is true whenever the
counter counts past its maximum value, which is 32,767. On the
next count, the counter will wrap around to 32,768 and will
continue counting from there toward 0 on successive false-to-
true transitions of the count-up counter.

 Update Accumulator (UA) Bit —The update accumulator bit is


used only in conjunction with an external HSC (high-speed
counter).

10/6/2016 Amit Nevase 93


DOWN Counter Counting Sequence

Proximity Switch Counter Down

Counter
Value

-5

ON
Accumulated Value= Preset = output
OFF

10/6/2016 Amit Nevase 94


CTD – Down Counter Instruction
CTD
COUNT – DOWN COUNTER
CD
Counter C5:0
Preset 7 DN
Accumulated 0

C5:0/CD C5:0/UN
Counter Enable Bit Underflow Status Bit

C5:0/DN C5:0
Counter Reset
RES
Counter Done Bit Instruction

10/6/2016 Amit Nevase 95


96

------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
7

------------------------------------------------------------------------------------
PRE Value
1
6

2
5
CTD – Down Counter Sequence

Amit Nevase
3
4

4
3

5
2

6
TRUE 1

7
------------------------------------------------------------------------------------
FALSE
Count Down

Accumulated

10/6/2016
DN Bit of
Counter

Reset
Input

Value
CTD – Down Counter Instruction
 Counter Number —This number must come from the counter fi le. In
the example shown, the counter number is C5:0, which represents
counter file 5, counter 0 in that file. The address for this counter
should not be used for any other count-up counter.

 Preset Value —The preset value can range from 232,768 to 132,767.
In the example shown, the preset value is 10.

 Accumulated Value —The accumulated value can also range from


232,768 through 132,767. Typically, as in this example, the value
entered in the accumulated word is 0. Regardless of what value is
entered, the reset instruction will reset the accumulated value to 0.

10/6/2016 Amit Nevase 97


CTD – Down Counter Instruction Control Word

C5:N Bit 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00

Word
C5:N:0 CU CD DN OV UN UA INTERNAL USE (not addressable)
0
Word
C5:N:1 PRESET VALUE
1
Word
C5:N:2 ACCUMULATED VALUE
2

10/6/2016 Amit Nevase 98


CTU – UP Counter Instruction Control Word

 Count-Down (CD) Enable Bit —The count-down enable bit

is used with the count-down counter and is true whenever

the count-down counter instruction is true. If the count-

down counter instruction is false, the CD bit is false.

 Done (DN) Bit —The done bit is true whenever the

accumulated value is equal to or greater than the preset

value of the counter, for either the count-up or the count-

down counter.
10/6/2016 Amit Nevase 99
CTU – UP Counter Instruction Control Word

 Underflow (UN) Bit —The underflow bit will go true


when the counter counts below 32,768. The counter
will wrap around to 132,767 and continue counting
down toward 0 on successive false-to-true rung
transitions of the count-down counter.

 Update Accumulator (UA) Bit —The update


accumulator bit is used only in conjunction with an
external HSC (high-speed counter).

10/6/2016 Amit Nevase 100


Module VI – PLC Hardware and Programming
 PLC Hardware (8 Marks)
 Discrete Input Modules – Block diagram, typical wiring details, Specifications of
AC input modules and DC input modules. Sinking and sourcing concept in DC
input modules
 Discrete Output Modules – Block diagram, typical wiring details, Specifications
of AC output modules and DC output modules.
 Analog Input and output modules : Block diagram, typical wiring details and
specifications
 PLC Programming (16 Marks)
 I/O Addressing in PLC
 PLC Instruction Set : Relay instructions, timer instructions, counter instructions,
Data handling instructions, logical and comparison instructions
 PLC programming examples based on above instruction using Ladder
programming

10/6/2016 Amit Nevase 101


Data Handling Instructions

Sr.
Instruction Name Description
No.

Moves the source value to


1 MOV Move
the destination.

Moves data from a source


2 MVM Masked Move location to a selected portion
of the destination.

10/6/2016 Amit Nevase 102


MOV Instruction

MOV
MOVE
Source N7:30

Destination N7:20

 The MOV instruction is used to copy data from source


word to destination word.

10/6/2016 Amit Nevase 103


MOV Instruction

PB1 MOV N7:30


MOVE
Source N7:30

Destination N7:20
N7:20

 When the rung is true, input switch A closed, the value stored at the
source address, N7:30, is copied into the destination address, N7:20.
 When the rung goes false, input switch A opened, the destination
address will retain the value unless it is changed elsewhere in the
program.
 The source value remains unchanged and no data conversion occurs.
10/6/2016 Amit Nevase 104
MVM Instruction

 The move with mask (MVM) instruction differs slightly


from the MOV instruction because a mask word is
involved in the move.

 The data being moved must pass through the mask to


get to their destination address.

 Masking refers to the action of hiding a portion of a


binary word before transferring it to the destination
address.

10/6/2016 Amit Nevase 105


MVM Instruction
MVM
MASKED MOVE
Source B3:0
1010101010101010
Mask B3:1
FF0F
Destination B3:4
1010101011001010

 The pattern of characters in the mask determines which source


bits will be passed through to the destination address.
 The bits in the mask that are set to zero (0) do not pass data.
 Only the bits in the mask that are set to one (1) will pass the
source data through to the destination.
 Bits in the destination are not affected when the corresponding
bits in the mask are zero.
 The MVM instruction is used to copy the desired part of a 16-bit
word by masking the rest of the value.
10/6/2016 Amit Nevase 106
MVM Instruction
PB1 MVM
MASKED MOVE
Source B3:0
1010101010101010
Mask B3:1
FF0F
Destination B3:4
1010101011001010

1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 Source B3:0

1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 Mask FF0F

Destination B3:4 before instruction


1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0
went true

1 0 1 0 1 0 1 0 1 1 0 0 1 0 1 0 Destination B3:4 after instruction


went true
10/6/2016 Amit Nevase 107
Module VI – PLC Hardware and Programming
 PLC Hardware (8 Marks)
 Discrete Input Modules – Block diagram, typical wiring details, Specifications of
AC input modules and DC input modules. Sinking and sourcing concept in DC
input modules
 Discrete Output Modules – Block diagram, typical wiring details, Specifications
of AC output modules and DC output modules.
 Analog Input and output modules : Block diagram, typical wiring details and
specifications
 PLC Programming (16 Marks)
 I/O Addressing in PLC
 PLC Instruction Set : Relay instructions, timer instructions, counter instructions,
data handling instructions, Logical and comparison instructions
 PLC programming examples based on above instruction using Ladder
programming

10/6/2016 Amit Nevase 108


Logical Instructions
Sr.
Instruction Name Description
No.

Perform Bitwise AND


1 AND Logical AND
operation

Perform Bitwise OR
2 OR Logical OR
operation

Perform Bitwise XOR


3 XOR Logical XOR
operation

10/6/2016 Amit Nevase 109


Logical Instructions
Sr.
Instruction Name Description
No.

Perform inversion of
4 NOT Inversion
given source

5 CLR Clear Clear destination

10/6/2016 Amit Nevase 110


AND – Logical AND Instruction
AND
BITWISE AND
Source A B3:0
Source B B3:1
Destination B3:2

 The AND command is used to perform the logic AND instruction on


each bit of the value in source A with each bit of the value of source
B, storing the output logic in the destination.

B3:0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0

B3:1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0

B3:2 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0

10/6/2016 Amit Nevase 111


OR – Logical OR Instruction
OR
BITWISE INCLUSIVE OR
Source A B3:0
Source B B3:1
Destination B3:2

 The OR command is used to perform the logic OR instruction on each


bit of the value in source A with each bit of the value of source B,
storing the output logic in the destination.

B3:0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0

B3:1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0

B3:2 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0

10/6/2016 Amit Nevase 112


XOR – Logical XOR Instruction
XOR
BITWISE EXCLUSIVE OR
Source A B3:0
Source B B3:1
Destination B3:2

 The XOR command is used to perform the logic XOR instruction on


each bit of the value in source A with each bit of the value of source
B, storing the output logic in the destination.

B3:0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0

B3:1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0

B3:2 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0

10/6/2016 Amit Nevase 113


NOT – Inversion Instruction
NOT
NOT

Source B3:0

Destination B3:1
 The NOT instruction is used to perform the NOT logic on the value in
the source, bit by bit. The output logic value returned in the
destination is the one's complement or opposite of the value in the
source.

B3:0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0

B3:1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1

10/6/2016 Amit Nevase 114


CLR – Clear Instruction
CLR

CLEAR

Destination B3:1

 The CLR instruction is used to set the destination value of a word to


zero.

B3:1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

10/6/2016 Amit Nevase 115


Module VI – PLC Hardware and Programming
 PLC Hardware (8 Marks)
 Discrete Input Modules – Block diagram, typical wiring details, Specifications of
AC input modules and DC input modules. Sinking and sourcing concept in DC
input modules
 Discrete Output Modules – Block diagram, typical wiring details, Specifications
of AC output modules and DC output modules.
 Analog Input and output modules : Block diagram, typical wiring details and
specifications
 PLC Programming (16 Marks)
 I/O Addressing in PLC
 PLC Instruction Set : Relay instructions, timer instructions, counter instructions,
data handling instructions, logical and Comparison instructions
 PLC programming examples based on above instruction using Ladder
programming

10/6/2016 Amit Nevase 116


Data Compare Instructions
Sr.
Instruction Name Description
No.

Tests whether two values are


1 EQU Equal
equal.

Tests whether one value is


2 NEQ Not Equal
not equal to a second value.

Tests whether one value is


3 LES Less Than
less than a second value.

10/6/2016 Amit Nevase 117


Data Compare Instructions
Sr.
Instruction Name Description
No.

Tests whether one value is


4 GRT Greater Than
greater than a second value.

Tests whether one value is


5 LEQ Less Than or Equal less than or equal to a
second value.

Tests whether one value is


Greater Than or
6 GEQ greater than or equal to a
Equal
second value.

10/6/2016 Amit Nevase 118


EQU – Equal Instruction
EQU
EQUAL
Source A T4:0.ACC

Source B N7:40

 The equal (EQU) instruction is an input instruction that


compares source A to source B: when source A is
equal to source B, the instruction is logically true;
otherwise it is logically false.

10/6/2016 Amit Nevase 119


NEQ – Not Equal Instruction
NEQ
NOT EQUAL
Source A N7:5

Source B 25

 The not equal (NEQ) instruction is an input instruction


that compares source A to source B: when source A is
not equal to source B, the instruction is logically true;
otherwise it is logically false.

10/6/2016 Amit Nevase 120


GRT – Greater Than Instruction
GRT
GREATER THAN
Source A T4:0.ACC

Source B 200

 The greater than (GRT) instruction is an input


instruction that compares source A to source B: when
source A is greater than source B, the instruction is
logically true; otherwise it is logically false.

10/6/2016 Amit Nevase 121


LES – Less Than Instruction
LES
LESS THAN
Source A C5:10.ACC

Source B 350

 The less than (LES) instruction is an input instruction


that compares source A to source B: when source A is
less than source B, the instruction is logically true;
otherwise it is logically false.

10/6/2016 Amit Nevase 122


GEQ – Greater Than or Equal Instruction
GEQ
GREATER THAN OR EQUAL
Source A N7:55

Source B N7:12

 The greater than or equal (GEQ) instruction is an input


instruction that compares source A to source B: when
source A is greater than or equal to source B, the
instruction is logically true; otherwise it is logically
false.

10/6/2016 Amit Nevase 123


LEQ – Less Than or Equal Instruction
LEQ
LESS THAN OR EQUAL
Source A C5:1.ACC

Source B 457

 The less than or equal (LEQ) instruction is an input


instruction that compares source A to source B: when
source A is less than or equal to source B, the
instruction is logically true; otherwise it is logically
false.

10/6/2016 Amit Nevase 124


Module VI – PLC Hardware and Programming
 PLC Hardware (8 Marks)
 Discrete Input Modules – Block diagram, typical wiring details, Specifications of
AC input modules and DC input modules. Sinking and sourcing concept in DC
input modules
 Discrete Output Modules – Block diagram, typical wiring details, Specifications
of AC output modules and DC output modules.
 Analog Input and output modules : Block diagram, typical wiring details and
specifications
 PLC Programming (16 Marks)
 I/O Addressing in PLC
 PLC Instruction Set : Relay instructions, timer instructions, counter instructions,
data handling instructions, logical and comparison instructions
 PLC programming examples based on above instruction using Ladder
programming

10/6/2016 Amit Nevase 125


Ladder Diagram for AND Gate

Applied
Voltage
(a)
Input
A
Input Input Output
Input
A B
B

Output

(b)
(c)

10/6/2016 Amit Nevase 126


Ladder Diagram for OR Gate
Output
Input A

B
Input B

Applied
Voltage (c)

(a)
Input
Output A
Input A
Input
B
Input B
Output

(b) (d)
10/6/2016 Amit Nevase 127
Ladder Diagram for NOT Gate
A

Applied
Voltage
(a)
Input
A
Input
Output
A

Output

(b)
(c)
10/6/2016 Amit Nevase 128
Ladder Diagram for NAND Gate

Output Input
Input A A

Input
Input B B

Output

(a) (b)

10/6/2016 Amit Nevase 129


Ladder Diagram for NOR Gate

Input
A
Output Input
Input A Input B
B

Output

(a) (b)

10/6/2016 Amit Nevase 130


Ladder Diagram for Ex-OR Gate

Input
A
Output Input
Input A Input B
B

Output
Input A Input B

(b)
(a)

10/6/2016 Amit Nevase 131


Ladder Diagram for Ex-NOR Gate

Input
A
Output Input
Input A Input B
B

Output
Input A Input B

(b)
(a)

10/6/2016 Amit Nevase 132


Ladder diagram with Multiple Outputs

Input Output A Input

Output
A
Output B
Output
B

10/6/2016 Amit Nevase 133


Ladder diagram with Multiple Inputs and Outputs

Input
A
Input
Output A
A
Input
B

Output B Output
A

Input B Output
B

10/6/2016 Amit Nevase 134


Example 1

Draw Ladder diagram for given logic diagram

A
Y
B C

A C Y

10/6/2016 Amit Nevase 135


Example 2

A Draw Ladder diagram for given logic diagram

C
D
A C Y

B D

10/6/2016 Amit Nevase 136


Example 3

Draw Ladder diagram for given logic diagram

A
Y
B
C

A B Y

10/6/2016 Amit Nevase 137


Example 4

Draw Ladder diagram for given logic diagram


A
B

C
D

A B Y

C D

10/6/2016 Amit Nevase 138


Example 5

Draw Ladder diagram for given logic diagram

B
Y
A

A B Y

10/6/2016 Amit Nevase 139


Example 6

Draw Ladder diagram for given logic diagram

A
Y
B

A C Y

10/6/2016 Amit Nevase 140


Example 7

Draw Ladder diagram for given Boolean Expression


Y  ABC  D

A B C Y

10/6/2016 Amit Nevase 141


Example 8

Draw Ladder diagram for given Boolean Expression


Y  A( B  CD )

C D A Y

10/6/2016 Amit Nevase 142


Example 9

Draw Ladder diagram for given Boolean Expression

Y  AB  C

A B Y

10/6/2016 Amit Nevase 143


Example 10

Draw Ladder diagram for given Boolean Expression


Y  ( A  B )CD

A C D Y

10/6/2016 Amit Nevase 144


Example 11

Draw Ladder diagram for given Boolean Expression


Y  ( ABC )  ( DEF )

A B C Y

D E F

10/6/2016 Amit Nevase 145


Example 12

Draw Ladder diagram for given Boolean Expression


Y  ( A  B)  ( A  B  C )

A B C Y

10/6/2016 Amit Nevase 146


Example 13

Draw Ladder diagram for given Boolean Expression


Y  ( ABC )  ( AB )  ( ABC )

A B C Y

A B C

A B

10/6/2016 Amit Nevase 147


Example 14

Draw Ladder diagram for given Boolean Expression


Y  A( B  C )  B ( A  C )
B A Y

A B

10/6/2016 Amit Nevase 148


Example 15

Draw Ladder diagram for given Logic Table SW Lamp

1 1

0 0

SW Lamp

10/6/2016 Amit Nevase 149


Example 16

Draw Ladder diagram for given Logic Table SW Lamp

0 1

1 0

SW Lamp

10/6/2016 Amit Nevase 150


Example 17
Draw Ladder diagram for given Logic Table SW1 SW2 Lamp1 Lamp2

0 0 1 0
0 1 0 0
1 0 0 0
SW1 SW2 Lamp 1 1 1 0 1

SW1 SW2 Lamp 2

10/6/2016 Amit Nevase 151


Example 18
Draw Ladder diagram for given Logic Table SW1 SW2 Lamp1 Lamp2

0 0 0 0
0 1 1 0
1 0 0 1
SW1 SW2 Lamp 1 1 1 0 0

SW1 SW2 Lamp 2

10/6/2016 Amit Nevase 152


Example 19
Draw Ladder diagram for given Logic Table SW1 SW2 Lamp1 Lamp2

0 0 0 0
0 1 1 1
1 0 1 1
SW1 SW2 Lamp 1 1 1 0 0

SW1 SW2 Lamp 2

10/6/2016 Amit Nevase 153


Example 20
Draw Ladder diagram for given Logic Table
Lamp Lamp Lamp Lamp
SW1 SW2
1 2 3 4
SW1 SW2 Lamp 1
0 0 1 0 0 0

0 1 0 1 0 0
SW1 SW2 Lamp 2
1 0 0 0 1 0

1 1 0 0 0 1
SW1 SW2 Lamp 3

SW1 SW2 Lamp 4

10/6/2016 Amit Nevase 154


Example 21

Draw Ladder diagram to switch off three motors sequentially at 5


seconds interval

10/6/2016 Amit Nevase 155


SW TOF
EN
TIMER OFF DELAY
Timer T4:1
Time Base 1:0
Preset 5 DN
Accumulated 0

TOF
EN
TIMER OFF DELAY
Timer T4:2
Time Base 1:0

Example 21 Preset
Accumulated
10
0
DN

TOF
EN
TIMER OFF DELAY
Timer T4:3
Time Base 1:0
Preset 15 DN
Accumulated 0

T4:1/DN M1

T4:2/DN M2

T4:3/DN M3
10/6/2016 Amit Nevase 156
Example 22

Draw Ladder diagram for 2 motor operations for


following conditions
1. Start push button starts motors M1 and M2

2. Stop push button stop motors M1 first and after 10 sec


motor M2

10/6/2016 Amit Nevase 157


Start Stop M1

I:0/0 I:0/1 O:0/0

TOF
TIMER OFF DELAY EN
Timer T4:1
Time Base 1:0
O:0/0 Preset 10 DN
Accumulated 0

T4:1/DN M2

O:0/1
Example 22

10/6/2016 Amit Nevase 158


Example 23

Draw Ladder diagram for parking space counter.

10/6/2016 Amit Nevase 159


Enter SW CTU
COUNT UP COUNTER CU
Counter C5:1
I:0/0 Preset 150
DN
Accumulated 0

Exit SW CTD
COUNT DOWN COUNTER CD
Counter C5:2
I:0/1 Preset 150
DN
Accumulated 0

C5:1/DN
Lot Full Light

O:0/0
Reset C5:1
RES
Example 23

10/6/2016 Amit Nevase 160


Example 24

Draw Ladder diagram for,

Three motors can be started automatically in sequence


with 20 sec time delay between each motor startup
when push button is starts. Stops all motors when push
button is stops.

10/6/2016 Amit Nevase 161


Start Stop M1

O:0/0
I:0/0 I:0/1
TON
TIMER ON DELAY EN
Timer T4:1
Time Base 1:0
O:0/0 Preset 20 DN
Accumulated 0

T4:1/DN
Example 24 M2

O:0/1
T4:1/DN TON
TIMER ON DELAY EN
Timer T4:2
Time Base 1:0
Preset 20 DN
Accumulated 0
T4:2/DN M3

10/6/2016 Amit Nevase 162


O:0/2
Example 25

Draw Ladder diagram for 2 motors operation,

a. When start button is pushed motor M1 and M2 starts

b. After 10 seconds motor M1 stops

c. Motor M2 stops 15 seconds after motor M1 has


stopped

d. Both M1 and M2 will stop when push button is


pressed.

10/6/2016 Amit Nevase 163


Start Stop T4:1/DN M1

O:0/0
I:0/0 I:0/1
T4:2/DN M2

Example 25
TON
TIMER ON DELAY EN
Timer T4:1
Time Base 1:0
O:0/0 Preset 10 DN
Accumulated 0

T4:1/DN TON
TIMER ON DELAY EN
Timer T4:2
Time Base 1:0
Preset 15 DN
Accumulated 0

10/6/2016 Amit Nevase 164


Example 26

Draw Ladder diagram for 2 motors system,

a. Start switch starts Motor M1.

b. 10 seconds later Motor 2 Starts.

c. Stop switch stops Motor M1.

d. 15 seconds later Motor 2 Stops.

10/6/2016 Amit Nevase 165


Start Stop M1

O:0/0
I:0/0 I:0/1
TON
TIMER ON DELAY EN
Timer T4:1
Time Base 1:0
O:0/0 Preset 10 DN
Accumulated 0

T4:1/DN T4:2/DN
M2

O:0/1
TOF
TIMER OFF DELAY EN
Timer T4:2
Time Base 1:0
O:0/0 Preset 15 DN
Accumulated 0
Example 26
10/6/2016 Amit Nevase 166
Example 27

Draw Ladder diagram for 3 motors operation,

a. Start push button starts Motor M1.

b. When motor M1 is ON after 5 min M2 is ON and M1


is OFF.

c. When M2 is ON after 10 min M3 is ON and M2 is OFF.

d. When stop push button is pressed M3 is OFF.

10/6/2016 Amit Nevase 167


Start T4:1/DN M1

O:0/0
I:0/0 I:0/1
TON
TIMER ON DELAY EN
Timer T4:1
Time Base 1:0
O:0/0 Preset 300 DN
Accumulated 0

T4:1/DN T4:2/DN
M2

Example 27 O:0/1
TON
TIMER ON DELAY EN
Timer T4:2
Time Base 1:0
O:0/1 Preset 600 DN
Accumulated 0
T4:2/DN Stop M3

10/6/2016 Amit Nevase 168


O:0/2
References

 Programmable Logic
Controllers – F. D. Petruzella

 Introduction to Programmable
Logic Controllers – Gary
Dunning

 Programmable Logic
Controllers – Jhon Hackworth,
Federic Hackworth
10/6/2016 Amit Nevase 169
Online Tutorials

https://www.courses.ps
u.edu/e_met/e_met430
_jar14/cgroup.html

10/6/2016 Amit Nevase 170


Thank You
Amit Nevase
10/6/2016 Amit Nevase 171

You might also like