SlideShare a Scribd company logo
1 of 15
Download to read offline
Programmable Logic Controllers – EEET208 Handouts
Programming Fundamentals:
Ladder, Functional Block
&
Statement List Languages
Handout # 4
Student Name:
Student ID:
Date:
Input/output Modules, Handout#4
Programmable Logic Controllers, EEET 237
2
Programming Fundamentals: Ladder, Functional
Block and Statement List Languages
Introduction
This chapter is an introduction to the programming of a PLC using ladder
diagrams, functional block diagrams, and statement list languages. Here we
are concerned with the basic techniques involved in developing ladder and
function block programs to represent basic switching operations, involving
the logic functions of AND, OR, Exclusive OR, NAND and NOR, and
latching. Later chapters continue with further ladder programming involving
other elements.
4.1-Ladder Diagrams
As an introduction to ladder diagrams, consider the simple wiring diagram
for an electrical circuit in Figure 4.1(a). The diagram shows the circuit for
switching on or off an electric motor. We can redraw this diagram in a
different way, using two vertical lines to represent the input power rail and
stringing the rest of the circuit between them. Figure 4.1(b) shows the result.
Both circuits have the switch in series with the motor and supplied with
electrical power when the switch is closed. The circuit shown in Figure
4.1(b) is termed a ladder diagram.
Input/output Modules, Handout#4
Programmable Logic Controllers, EEET 237
3
Figure 4.2 shows an example of a ladder diagram for a circuit that is used to
start and stop a motor using push buttons. In the normal state, push button 1
is open and push button 2 closed. When button 1 is pressed, the motor circuit
is completed and the motor starts. Also, the holding contacts wired in
parallel with the motor close and remain closed as long as the motor is
running. Thus when the push button 1 is released, the holding contacts
maintain the circuit and hence the power to the motor. To stop the motor,
button 2 is pressed. This disconnects the power to the motor and the holding
contacts open. Thus when push button 2 is released, there is still no power to
the motor. Thus we have a motor which is started by pressing button 1 and
stopped by pressing button 2.
Input/output Modules, Handout#4
Programmable Logic Controllers, EEET 237
4
4.1.1 PLC Ladder Programming
In drawing a ladder diagram, certain conventions are adopted:
1- 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.
2- Each rung on the ladder defines one operation in the control process.
3- A ladder diagram is read from left to right and from top to bottom, Figure
5.3 showing the scanning motion employed by the PLC. The top rung is read
from left to right. Then the second rung down is read from left to right and
so on.
Input/output Modules, Handout#4
Programmable Logic Controllers, EEET 237
5
4-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, used as an input to the PLC. The term output is used for
a device connected to the output of a PLC, e.g. a motor.
5- Electrical devices are shown in their normal condition. Thus a switch
which 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.
6- A particular device can appear in more than one rung of a ladder. For
example, we might have a relay which switches on one or more devices. The
same letters and/or numbers are used to label the device in each situation.
7- The inputs and outputs are all identified by their addresses, the notation
used depending on the PLC manufacturer. This is the address of the input or
output in the memory of the PLC .
Figure 4.4 shows standard IEC 1131-3 symbols that are used for input
and output devices.
Input/output Modules, Handout#4
Programmable Logic Controllers, EEET 237
6
To illustrate the drawing of the rung of a ladder diagram, consider a situation
where the energising of an output device, e.g. a motor, depends on a
normally open start switch being activated by being closed. The input is thus
the switch and the output the motor. Figure 4.5(a) shows the ladder diagram.
Starting with the input, we have the normally open symbol | | for the input
contacts. There are no other input devices and the line terminates with the
output, denoted by the symbol ( ). When the switch is closed, i.e. there is an
input, the output of the motor is activated. Only while there is an input to the
contacts is there an output. If there had been a normally closed switch |/|
with the output (Figure 4.5(b)), then there would have been an output until
that switch was opened. Only while there is no input to the contacts is there
an output.
5.2 Logic functions
There are many control situations requiring actions to be initiated when a
certain combination of conditions is realised. This section is a consideration
of such logic functions.
Input/output Modules, Handout#4
Programmable Logic Controllers, EEET 237
7
5.2.1 AND Gate
Figure 4.7(a) shows a situation where an output is not energised unless two,
normally open, switches are both closed. Switch A and switch B have both
to be closed, which thus gives an AND logic situation. We can think of this
as representing a control system with two inputs A and B (Figure 4.7(b)).
Only when A and B are both on is there an output. Thus if we use 1 to
indicate an on signal and 0 to represent an off signal, then for there to be a 1
output we must have A and B both 1. Such an operation is said to be
controlled by a logic gate and the relationship between the inputs to a logic
gate and the outputs is tabulated in a form known as a truth table. Thus for
the AND gate we have:
Input/output Modules, Handout#4
Programmable Logic Controllers, EEET 237
8
Figure 4.8(a) shows an AND gate system on a ladder diagram. The ladder
diagram starts with | |, a normally open set of contacts labeled input A, to
represent switch A and in series with it | |, another normally open set of
contacts labelled input B, to represent switch B. The line then terminates
with O to represent the output. For there to be an output, both input A and
input B have to occur, i.e. input A and input B contacts have to be closed
(Figure 4.8(b)). In general:
On a ladder diagram contacts in a horizontal rung, i.e. contacts in
series, represent the logical AND operations.
Input/output Modules, Handout#4
Programmable Logic Controllers, EEET 237
9
4.2.2 OR
Figure4.9(a) shows an electrical circuit where an output is energised
when switch A or B, both normally open, are closed. This describes an
OR logic gate (Figure 4.9(b)) in that input A or input B must be on for
there to be an output. The truth table is:
Figure 4.10(a) shows an OR logic gate system on a ladder diagram, Figure
4.10(b) showing an equivalent alternative way of drawing the same diagram.
The ladder diagram starts with | |, normally open contacts labelled input A,
to represent switch A and in parallel with it | |, normally open contacts
labelled input B, to represent switch B. Either input A or input B have to be
closed for the output to be energised (Figure 4.10(c)). The line then
terminates with O to represent the output. In general:
Alternative paths provided by vertical paths from the main rung of a
ladder diagram, i.e. paths in parallel, represent logical OR
operations.
Input/output Modules, Handout#4
Programmable Logic Controllers, EEET 237
10
4.2.3 NOT
Figure 4.11(a) shows an electrical circuit controlled by a switch that is
normally closed. When there is an input to the switch, it opens and there is
then no current in the circuit. This illustrates a NOT gate in that there is an
output when there is no input and no output when there is an input (Figure
4.11(c)). The gate is sometimes referred to as an inverter. The truth table is:
Input/output Modules, Handout#4
Programmable Logic Controllers, EEET 237
11
Figure 4.13 shows a NOT gate system on a ladder diagram. The input A
contacts are shown as being normally closed. This is in series with the
output ( ). With no input to input A, the contacts are closed and so there is an
output. When there is an input to input A, it opens and there is then no
output. An example of a NOT gate control system is a light that comes on
when it becomes dark, i.e. when there is no light input to the light sensor
there is an output.
4.2.4 NAND
The same truth table occurs, namely:
Both the inputs A and B have to be 0 for there to be a 1 output. There is
an output when input A and input B are not 1. The combination of these
gates is termed a NAND gate.
Figure 4.13 shows a ladder diagram which gives a NAND gate. When the
inputs to input A and input B are both 0 then the output is 1. When the
inputs to input A and input B are both 1, then the output is 0. An example of
a NAND gate control system is a warning light that comes on if, with a
machine tool, the safety guard switch has not been activated and the limit
switch signaling the presence of the workpiece has not been activate
Input/output Modules, Handout#4
Programmable Logic Controllers, EEET 237
12
4.2.5 NOR
The consequence of having the NOT gate is to invert the outputs of the OR
gate. The following is the resulting truth table:
Figure4.15 shows a ladder diagram of a NOR system. When input A
and input B are both not activated, there is a 1 output. When either input A
or input B are 1 there is a 0 output.
Input/output Modules, Handout#4
Programmable Logic Controllers, EEET 237
13
4.3 Latching
There are often situations where it is necessary to hold an output energised,
even when the input ceases. A simple example of such a situation is a motor
which is started by pressing a push button switch. Though the switch
contacts do not remain closed, the motor is required to continue running
until a stop push button switch is pressed. The term latch circuit is used for
the circuit used to carry out such an operation. It is a self-maintaining circuit
in that, after being energized, it maintains that state until another input is
received. An example of a latch circuit is shown in Figure 4.18. When the
input A contacts close, there is an output. However, when there is an output,
another set of contacts associated with the output closes. These contacts
form an OR logic gate system with the input contacts. Thus, even if the input
A opens, the circuit will still maintain the output energized. The only way to
release the output is by operating the normally closed contact B.
Input/output Modules, Handout#4
Programmable Logic Controllers, EEET 237
14
4.4 Multiple outputs
With ladder diagrams, there can be more than one output connected to a
contact. Figure 4.20 shows a ladder program with two output coils. When
the input contacts close both the coils give outputs.
For the ladder rung shown in Figure 4.21, output A occurs when input
A occurs. Output B only occurs when both input A and input B occur.
Input/output Modules, Handout#4
Programmable Logic Controllers, EEET 237
15
4.5.1 Ladder symbols
One method of entering the program into the programming terminal involves
using a keypad having keys with symbols depicting the various elements of
the ladder diagram and keying them in so that the ladder diagram appears on
the screen of the programming terminal. For example, to enter a pair of
contacts the key marked
might be used, followed by its address being keyed in. To enter an output
the key marked ( ) might be used, followed by its address.

