SlideShare une entreprise Scribd logo
Lecture 3’s sequence
3.2 PLC Programming Languages
3.3 Relay Type Instructions
3.4 Branch Instructions
3.5 Internal Relay Instructions
3.1 Program Scan
0
3.6 Modes Of Operation
3.1. Program Scan
 During each program scan cycle, the processor reads all the inputs, takes
these values, and energizes or de-energizes the outputs according to the
user program.
3.1. Program Scan
 The time it takes to complete a scan cycle is a measure of how fast the
controller can react to changes in inputs.
 If a controller must react to an input
signal that changes states twice during
the scan time, it is possible that the PLC
will never be able to detect this change.
 The scan time is a function of:
 The speed of the processor module
 The length of the ladder program
 The type of instructions executed
 The actual ladder true/false conditions
3.1. Program Scan
 Overview of the data flow during the scan process.
3.1. Program Scan
 The controller evaluates ladder logic rung instructions based on the rung
condition preceding the instruction (rung-condition-in).
3.1. Program Scan
 Scan process applied to a single rung program.
3.1. Program Scan
 Scan process applied to a
multiple rung program.
3.1. Program Scan
 Vertical versus horizontal scan patterns.
Horizontal scanning order
Vertical scanning order
Lecture 3’s sequence
3.2 PLC Programming Languages
3.3 Relay Type Instructions
3.4 Branch Instructions
3.5 Internal Relay Instructions
3.1 Program Scan
0
3.6 Modes Of Operation
3.2. PLC Programming Languages
 PLC programming language refers to the method by which the user
communicates information to the PLC.
Standard IEC 61131 languages associated with PLC programming
3.2. PLC Programming Languages
 Ladder diagram language is the most used PLC language and is designed
to mimic hardwired relay logic.
Hardwired relay control circuit Equivalent ladder diagram program
3.2. PLC Programming Languages
 Functional block diagram
programming uses instructions
that are programmed as blocks
wired together to accomplish
certain functions.
3.2. PLC Programming Languages
 Ladder diagram and functional block diagram programming used to
produce the same logical output.
Ladder diagram
Equivalent function block diagram
3.2. PLC Programming Languages
 Sequential function chart (SFC)
programming language is like a
flowchart of your process.
The program is split into steps with
multiple operations happening in
parallel branches.
3.2. PLC Programming Languages
 Instruction list programming language consists of a series of instructions
that refer to the basic AND, OR, and NOT logic gate functions.
Hardwired relay control circuit
Equivalent instruction
list program
3.2. PLC Programming Languages
 Structured text is a high-level language primarily used to implement
more complex procedures that cannot be easily expressed with
graphical languages.
Ladder diagram
Equivalent structured text program
Lecture 3’s sequence
3.2 PLC Programming Languages
3.3 Relay Type Instructions
3.4 Branch Instructions
3.5 Internal Relay Instructions
3.1 Program Scan
0
3.6 Modes Of Operation
3.3. Relay Type Instructions
 The ladder diagram language is a symbolic set of instructions used to
create the controller program.
Representations of contacts and coils are the
basic symbols of the logic ladder diagram
instruction set.
3.3. Relay Type Instructions
 The Normally Open Contact instruction looks and
operates like a normally open relay contact.
Associated with each Normally
Open Contact instruction is a
memory bit linked to the status
of an input device or an internal
logical condition in a rung.
3.3. Relay Type Instructions
 The memory bit is set to 1 or 0 depending on the status of the input.
A 1 corresponds to a true status or on condition.
If the instruction memory bit is a 1 (true) this instruction will
allow rung continuity through itself, like a closed relay contact.
3.3. Relay Type Instructions
A 0 corresponds to a false status or off condition.
If the instruction memory bit is a 0 (false) this instruction will
not allow rung continuity through itself and will assume a
normally open state, just like an open relay contact.
3.3. Relay Type Instructions
 Simulated Normally Open Contact instruction operation.
3.3. Relay Type Instructions
 The Normally Closed Contact instruction looks and
operates like a normally closed relay contact.
This instruction asks the PLC’s processor to
examine if the contact is open.
It does this by examining the bit at the memory
location specified by the address for a 0 or 1.
3.3. Relay Type Instructions
As with any other input the memory bit is set to 1 or 0 depending on the status of the input.
A 1 corresponds to a true status or on condition.
The instruction is interpreted as false when the bit is 1
and will not allow rung continuity through itself.
3.3. Relay Type Instructions
A 0 corresponds to a off condition.
The instruction is interpreted as true when the bit is
0 and will not allow rung continuity through itself.
3.3. Relay Type Instructions
 Simulated Normally Closed Contact instruction operation.
