SlideShare a Scribd company logo
1 of 57
Download to read offline
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.

More Related Content

Similar to 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 organizationAmrutaMehata
 
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
 
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.pptxAsst.prof M.Gokilavani
 
Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01VincentAcapen1
 
Plc example presentation
Plc example presentationPlc example presentation
Plc example presentationRoshit 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 AVRSANTIAGO PABLO ALBERTO
 
final Unit 1-1.pdf
final Unit 1-1.pdffinal Unit 1-1.pdf
final Unit 1-1.pdfprakashvs7
 
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
 
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-7Sujay pai
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051OGAGA OTOBOR
 
Programmable Logic Controller
Programmable Logic ControllerProgrammable Logic Controller
Programmable Logic ControllerValai Ganesh
 
Bca examination 2016 csa
Bca examination 2016 csaBca examination 2016 csa
Bca examination 2016 csaAnjaan Gajendra
 

Similar to 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
 
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...
 
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
 
Programmable Logic Controller
Programmable Logic ControllerProgrammable Logic Controller
Programmable Logic Controller
 
Bca examination 2016 csa
Bca examination 2016 csaBca examination 2016 csa
Bca examination 2016 csa
 

Recently uploaded

Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...ronahami
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)ChandrakantDivate1
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Danikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdfDanikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdfthietkevietthinh
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptAfnanAhmad53
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptjigup7320
 
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Payal Garg #K09
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelDrAjayKumarYadav4
 
Databricks Generative AI Fundamentals .pdf
Databricks Generative AI Fundamentals  .pdfDatabricks Generative AI Fundamentals  .pdf
Databricks Generative AI Fundamentals .pdfVinayVadlagattu
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...ssuserdfc773
 
Introduction to Geographic Information Systems
Introduction to Geographic Information SystemsIntroduction to Geographic Information Systems
Introduction to Geographic Information SystemsAnge Felix NSANZIYERA
 

Recently uploaded (20)

Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Danikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdfDanikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdf
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .ppt
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) ppt
 
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata Model
 
Databricks Generative AI Fundamentals .pdf
Databricks Generative AI Fundamentals  .pdfDatabricks Generative AI Fundamentals  .pdf
Databricks Generative AI Fundamentals .pdf
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
 
Introduction to Geographic Information Systems
Introduction to Geographic Information SystemsIntroduction to Geographic Information Systems
Introduction to Geographic Information Systems
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 

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.