More Related Content

Similar to PLC HO4.pdf

Module 4 Logic Circuits.pptx
Module 4 Logic Circuits.pptxModule 4 Logic Circuits.pptx
Module 4 Logic Circuits.pptxDrVaibhavMeshram
 
MCT 332 Industrial Automation (Lec. 2).pdf
MCT 332 Industrial Automation (Lec. 2).pdfMCT 332 Industrial Automation (Lec. 2).pdf
MCT 332 Industrial Automation (Lec. 2).pdfMohamedSobhy604612
 
08 chapter03 06_status_bits_otl_otu_scan_logic_fa16
08 chapter03 06_status_bits_otl_otu_scan_logic_fa1608 chapter03 06_status_bits_otl_otu_scan_logic_fa16
08 chapter03 06_status_bits_otl_otu_scan_logic_fa16John Todora
 
PLC y Electroneumática: Controladores lógicos programables por W. Bolton 4 ed...
PLC y Electroneumática: Controladores lógicos programables por W. Bolton 4 ed...PLC y Electroneumática: Controladores lógicos programables por W. Bolton 4 ed...
PLC y Electroneumática: Controladores lógicos programables por W. Bolton 4 ed...SANTIAGO PABLO ALBERTO
 
Ch2 Logic Gates.ppt
Ch2 Logic Gates.pptCh2 Logic Gates.ppt
Ch2 Logic Gates.pptzorogoh2
 