3.3. Relay Type Instructions
 The Coil instruction looks and
operates like a relay coil.
This instruction signals the PLC to energize (switch on)
or de-energize (switch off ) the output.
The instruction is associated with a memory bit that energizes the output
when set to 1 and de-energizes the output when reset to 0.
3.3. Relay Type Instructions
A true logic path is established by
the input instructions in the rung.
Coil instruction is set to 1 to
energize the output.
3.3. Relay Type Instructions
 Simulated Coil instruction operation.
3.3. Relay Type Instructions
 Action of the field device and PLC bit.
A signal present makes the
NO bit (1) true; a signal
absent makes the NO bit
(0) false. The reverse is
true for an NC bit.
3.3. Relay Type Instructions
 Simulated operation of the field input device and the PLC bit.
3.3. Relay Type Instructions
 The main function of the ladder logic diagram program is to control
outputs based on input conditions.
Each contact or coil symbol is referenced with an address that identifies what is being
evaluated and what is being controlled.
The same contact instruction can
be used throughout the program
whenever that condition needs to
be evaluated.
Not place the same addressed Coil
instruction on multiple rungs within
the same program.
3.3. Relay Type Instructions
 For an output to be activated or energized, at least one left-to-right true
logical path must exist.
A complete closed path is referred
to as having logical continuity.
When logical continuity exists
in at least one path, the rung
condition and Coil instruction
are said to be true.
3.3. Relay Type Instructions
 Simulated operation of logic continuity.
3.3. Relay Type Instructions
The logic states (0 or 1) indicate whether an
instruction is true or false and is the basis of
controller operation.
3.3. Relay Type Instructions
The time aspect relates to the repeated scans
of the program, wherein the input table is
updated with the most current status bits.
Lecture 3’s sequence
3.2 PLC Programming Languages
3.3 Relay Type Instructions
3.4 Branch Instructions
3.5 Internal Relay Instructions
3.1 Program Scan
0
3.6 Modes Of Operation
3.4. Branch Instructions
 Branch instructions are used to create parallel paths of input condition
instructions (OR logic).
The rung will be true
if either instruction A
or B is true.
3.4. Branch Instructions
 Parallel branches can be used to allow more than one combination of
input conditions.
Either A and not B, or C provides logical continuity and energizes output D.
3.4. Branch Instructions
 Simulated program, either A and not B, or C provides logical continuity
and energizes output D.
3.4. Branch Instructions
 Output branching allows a true logic path to control multiple outputs.
Either A or B provides a true logical path to
all three output instructions: C, D, and E.
Additional input instructions can be
programmed in the output branches.
3.4. Branch Instructions
 Simulated program, either A or B provides a true logical path to all three
output instructions: C, D, and E.
3.4. Branch Instructions
 Input and output branches can be nested to avoid redundant instructions
and to speed up processor scan time.
A nested branch starts or
ends within another branch.
3.4. Branch Instructions
In some PLC models, the
programming of a nested
branch cannot be done
directly.
It is possible, however,
to program a logically
equivalent branching
condition.
3.4. Branch Instructions
 There may be limitations
to the number of series
contact instructions that
can be included in one
rung of a ladder diagram
as well as limitations to
the number of parallel
branches.
3.4. Branch Instructions
The PLC will not allow for programming
of vertical contacts.
Reprogrammed to eliminate
vertical contact.
3.4. Branch Instructions
The processor examines the ladder logic rung
for logic continuity from left to right.
If programmed as shown, contact
combination FDBC would be ignored.
Reprogrammed circuit.
Lecture 3’s sequence
3.2 PLC Programming Languages
3.3 Relay Type Instructions
3.4 Branch Instructions
3.5 Internal Relay Instructions
3.1 Program Scan
0
3.6 Modes Of Operation
3.5. Internal Relay Instructions
 An internal output
does not directly
control an output
field device.
The advantage of using internal outputs is that there are many situations in
which an output instruction is required in a program but no physical connection
to a field device is needed.
3.5. Internal Relay Instructions
 Internal relay used for a program that requires more series contacts than
the rung allows.
This PLC allows for only
7 series contacts when
12 are required for the
programmed logic.
3.5. Internal Relay Instructions
 Simulated internal relay program.
3.5. Internal Relay Instructions
 Example 1: The hardwired manual/automatic circuit shown in
figure can be programmed using a PLC. The operation of the
process is summarized as follows:
 The Pump (M) is started by pressing the Start button and
stopped when Stop button is pressed.
 When the Selector switch (Manual/Auto) is in the manual
position, the Solenoid valve (SV) is always energized.
 When the selector switch is in the automatic position, the
solenoid valve is energized only when the Pressure switch
(PS) is closed.
 Energize the Pilot light (PL) when the solenoid valve is
operating.
3.5. Internal Relay Instructions
 Example 2: Write a ladder
program that will implement
the hardwired reciprocating
motion machine process control
schematic shown. The sequence
of operation is as follows:
 The Workpiece starts on the left and moves to the right when the Start button is
momentarily actuated.
 When it reaches the rightmost limit (LS2), the Motor automatically reverses and
brings the workpiece back to the leftmost position again, and the process repeats.
 The Reverse pushbutton provides a means of starting the motor in reverse so that
leftmost limit (LS1) can take over automatic control.
 Stop button is used to stop system operation at any time.
3.5. Internal Relay Instructions
 Example 3: Write a ladder program that will implement the following
continues filling operation:
 Start the Conveyor when Start button is momentarily pressed.
 Stop the Conveyor when Stop button is momentarily pressed.
 Energize the Run status light when the process is operating.
 Energize the Standby status light when the process is stopped.
 Stop the conveyor and energize the Standby light when the right edge
of the box is first sensed by the Photo switch.
 With the box in position and the conveyor stopped, open the Solenoid
valve and allow the box to fill. Filling should stop when the Level
sensor goes true.
 Energize the Full light when box is full. The Full light should remain
energized until the box is moved clear of the Photo switch.
Lecture 3’s sequence
3.2 PLC Programming Languages
3.3 Relay Type Instructions
3.4 Branch Instructions
3.5 Internal Relay Instructions
3.1 Program Scan
0
3.6 Modes Of Operation
3.6. Modes Of Operation
 A processor has basically two modes of operation: the program mode
and some variation of the run mode.
A three-position keyswitch may be
used to select different processor
modes of operation.
3.6. Modes Of Operation
 The program mode is used to enter a new program,
edit or update an existing program, upload files and
download files, document (print out) programs, or
change any software configuration file in the program.
 The run mode is used to execute the user program.
 The test mode is used to operate or monitor the user
program without energizing any outputs.
 The remote position allows the PLC to be remotely
changed between program and run mode by a
personal computer connected to the PLC processor.

Contenu connexe

Similaire à Chapter 3 - Basics of PLC Programming (1).pdf

Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organization
AmrutaMehata
 
Shishupal plc
Shishupal plcShishupal plc
Shishupal plc
Shishupal03012015
 
mod 3-1.pptx
mod 3-1.pptxmod 3-1.pptx
mod 3-1.pptx
lekha349785
 
PLC in Automation
PLC in AutomationPLC in Automation
PLC in Automation
Harshal Chaudhari
 
Implementing True Zero Cycle Branching in Scalar and Superscalar Pipelined Pr...
Implementing True Zero Cycle Branching in Scalar and Superscalar Pipelined Pr...Implementing True Zero Cycle Branching in Scalar and Superscalar Pipelined Pr...
Implementing True Zero Cycle Branching in Scalar and Superscalar Pipelined Pr...
IDES Editor
 
Bc0040
Bc0040Bc0040
Bc0040
hayerpa
 
CS304PC:Computer Organization and Architecture Session 15 program control.pptx
CS304PC:Computer Organization and Architecture Session 15 program control.pptxCS304PC:Computer Organization and Architecture Session 15 program control.pptx
CS304PC:Computer Organization and Architecture Session 15 program control.pptx
Asst.prof M.Gokilavani
 
Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01
VincentAcapen1
 
Plc example presentation
Plc example presentationPlc example presentation
Plc example presentation
Roshit Kadiru
 
Microcontroladores: introducción a la programación en lenguaje ensamblador AVR
Microcontroladores: introducción a la programación en lenguaje ensamblador AVRMicrocontroladores: introducción a la programación en lenguaje ensamblador AVR
Microcontroladores: introducción a la programación en lenguaje ensamblador AVR
SANTIAGO PABLO ALBERTO
 