Programming
ProgrammingProgramming
Programmingaescotom
 
Programming
ProgrammingProgramming
Programmingaescotom
 
EEN 1200 L – Digital FundamentalsMerrimack CollegeLaborato.docx
EEN 1200 L – Digital FundamentalsMerrimack CollegeLaborato.docxEEN 1200 L – Digital FundamentalsMerrimack CollegeLaborato.docx
EEN 1200 L – Digital FundamentalsMerrimack CollegeLaborato.docxSALU18
 
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence CounterLab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence CounterKatrina Little
 
counter using 4 master slave flip-flops
counter using 4 master slave flip-flops counter using 4 master slave flip-flops
counter using 4 master slave flip-flops ZunAib Ali
 
IS 139 Assignment 1
IS 139 Assignment 1IS 139 Assignment 1
IS 139 Assignment 1wajanga
 
Sequential and combinational alu
Sequential and combinational alu Sequential and combinational alu
Sequential and combinational alu Piyush Rochwani
 
Programmable_Logic_Controllers_Introduction_to_PLCs__(Chapter_1)_Lec1.ppt
Programmable_Logic_Controllers_Introduction_to_PLCs__(Chapter_1)_Lec1.pptProgrammable_Logic_Controllers_Introduction_to_PLCs__(Chapter_1)_Lec1.ppt
Programmable_Logic_Controllers_Introduction_to_PLCs__(Chapter_1)_Lec1.pptMUSTAFAHAIDER53
 