final Unit 1-1.pdf
final Unit 1-1.pdffinal Unit 1-1.pdf
final Unit 1-1.pdf
prakashvs7
 
manual number 5 for embedded system course
manual number 5 for embedded system coursemanual number 5 for embedded system course
manual number 5 for embedded system course
misbahbatool47
 
Lect08
Lect08Lect08
10617568.ppt
10617568.ppt10617568.ppt
10617568.ppt
HusamAljabli
 
PLC: Principios básicos del controlador lógico programable mediante el softwa...
PLC: Principios básicos del controlador lógico programable mediante el softwa...PLC: Principios básicos del controlador lógico programable mediante el softwa...
PLC: Principios básicos del controlador lógico programable mediante el softwa...
SANTIAGO PABLO ALBERTO
 
-basic concept and history-of-plc-ppt.pptx
-basic concept and history-of-plc-ppt.pptx-basic concept and history-of-plc-ppt.pptx
-basic concept and history-of-plc-ppt.pptx
michael hailu
 
Chapter 8
Chapter 8Chapter 8
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
 
4th sem,(cs is),computer org unit-7
4th sem,(cs is),computer org unit-74th sem,(cs is),computer org unit-7
4th sem,(cs is),computer org unit-7
Sujay pai
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051
OGAGA OTOBOR
 

Similaire à Chapter 3 - Basics of PLC Programming (1).pdf (20)

Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organization
 
Shishupal plc
Shishupal plcShishupal plc
Shishupal plc
 
mod 3-1.pptx
mod 3-1.pptxmod 3-1.pptx
mod 3-1.pptx
 
PLC in Automation
PLC in AutomationPLC in Automation
PLC in Automation
 
Implementing True Zero Cycle Branching in Scalar and Superscalar Pipelined Pr...
Implementing True Zero Cycle Branching in Scalar and Superscalar Pipelined Pr...Implementing True Zero Cycle Branching in Scalar and Superscalar Pipelined Pr...
Implementing True Zero Cycle Branching in Scalar and Superscalar Pipelined Pr...
 
Bc0040
Bc0040Bc0040
Bc0040
 
CS304PC:Computer Organization and Architecture Session 15 program control.pptx
CS304PC:Computer Organization and Architecture Session 15 program control.pptxCS304PC:Computer Organization and Architecture Session 15 program control.pptx
CS304PC:Computer Organization and Architecture Session 15 program control.pptx
 
Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01
 
Plc example presentation
Plc example presentationPlc example presentation
Plc example presentation
 
Microcontroladores: introducción a la programación en lenguaje ensamblador AVR
Microcontroladores: introducción a la programación en lenguaje ensamblador AVRMicrocontroladores: introducción a la programación en lenguaje ensamblador AVR
Microcontroladores: introducción a la programación en lenguaje ensamblador AVR
 
final Unit 1-1.pdf
final Unit 1-1.pdffinal Unit 1-1.pdf
final Unit 1-1.pdf
 
manual number 5 for embedded system course
manual number 5 for embedded system coursemanual number 5 for embedded system course
manual number 5 for embedded system course
 
Lect08
Lect08Lect08
Lect08
 
10617568.ppt
10617568.ppt10617568.ppt
10617568.ppt
 
PLC: Principios básicos del controlador lógico programable mediante el softwa...
PLC: Principios básicos del controlador lógico programable mediante el softwa...PLC: Principios básicos del controlador lógico programable mediante el softwa...
PLC: Principios básicos del controlador lógico programable mediante el softwa...
 
-basic concept and history-of-plc-ppt.pptx
-basic concept and history-of-plc-ppt.pptx-basic concept and history-of-plc-ppt.pptx
-basic concept and history-of-plc-ppt.pptx
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
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...
 
4th sem,(cs is),computer org unit-7
4th sem,(cs is),computer org unit-74th sem,(cs is),computer org unit-7
4th sem,(cs is),computer org unit-7
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051
 

Dernier

Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Transcat
 
SENTIMENT ANALYSIS ON PPT AND Project template_.pptx
SENTIMENT ANALYSIS ON PPT AND Project template_.pptxSENTIMENT ANALYSIS ON PPT AND Project template_.pptx
SENTIMENT ANALYSIS ON PPT AND Project template_.pptx
b0754201
 
Introduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.pptIntroduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.ppt
Dwarkadas J Sanghvi College of Engineering
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
upoux
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
ElakkiaU
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
uqyfuc
 
smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...
um7474492
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
harshapolam10
 
Generative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdfGenerative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdf
mahaffeycheryld
 
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICSUNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
vmspraneeth
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
aryanpankaj78
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
CVCSOfficial
 
OOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming languageOOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming language
PreethaV16
 
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
sydezfe
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
Supermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdfSupermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdf
Kamal Acharya
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
ydzowc
 
Zener Diode and its V-I Characteristics and Applications
Zener Diode and its V-I Characteristics and ApplicationsZener Diode and its V-I Characteristics and Applications
Zener Diode and its V-I Characteristics and Applications
Shiny Christobel
 

Dernier (20)

Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
 
SENTIMENT ANALYSIS ON PPT AND Project template_.pptx
SENTIMENT ANALYSIS ON PPT AND Project template_.pptxSENTIMENT ANALYSIS ON PPT AND Project template_.pptx
SENTIMENT ANALYSIS ON PPT AND Project template_.pptx
 
Introduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.pptIntroduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.ppt
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
 
Generative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdfGenerative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdf
 
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICSUNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
 
OOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming languageOOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming language
 
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
Supermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdfSupermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdf
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
 
Zener Diode and its V-I Characteristics and Applications
Zener Diode and its V-I Characteristics and ApplicationsZener Diode and its V-I Characteristics and Applications
Zener Diode and its V-I Characteristics and Applications
 