Devry ecet 105 week 3 i lab introduction to digital logic gates new
Devry ecet 105 week 3 i lab introduction to digital logic gates newDevry ecet 105 week 3 i lab introduction to digital logic gates new
Devry ecet 105 week 3 i lab introduction to digital logic gates newjackiemoo
 
Devry ecet 105 week 3 i lab introduction to digital logic gates new
Devry ecet 105 week 3 i lab introduction to digital logic gates newDevry ecet 105 week 3 i lab introduction to digital logic gates new
Devry ecet 105 week 3 i lab introduction to digital logic gates newarvelcoxx
 
Devry ecet 105 week 3 i lab introduction to digital logic gates new
Devry ecet 105 week 3 i lab introduction to digital logic gates newDevry ecet 105 week 3 i lab introduction to digital logic gates new
Devry ecet 105 week 3 i lab introduction to digital logic gates newolivergeorg
 
CAM ladder logic diagram
CAM ladder logic diagramCAM ladder logic diagram
CAM ladder logic diagramMaharshi Soni
 

Similar to PLC HO4.pdf (20)

Lab no 4
Lab no 4Lab no 4
Lab no 4
 
Module 4 Logic Circuits.pptx
Module 4 Logic Circuits.pptxModule 4 Logic Circuits.pptx
Module 4 Logic Circuits.pptx
 
MCT 332 Industrial Automation (Lec. 2).pdf
MCT 332 Industrial Automation (Lec. 2).pdfMCT 332 Industrial Automation (Lec. 2).pdf
MCT 332 Industrial Automation (Lec. 2).pdf
 
08 chapter03 06_status_bits_otl_otu_scan_logic_fa16
08 chapter03 06_status_bits_otl_otu_scan_logic_fa1608 chapter03 06_status_bits_otl_otu_scan_logic_fa16
08 chapter03 06_status_bits_otl_otu_scan_logic_fa16
 
Ladder
LadderLadder
Ladder
 
PLC y Electroneumática: Controladores lógicos programables por W. Bolton 4 ed...
PLC y Electroneumática: Controladores lógicos programables por W. Bolton 4 ed...PLC y Electroneumática: Controladores lógicos programables por W. Bolton 4 ed...
PLC y Electroneumática: Controladores lógicos programables por W. Bolton 4 ed...
 
10617568.ppt
10617568.ppt10617568.ppt
10617568.ppt
 
Ch2 Logic Gates.ppt
Ch2 Logic Gates.pptCh2 Logic Gates.ppt
Ch2 Logic Gates.ppt
 
Programming
ProgrammingProgramming
Programming
 
Programming
ProgrammingProgramming
Programming
 
EEN 1200 L – Digital FundamentalsMerrimack CollegeLaborato.docx
EEN 1200 L – Digital FundamentalsMerrimack CollegeLaborato.docxEEN 1200 L – Digital FundamentalsMerrimack CollegeLaborato.docx
EEN 1200 L – Digital FundamentalsMerrimack CollegeLaborato.docx
 
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence CounterLab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
 
counter using 4 master slave flip-flops
counter using 4 master slave flip-flops counter using 4 master slave flip-flops
counter using 4 master slave flip-flops
 
IS 139 Assignment 1
IS 139 Assignment 1IS 139 Assignment 1
IS 139 Assignment 1
 
Sequential and combinational alu
Sequential and combinational alu Sequential and combinational alu
Sequential and combinational alu
 
Programmable_Logic_Controllers_Introduction_to_PLCs__(Chapter_1)_Lec1.ppt
Programmable_Logic_Controllers_Introduction_to_PLCs__(Chapter_1)_Lec1.pptProgrammable_Logic_Controllers_Introduction_to_PLCs__(Chapter_1)_Lec1.ppt
Programmable_Logic_Controllers_Introduction_to_PLCs__(Chapter_1)_Lec1.ppt
 
Devry ecet 105 week 3 i lab introduction to digital logic gates new
Devry ecet 105 week 3 i lab introduction to digital logic gates newDevry ecet 105 week 3 i lab introduction to digital logic gates new
Devry ecet 105 week 3 i lab introduction to digital logic gates new
 
Devry ecet 105 week 3 i lab introduction to digital logic gates new
Devry ecet 105 week 3 i lab introduction to digital logic gates newDevry ecet 105 week 3 i lab introduction to digital logic gates new
Devry ecet 105 week 3 i lab introduction to digital logic gates new
 
Devry ecet 105 week 3 i lab introduction to digital logic gates new
Devry ecet 105 week 3 i lab introduction to digital logic gates newDevry ecet 105 week 3 i lab introduction to digital logic gates new
Devry ecet 105 week 3 i lab introduction to digital logic gates new
 
CAM ladder logic diagram
CAM ladder logic diagramCAM ladder logic diagram
CAM ladder logic diagram
 

Recently uploaded

Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 

Recently uploaded (20)

Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 