Chapter 3 - Basics of PLC Programming (1).pdf

  • 1. Lecture 3’s sequence 3.2 PLC Programming Languages 3.3 Relay Type Instructions 3.4 Branch Instructions 3.5 Internal Relay Instructions 3.1 Program Scan 0 3.6 Modes Of Operation
  • 2. 3.1. Program Scan  During each program scan cycle, the processor reads all the inputs, takes these values, and energizes or de-energizes the outputs according to the user program.
  • 3. 3.1. Program Scan  The time it takes to complete a scan cycle is a measure of how fast the controller can react to changes in inputs.  If a controller must react to an input signal that changes states twice during the scan time, it is possible that the PLC will never be able to detect this change.  The scan time is a function of:  The speed of the processor module  The length of the ladder program  The type of instructions executed  The actual ladder true/false conditions
  • 4. 3.1. Program Scan  Overview of the data flow during the scan process.
  • 5. 3.1. Program Scan  The controller evaluates ladder logic rung instructions based on the rung condition preceding the instruction (rung-condition-in).
  • 6. 3.1. Program Scan  Scan process applied to a single rung program.
  • 7. 3.1. Program Scan  Scan process applied to a multiple rung program.
  • 8. 3.1. Program Scan  Vertical versus horizontal scan patterns. Horizontal scanning order Vertical scanning order
  • 9. Lecture 3’s sequence 3.2 PLC Programming Languages 3.3 Relay Type Instructions 3.4 Branch Instructions 3.5 Internal Relay Instructions 3.1 Program Scan 0 3.6 Modes Of Operation
  • 10. 3.2. PLC Programming Languages  PLC programming language refers to the method by which the user communicates information to the PLC. Standard IEC 61131 languages associated with PLC programming
  • 11. 3.2. PLC Programming Languages  Ladder diagram language is the most used PLC language and is designed to mimic hardwired relay logic. Hardwired relay control circuit Equivalent ladder diagram program
  • 12. 3.2. PLC Programming Languages  Functional block diagram programming uses instructions that are programmed as blocks wired together to accomplish certain functions.
  • 13. 3.2. PLC Programming Languages  Ladder diagram and functional block diagram programming used to produce the same logical output. Ladder diagram Equivalent function block diagram
  • 14. 3.2. PLC Programming Languages  Sequential function chart (SFC) programming language is like a flowchart of your process. The program is split into steps with multiple operations happening in parallel branches.
  • 15. 3.2. PLC Programming Languages  Instruction list programming language consists of a series of instructions that refer to the basic AND, OR, and NOT logic gate functions. Hardwired relay control circuit Equivalent instruction list program
  • 16. 3.2. PLC Programming Languages  Structured text is a high-level language primarily used to implement more complex procedures that cannot be easily expressed with graphical languages. Ladder diagram Equivalent structured text program
  • 17. Lecture 3’s sequence 3.2 PLC Programming Languages 3.3 Relay Type Instructions 3.4 Branch Instructions 3.5 Internal Relay Instructions 3.1 Program Scan 0 3.6 Modes Of Operation
  • 18. 3.3. Relay Type Instructions  The ladder diagram language is a symbolic set of instructions used to create the controller program. Representations of contacts and coils are the basic symbols of the logic ladder diagram instruction set.
  • 19. 3.3. Relay Type Instructions  The Normally Open Contact instruction looks and operates like a normally open relay contact. Associated with each Normally Open Contact instruction is a memory bit linked to the status of an input device or an internal logical condition in a rung.
  • 20. 3.3. Relay Type Instructions  The memory bit is set to 1 or 0 depending on the status of the input. A 1 corresponds to a true status or on condition. If the instruction memory bit is a 1 (true) this instruction will allow rung continuity through itself, like a closed relay contact.
  • 21. 3.3. Relay Type Instructions A 0 corresponds to a false status or off condition. If the instruction memory bit is a 0 (false) this instruction will not allow rung continuity through itself and will assume a normally open state, just like an open relay contact.
  • 22. 3.3. Relay Type Instructions  Simulated Normally Open Contact instruction operation.
  • 23. 3.3. Relay Type Instructions  The Normally Closed Contact instruction looks and operates like a normally closed relay contact. This instruction asks the PLC’s processor to examine if the contact is open. It does this by examining the bit at the memory location specified by the address for a 0 or 1.
  • 24. 3.3. Relay Type Instructions As with any other input the memory bit is set to 1 or 0 depending on the status of the input. A 1 corresponds to a true status or on condition. The instruction is interpreted as false when the bit is 1 and will not allow rung continuity through itself.
  • 25. 3.3. Relay Type Instructions A 0 corresponds to a off condition. The instruction is interpreted as true when the bit is 0 and will not allow rung continuity through itself.
  • 26. 3.3. Relay Type Instructions  Simulated Normally Closed Contact instruction operation.
  • 27. 3.3. Relay Type Instructions  The Coil instruction looks and operates like a relay coil. This instruction signals the PLC to energize (switch on) or de-energize (switch off ) the output. The instruction is associated with a memory bit that energizes the output when set to 1 and de-energizes the output when reset to 0.
  • 28. 3.3. Relay Type Instructions A true logic path is established by the input instructions in the rung. Coil instruction is set to 1 to energize the output.
  • 29. 3.3. Relay Type Instructions  Simulated Coil instruction operation.
  • 30. 3.3. Relay Type Instructions  Action of the field device and PLC bit. A signal present makes the NO bit (1) true; a signal absent makes the NO bit (0) false. The reverse is true for an NC bit.
  • 31. 3.3. Relay Type Instructions  Simulated operation of the field input device and the PLC bit.
  • 32. 3.3. Relay Type Instructions  The main function of the ladder logic diagram program is to control outputs based on input conditions. Each contact or coil symbol is referenced with an address that identifies what is being evaluated and what is being controlled. The same contact instruction can be used throughout the program whenever that condition needs to be evaluated. Not place the same addressed Coil instruction on multiple rungs within the same program.
  • 33. 3.3. Relay Type Instructions  For an output to be activated or energized, at least one left-to-right true logical path must exist. A complete closed path is referred to as having logical continuity. When logical continuity exists in at least one path, the rung condition and Coil instruction are said to be true.
  • 34. 3.3. Relay Type Instructions  Simulated operation of logic continuity.
  • 35. 3.3. Relay Type Instructions The logic states (0 or 1) indicate whether an instruction is true or false and is the basis of controller operation.
  • 36. 3.3. Relay Type Instructions The time aspect relates to the repeated scans of the program, wherein the input table is updated with the most current status bits.
  • 37. Lecture 3’s sequence 3.2 PLC Programming Languages 3.3 Relay Type Instructions 3.4 Branch Instructions 3.5 Internal Relay Instructions 3.1 Program Scan 0 3.6 Modes Of Operation
  • 38. 3.4. Branch Instructions  Branch instructions are used to create parallel paths of input condition instructions (OR logic). The rung will be true if either instruction A or B is true.
  • 39. 3.4. Branch Instructions  Parallel branches can be used to allow more than one combination of input conditions. Either A and not B, or C provides logical continuity and energizes output D.
  • 40. 3.4. Branch Instructions  Simulated program, either A and not B, or C provides logical continuity and energizes output D.
  • 41. 3.4. Branch Instructions  Output branching allows a true logic path to control multiple outputs. Either A or B provides a true logical path to all three output instructions: C, D, and E. Additional input instructions can be programmed in the output branches.
  • 42. 3.4. Branch Instructions  Simulated program, either A or B provides a true logical path to all three output instructions: C, D, and E.
  • 43. 3.4. Branch Instructions  Input and output branches can be nested to avoid redundant instructions and to speed up processor scan time. A nested branch starts or ends within another branch.
  • 44. 3.4. Branch Instructions In some PLC models, the programming of a nested branch cannot be done directly. It is possible, however, to program a logically equivalent branching condition.
  • 45. 3.4. Branch Instructions  There may be limitations to the number of series contact instructions that can be included in one rung of a ladder diagram as well as limitations to the number of parallel branches.
  • 46. 3.4. Branch Instructions The PLC will not allow for programming of vertical contacts. Reprogrammed to eliminate vertical contact.
  • 47. 3.4. Branch Instructions The processor examines the ladder logic rung for logic continuity from left to right. If programmed as shown, contact combination FDBC would be ignored. Reprogrammed circuit.
  • 48. Lecture 3’s sequence 3.2 PLC Programming Languages 3.3 Relay Type Instructions 3.4 Branch Instructions 3.5 Internal Relay Instructions 3.1 Program Scan 0 3.6 Modes Of Operation
  • 49. 3.5. Internal Relay Instructions  An internal output does not directly control an output field device. The advantage of using internal outputs is that there are many situations in which an output instruction is required in a program but no physical connection to a field device is needed.
  • 50. 3.5. Internal Relay Instructions  Internal relay used for a program that requires more series contacts than the rung allows. This PLC allows for only 7 series contacts when 12 are required for the programmed logic.
  • 51. 3.5. Internal Relay Instructions  Simulated internal relay program.
  • 52. 3.5. Internal Relay Instructions  Example 1: The hardwired manual/automatic circuit shown in figure can be programmed using a PLC. The operation of the process is summarized as follows:  The Pump (M) is started by pressing the Start button and stopped when Stop button is pressed.  When the Selector switch (Manual/Auto) is in the manual position, the Solenoid valve (SV) is always energized.  When the selector switch is in the automatic position, the solenoid valve is energized only when the Pressure switch (PS) is closed.  Energize the Pilot light (PL) when the solenoid valve is operating.
  • 53. 3.5. Internal Relay Instructions  Example 2: Write a ladder program that will implement the hardwired reciprocating motion machine process control schematic shown. The sequence of operation is as follows:  The Workpiece starts on the left and moves to the right when the Start button is momentarily actuated.  When it reaches the rightmost limit (LS2), the Motor automatically reverses and brings the workpiece back to the leftmost position again, and the process repeats.  The Reverse pushbutton provides a means of starting the motor in reverse so that leftmost limit (LS1) can take over automatic control.  Stop button is used to stop system operation at any time.
  • 54. 3.5. Internal Relay Instructions  Example 3: Write a ladder program that will implement the following continues filling operation:  Start the Conveyor when Start button is momentarily pressed.  Stop the Conveyor when Stop button is momentarily pressed.  Energize the Run status light when the process is operating.  Energize the Standby status light when the process is stopped.  Stop the conveyor and energize the Standby light when the right edge of the box is first sensed by the Photo switch.  With the box in position and the conveyor stopped, open the Solenoid valve and allow the box to fill. Filling should stop when the Level sensor goes true.  Energize the Full light when box is full. The Full light should remain energized until the box is moved clear of the Photo switch.
  • 55. Lecture 3’s sequence 3.2 PLC Programming Languages 3.3 Relay Type Instructions 3.4 Branch Instructions 3.5 Internal Relay Instructions 3.1 Program Scan 0 3.6 Modes Of Operation
  • 56. 3.6. Modes Of Operation  A processor has basically two modes of operation: the program mode and some variation of the run mode. A three-position keyswitch may be used to select different processor modes of operation.
  • 57. 3.6. Modes Of Operation  The program mode is used to enter a new program, edit or update an existing program, upload files and download files, document (print out) programs, or change any software configuration file in the program.  The run mode is used to execute the user program.  The test mode is used to operate or monitor the user program without energizing any outputs.  The remote position allows the PLC to be remotely changed between program and run mode by a personal computer connected to the PLC processor.