PLC HO4.pdf

  • 1. Programmable Logic Controllers – EEET208 Handouts Programming Fundamentals: Ladder, Functional Block & Statement List Languages Handout # 4 Student Name: Student ID: Date:
  • 2. Input/output Modules, Handout#4 Programmable Logic Controllers, EEET 237 2 Programming Fundamentals: Ladder, Functional Block and Statement List Languages Introduction This chapter is an introduction to the programming of a PLC using ladder diagrams, functional block diagrams, and statement list languages. Here we are concerned with the basic techniques involved in developing ladder and function block programs to represent basic switching operations, involving the logic functions of AND, OR, Exclusive OR, NAND and NOR, and latching. Later chapters continue with further ladder programming involving other elements. 4.1-Ladder Diagrams As an introduction to ladder diagrams, consider the simple wiring diagram for an electrical circuit in Figure 4.1(a). The diagram shows the circuit for switching on or off an electric motor. We can redraw this diagram in a different way, using two vertical lines to represent the input power rail and stringing the rest of the circuit between them. Figure 4.1(b) shows the result. Both circuits have the switch in series with the motor and supplied with electrical power when the switch is closed. The circuit shown in Figure 4.1(b) is termed a ladder diagram.
  • 3. Input/output Modules, Handout#4 Programmable Logic Controllers, EEET 237 3 Figure 4.2 shows an example of a ladder diagram for a circuit that is used to start and stop a motor using push buttons. In the normal state, push button 1 is open and push button 2 closed. When button 1 is pressed, the motor circuit is completed and the motor starts. Also, the holding contacts wired in parallel with the motor close and remain closed as long as the motor is running. Thus when the push button 1 is released, the holding contacts maintain the circuit and hence the power to the motor. To stop the motor, button 2 is pressed. This disconnects the power to the motor and the holding contacts open. Thus when push button 2 is released, there is still no power to the motor. Thus we have a motor which is started by pressing button 1 and stopped by pressing button 2.
  • 4. Input/output Modules, Handout#4 Programmable Logic Controllers, EEET 237 4 4.1.1 PLC Ladder Programming In drawing a ladder diagram, certain conventions are adopted: 1- 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. 2- Each rung on the ladder defines one operation in the control process. 3- A ladder diagram is read from left to right and from top to bottom, Figure 5.3 showing the scanning motion employed by the PLC. The top rung is read from left to right. Then the second rung down is read from left to right and so on.
  • 5. Input/output Modules, Handout#4 Programmable Logic Controllers, EEET 237 5 4-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, used as an input to the PLC. The term output is used for a device connected to the output of a PLC, e.g. a motor. 5- Electrical devices are shown in their normal condition. Thus a switch which 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. 6- A particular device can appear in more than one rung of a ladder. For example, we might have a relay which switches on one or more devices. The same letters and/or numbers are used to label the device in each situation. 7- The inputs and outputs are all identified by their addresses, the notation used depending on the PLC manufacturer. This is the address of the input or output in the memory of the PLC . Figure 4.4 shows standard IEC 1131-3 symbols that are used for input and output devices.
  • 6. Input/output Modules, Handout#4 Programmable Logic Controllers, EEET 237 6 To illustrate the drawing of the rung of a ladder diagram, consider a situation where the energising of an output device, e.g. a motor, depends on a normally open start switch being activated by being closed. The input is thus the switch and the output the motor. Figure 4.5(a) shows the ladder diagram. Starting with the input, we have the normally open symbol | | for the input contacts. There are no other input devices and the line terminates with the output, denoted by the symbol ( ). When the switch is closed, i.e. there is an input, the output of the motor is activated. Only while there is an input to the contacts is there an output. If there had been a normally closed switch |/| with the output (Figure 4.5(b)), then there would have been an output until that switch was opened. Only while there is no input to the contacts is there an output. 5.2 Logic functions There are many control situations requiring actions to be initiated when a certain combination of conditions is realised. This section is a consideration of such logic functions.
  • 7. Input/output Modules, Handout#4 Programmable Logic Controllers, EEET 237 7 5.2.1 AND Gate Figure 4.7(a) shows a situation where an output is not energised unless two, normally open, switches are both closed. Switch A and switch B have both to be closed, which thus gives an AND logic situation. We can think of this as representing a control system with two inputs A and B (Figure 4.7(b)). Only when A and B are both on is there an output. Thus if we use 1 to indicate an on signal and 0 to represent an off signal, then for there to be a 1 output we must have A and B both 1. Such an operation is said to be controlled by a logic gate and the relationship between the inputs to a logic gate and the outputs is tabulated in a form known as a truth table. Thus for the AND gate we have:
  • 8. Input/output Modules, Handout#4 Programmable Logic Controllers, EEET 237 8 Figure 4.8(a) shows an AND gate system on a ladder diagram. The ladder diagram starts with | |, a normally open set of contacts labeled input A, to represent switch A and in series with it | |, another normally open set of contacts labelled input B, to represent switch B. The line then terminates with O to represent the output. For there to be an output, both input A and input B have to occur, i.e. input A and input B contacts have to be closed (Figure 4.8(b)). In general: On a ladder diagram contacts in a horizontal rung, i.e. contacts in series, represent the logical AND operations.
  • 9. Input/output Modules, Handout#4 Programmable Logic Controllers, EEET 237 9 4.2.2 OR Figure4.9(a) shows an electrical circuit where an output is energised when switch A or B, both normally open, are closed. This describes an OR logic gate (Figure 4.9(b)) in that input A or input B must be on for there to be an output. The truth table is: Figure 4.10(a) shows an OR logic gate system on a ladder diagram, Figure 4.10(b) showing an equivalent alternative way of drawing the same diagram. The ladder diagram starts with | |, normally open contacts labelled input A, to represent switch A and in parallel with it | |, normally open contacts labelled input B, to represent switch B. Either input A or input B have to be closed for the output to be energised (Figure 4.10(c)). The line then terminates with O to represent the output. In general: Alternative paths provided by vertical paths from the main rung of a ladder diagram, i.e. paths in parallel, represent logical OR operations.
  • 10. Input/output Modules, Handout#4 Programmable Logic Controllers, EEET 237 10 4.2.3 NOT Figure 4.11(a) shows an electrical circuit controlled by a switch that is normally closed. When there is an input to the switch, it opens and there is then no current in the circuit. This illustrates a NOT gate in that there is an output when there is no input and no output when there is an input (Figure 4.11(c)). The gate is sometimes referred to as an inverter. The truth table is:
  • 11. Input/output Modules, Handout#4 Programmable Logic Controllers, EEET 237 11 Figure 4.13 shows a NOT gate system on a ladder diagram. The input A contacts are shown as being normally closed. This is in series with the output ( ). With no input to input A, the contacts are closed and so there is an output. When there is an input to input A, it opens and there is then no output. An example of a NOT gate control system is a light that comes on when it becomes dark, i.e. when there is no light input to the light sensor there is an output. 4.2.4 NAND The same truth table occurs, namely: Both the inputs A and B have to be 0 for there to be a 1 output. There is an output when input A and input B are not 1. The combination of these gates is termed a NAND gate. Figure 4.13 shows a ladder diagram which gives a NAND gate. When the inputs to input A and input B are both 0 then the output is 1. When the inputs to input A and input B are both 1, then the output is 0. An example of a NAND gate control system is a warning light that comes on if, with a machine tool, the safety guard switch has not been activated and the limit switch signaling the presence of the workpiece has not been activate
  • 12. Input/output Modules, Handout#4 Programmable Logic Controllers, EEET 237 12 4.2.5 NOR The consequence of having the NOT gate is to invert the outputs of the OR gate. The following is the resulting truth table: Figure4.15 shows a ladder diagram of a NOR system. When input A and input B are both not activated, there is a 1 output. When either input A or input B are 1 there is a 0 output.
  • 13. Input/output Modules, Handout#4 Programmable Logic Controllers, EEET 237 13 4.3 Latching There are often situations where it is necessary to hold an output energised, even when the input ceases. A simple example of such a situation is a motor which is started by pressing a push button switch. Though the switch contacts do not remain closed, the motor is required to continue running until a stop push button switch is pressed. The term latch circuit is used for the circuit used to carry out such an operation. It is a self-maintaining circuit in that, after being energized, it maintains that state until another input is received. An example of a latch circuit is shown in Figure 4.18. When the input A contacts close, there is an output. However, when there is an output, another set of contacts associated with the output closes. These contacts form an OR logic gate system with the input contacts. Thus, even if the input A opens, the circuit will still maintain the output energized. The only way to release the output is by operating the normally closed contact B.
  • 14. Input/output Modules, Handout#4 Programmable Logic Controllers, EEET 237 14 4.4 Multiple outputs With ladder diagrams, there can be more than one output connected to a contact. Figure 4.20 shows a ladder program with two output coils. When the input contacts close both the coils give outputs. For the ladder rung shown in Figure 4.21, output A occurs when input A occurs. Output B only occurs when both input A and input B occur.
  • 15. Input/output Modules, Handout#4 Programmable Logic Controllers, EEET 237 15 4.5.1 Ladder symbols One method of entering the program into the programming terminal involves using a keypad having keys with symbols depicting the various elements of the ladder diagram and keying them in so that the ladder diagram appears on the screen of the programming terminal. For example, to enter a pair of contacts the key marked might be used, followed by its address being keyed in. To enter an output the key marked ( ) might be used, followed by its address.