SlideShare a Scribd company logo
1 of 27
Download to read offline
MET 382                                                                   1/14/2008




                                 PLC Fundamentals –
                                 Ladder Logic Fundamentals
                                            MET 382
                                   Controls & Instrumentation
                                        for Automation

                                            Spring ‘08
                                           T.E. Kostek




                    Topics
                       PLC programming languages
                       Anatomy of a ladder program
                       Logic functions
                       Logical continuity vs. electrical continuity
                       I/O Mapping
                       Mastering examine on and examine off
                       instructions
                       The PLC scanning process


                                                                      2




Ladder Logic Fundamentals                                                        1
MET 382                                                                               1/14/2008




                    PLC Programming Languages
                     In the United States, ladder logic is the most popular
                                                    g               p p
                     method used to program a PLC

                     This course will focus primarily on ladder logic programming

                     Other programming methods include:
                        Function block diagrams (FBDs)
                        Structured text (ST)
                        Instruction List (IL)
                        Sequential function charts (SFCs)



                                                                                  3




                    Anatomy of a Ladder Program
                        Input Instructions (conditions)     Output Instructions
                                                            (actions)


                    Rung 0



                    Rung 1



                    Rung 2




                                         Left power rail    Right power rail      4




Ladder Logic Fundamentals                                                                    2
MET 382                                                                              1/14/2008




                    Anatomy of a Ladder Program
                    (cont’d)
                       Input instructions are entered on the left

                       Output instructions are entered on the right

                       The power rails simulate the power supply lines
                            L1 and L2 for AC circuits and +24 v and ground for
                            DC circuits
                                i it

                       Most PLCs allow more than one output per rung

                                                                                 5




                    Anatomy of a Ladder Program
                    (cont’d)
                       The processor (or “controller”) scans
                                          controller )
                       ladder rungs from top-to-bottom and from
                       left-to-right.
                            The basic sequence is altered whenever jump
                            or subroutine instructions are executed.




                                                                                 6




Ladder Logic Fundamentals                                                                   3
MET 382                                                                                  1/14/2008




                     Anatomy of a Ladder Program (cont’d)



                                    A 3 rung example ladder program
                                      3-rung




                                                                                     7




                     Anatomy of a Ladder Program (cont’d)

                                                                Rung Comment




                     Rung Number
                                                 Description assigned to alias tag

                                                 Alias tag pointing to base address

                                                 Base address

                                                 Input Instruction
                                                                                     8




Ladder Logic Fundamentals                                                                       4
MET 382                                                                            1/14/2008




                    Logic Functions
                       PLC programming is a logical procedure

                       In a PLC program, “things” (inputs and rungs)
                       are either TRUE or FALSE

                       If the proper input conditions are TRUE:
                            The rung becomes TRUE and an output action occurs
                            (for example, a motor turns on)

                       If the proper input conditions are not TRUE:
                            The rung becomes FALSE and an output action does
                            not occur
                                                                               9




                    Logic Functions (cont’d)
                      Ladder logic is based on the following
                                g                          g
                      logic functions:
                        AND
                        OR
                             Sometimes called “inclusive OR”
                        Exclusive OR




                                                                           10




Ladder Logic Fundamentals                                                                 5
MET 382                                                                                                  1/14/2008




                    Logic Functions - AND
                                   Input 1
                                                        AND
                                                                           O t t
                                                                           Output
                                   Input 2              Logic


                                             Input 1    Input 2    Output
                                                0          0         0
                                                0          1         0                0     False
                                                1          0         0                1     True
                                                1          1         1


                            Contacts
                             ANDed                                                (          )
                            together
                                                                                                    11




                    Logic Functions - OR
                                  Input 1
                                                         OR
                                                         O
                                                                           O t t
                                                                           Output
                                  Input 2               Logic


                                              Input 1   Input 2   Output
                                                 0         0        0
                                                 0         1        1         0           False
                                                 1         0        1         1           True
                                                 1         1        1




                             Contacts                                             (          )
                              ORed
                             together
                                                                                                    12




Ladder Logic Fundamentals                                                                                       6
MET 382                                                                                 1/14/2008




                    Logic Functions - Exclusive OR
                   In addition to ANDing and ORing, the Exclusive OR (XOR) is
                   also useful. When the inputs are DIFFERENT, the XOR
                      t ti t
                   output is true.

                              Input 1
                                                  XOR
                                                                     Output
                              Input 2             Logic



                                        Input 1   Input 2   Output
                                           0         0        0
                                           0         1        1        0   False
                                           1         0        1        1   True
                                           1         1        0

                                                                                   13




                    Logic Functions (cont’d)
                      Example 1 – Inputs ANDed together in series

                   Inputs                                      Output




                               Three input instructions ANDed together.

                                     All 3 input instructions must be
                                   true in order to energize the output

                                                                                   14




Ladder Logic Fundamentals                                                                      7
MET 382                                                                        1/14/2008




                     Logic Functions (cont’d)
                      Example 2 – Inputs ORed together in parallel
                     Inputs                           Output




                               Three input instructions ORed together.

                                 If any of the 3 input instructions are
                                   true the output will be energized      15




                     Logic Functions (cont’d)
                     Example 3 – A combination of ANDing and ORing




                                                                          16




Ladder Logic Fundamentals                                                             8
MET 382                                                                                    1/14/2008




                    Logical Continuity
                       Logical continuity in a ladder rung occurs when
                       there is a continuous path of TRUE conditions
                       from the left power rail to the output instruction(s)

                       When there is logical continuity, the rung
                       becomes true and the output becomes energized




                                                                                      17




                    Logical Continuity – Example 1
                                                                    Rung False
                    Rung 0       T         F              T

                                                    This input instruction is false
                                                    This input instruction is true
                                                                    Rung False
                    Rung 1       F


                                                                    Rung T
                                                                    R    True
                    Rung 2       F         T              T


                                 T

                                                                                      18
                                  Left power rail                  Right power rail




Ladder Logic Fundamentals                                                                         9
MET 382                                                                                       1/14/2008




                    Logical Continuity – Example 2
                            Virtual power flow (not actual current flow)




                                        Path of logical continuity
                                                                           Rung true
                                                                           due to this
                                                                           branch




                             TRUE conditions are highlighted in green
                             on the programming panels display
                                                       PLC-
                                                       PLC-5 Systems                     19




                    Logical Continuity vs.
                    Electrical Continuity
                     Electrical continuity in an input circuit, occurs when there
                     is a complete path for current to flow.

                     A PLC input circuit is a simple series circuit consisting of a:
                        Power supply,
                        Switch, and a
                        Load

                     When there is electrical continuity, a bit in the PLCs
                     memory (sometimes called the input image table) is set to
                     a 1.


                                                                                         20




Ladder Logic Fundamentals                                                                           10
MET 382                                                                                          1/14/2008




                    Electrical Continuity
                                  Normally open (N.O.) pushbutton [shown pushed]
                          +24v                                                 COM
                                                    Input Module



                                                                     Input
                                                                     Circuitry




                                                                                            21




                     Electrical Continuity                       Power supply is implied

                                                +   -
                  +24v                                                       COM
                                              Input Module



                                                             Input
                                                             Circuitry
                         Screw terminals




                          Power rail                                               Power rail

                                                                                            22




Ladder Logic Fundamentals                                                                              11
MET 382                                                                                             1/14/2008




                     Logical vs. Electrical Continuity
                      Note: It’s possible to have electrical continuity and not
                      have logical continuity (and vise versa).

                       Control Wiring Diagram:                   Ladder Program:
                            PB0 - N.O. pushbutton
                              (shown pushed)
                                                                 This instruction is false when
                                                                 the pushbutton is pushed

                                                         I_PB0
                                                         I PB0
                                                                                   (       )

                                                             No Logical Continuity



                     Electrical Continuity                                                     23




                    I/O Mapping
                      Every discrete input is assigned to a specific bit
                      in the PLC’s memory (input image table)
                            If there is electrical continuity, the bit is set to a 1
                            If there is no electrical continuity, the bit is reset to a 0

                      Every discrete output is assigned to a specific bit
                      in the PLC’s memory (output image table)
                             PLC s
                            In order for an output to turn on, its associated bit
                            must first be set to a 1


                                                                                               24




Ladder Logic Fundamentals                                                                                 12
MET 382                                                                                                   1/14/2008




                                                 PLC Data Table                  Note: Bit addresses
                                                  1 word (16 bits)               are given in octal for
                             Input
                                                  Input Image Table
                                                                                 an Allen-Bradley
                             module               (only 1 word shown)            PLC-5 system

                    input, PB1           16    14 12    10    06 04   02    00   The bits are
                                       0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0           numbered 0 – 17
                                      17    15   13  11    07   05 03    01


                    I:XXX/10



                                                 Output Image Table
                   output , LT1                   (only 1 word shown)

                       R

                    O:XXX/01
                                         16    14 12    10    06 04   02    00
                                       0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
                                      17    15   13  11    07   05 03    01              PLC-
                                                                                         PLC-5 Systems
                     Output Module
                                                                                                   25




                     I/O Mapping



                                                           Output Image Table in
                                                           RSLogix 5 software

                                                           Input Image Table
                                                           in RSLogix 5 software




                                                             PLC-
                                                             PLC-5 Systems                         26




Ladder Logic Fundamentals                                                                                       13
MET 382                                                                                           1/14/2008




                    I/O Mapping
                                        Output Image Table in RSLogix 5:

                    O:005 is a 16 bit
                    word address:




                    O:005/07 is the
                    address of a bit
                    which resides in
                    the word O:005




                                                 PLC-
                                                 PLC-5 Systems                            27




                    I/O Mapping
                                                                 1 word = 16 bits (bits are
                  Input Image Table in RSLogix 5:                numbered in octal for a PLC-5)




                                                 PLC-
                                                 PLC-5 Systems                            28




Ladder Logic Fundamentals                                                                               14
MET 382                                                                                      1/14/2008




                    I/O Mapping
                        ControlLogix tag database:




                                Alias tag            Current tag       Base address
                     (a pointer to a base address)      value          (real address)



                                                      ControlLogix Systems              29




                    Mastering Examine On &
                    Examine Off Instructions
                    Discrete input devices have normally
                    open (N.O.) and/or normally closed (N.C.)
                    contacts.

                       Example: Pushbuttons can be purchased with
                       either N.O. or N.C. mechanical contacts.

                       “Normally” implies the state of the contacts
                       when you are NOT pushing the button.


                                                                                        30




Ladder Logic Fundamentals                                                                          15
MET 382                                                                                1/14/2008




                    Mastering Examine On &
                    Examine Off Instructions

                      Normally open (N.O.) vs. normally closed (N.C.)
                      contacts:

                   Contact   Resistance between              Resistance between
                    Type: contacts when NOT pushed:         contacts when pushed:
                    N.O.         Infinite ohms                    Zero ohms
                    N.C.          Zero ohms                      Infinite ohms



                                                                                  31




                    Mastering Examine On & Examine Off
                    Instructions
                      PLC programs have both normally open and
                      normally closed input instructions.




                                              Normally closed input instruction
                                                     y          p




                              Normally open input instruction
                                                                                  32




Ladder Logic Fundamentals                                                                    16
MET 382                                                                                               1/14/2008




                    Mastering Examine On & Examine Off
                    Instructions
                       The Examine On Instruction

                                         This input instruction examines the specified
                                         bit for a logic 1. If the bit is a 1, the instruction
                                         is true, otherwise the instruction is false.




                                     This is generally known as a
                                    normally open input instruction.


                                                                                                 33




                    Mastering Examine On & Examine Off
                    Instructions
                       The Examine On Instruction

                                                                This is the address assigned
                                                                to the instruction (I:007/00).

                                                                Note: This instruction must be
                                                                assigned a bit address not a
                                                                               address,
                                                                word address.
                        This is the instruction


                                                     PLC-
                                                     PLC-5 Systems
                                                                                                 34




Ladder Logic Fundamentals                                                                                   17
MET 382                                                                                             1/14/2008




                    Mastering Examine On & Examine
                    Off Instructions
                       The Examine Off Instruction

                                        This input instruction examines the specified
                                        bit for a logic 0. If the bit is a 0, the instruction is
                                        true, otherwise the instruction is false.



                                    This is generally known as a
                                  normally closed input instruction.

                                                                                               35




                    Mastering Examine On & Examine
                    Off Instructions
                       Examine On instructions are also called:
                            XIC, eXamine If Closed

                       Examine Off instructions are also called:
                            XIO, eXamine If Open



                      Note: The terms Examine on, Examine off, Examine if
                      closed (XIC), and Examine if open (XIO) are unique to
                      Allen-Bradley PLCs.
                                                                                               36




Ladder Logic Fundamentals                                                                                 18
MET 382                                                                            1/14/2008




                    Mastering Examine On & Examine
                    Off Instructions
                       Examine On and Examine Off Instructions
                       that are True are highlighted green in the
                       PLC programming software:




                                     True                  False


                                                                              37




                    Mastering Examine On & Examine
                    Off Instructions
                       A program can Examine On ( Examine Off) real
                         p g                          (or              )
                       inputs, real outputs, internal storage bits, timer
                       done bits, etc.




                     Examine ON              Examine OFF an        Examine ON
                      a real input          internal storage bit   a real output


                                                                              38




Ladder Logic Fundamentals                                                                19
MET 382                                                                                                 1/14/2008




                     Mastering Examine On & Examine Off Instructions
                        Input and output field devices are wired to PLC discrete
                        Input/Output (I/O) modules. How the system functions
                        depends on the program!

                                +24 VDC                                                     120 VAC
                                          Start
                  Two pushbuttons
                  wired to two PLC
                  inputs                                       PLC




                                                                          uts
                                          (N.O.)


                                                      Inputs
                                                           s
                                                                                      FAN




                                                                      Outpu
                                          Stop



                                          (N.C.)                                    A fan is wired to
                                                                                    a PLC output
                                          (Continued on next slide … )                            39




                     Mastering Examine On & Examine Off Instructions

                  How the system functions depends on the program:

                   The inputs could be programmed as two inputs ANDed together:




                   Or, the inputs could be programmed as two inputs ORed together:




                                          In either case, the wiring is the same!
                                          The PLC program logically connects the input
                                          devices to the output actuators through the PLC
                                                                                                  40
                                          program!




Ladder Logic Fundamentals                                                                                     20
MET 382                                                                                                       1/14/2008




                     Mastering Examine On & Examine Off Instructions

                   Input field devices                                           Instructions in the
                   wired to the PLC             The PLC Data Table               PLC program

                   Electrical Continuity         Input Image Table Bit           Logical Continuity

                   +24v     Start
                                                          0 or 1
                                     (N.O.)
                                               The bit representing the push
                 Current flows if button is    button is:                       True if the bit is a 1
                 pressed
                                               ON (set to a 1) if there is
                                               electrical continuity
                   +24v                        OFF (reset to a 0) if there is
                             Start             NO electrical continuity
                                     (N.C.)

                                                                                True if the bit is a 0
                 Current flows if button is
                 NOT pressed                                                                         41




                     Mastering Examine On & Examine Off Instructions

                   Output field devices                                          Instructions in the
                   wired to the PLC             The PLC Data Table               PLC program

                  Electrical Continuity        Output Image Table Bit            Logical Continuity

                                 120 VAC
                                                          0 or 1
                            FAN
                                               The bit representing the fan
                 Output turns on when the      output is:
                 bit in the output image
                     i th     t ti                                              The output image table
                                               ON (set to a 1) if there is
                 table is a 1 (voltage is                                       bit is set to a 1 when the
                                               logical continuity
                 applied across the output                                      rung is true or is reset to
                 terminals and current flows   OFF (reset to a 0) if there is   a 0 when the rung is
                 in the output circuit)        NO logical continuity            false


                                                                                                     42




Ladder Logic Fundamentals                                                                                           21
MET 382                                                                        1/14/2008




                    The Scanning Process
                       Scan refers to the continuous and
                       sequential process of:

                            Reading the PLC inputs
                            Executing the ladder program (rung-by-rung)
                            Updating the PLC outputs



                                                                          43




                    The Scanning Process
                       The scan sequence can be broken into
                       two functional parts:
                            The Program Scan
                              Scan the ladder program

                            The I/O Update Scan
                              Write outputs, Read inputs



                                                                          44




Ladder Logic Fundamentals                                                            22
MET 382                                                                                      1/14/2008




                     The Scanning Process
                     The Program Scan:
                       For each rung executed, the PLC processor will:
                                     executed
                            Examine the status of the input image table bits,

                            Solve the ladder logic in order to determine logical
                            continuity (is the rung true?),

                            Update the appropriate output image table bits, if
                            necessary.

                            Note: The output will not actually be energized until
                            the I/O update part of the scan.
                                                                                        45




                    The Scanning Process
                    The I/O Update Scan:
                       Copy the output image table status to the ALL of
                       the output terminals (discrete output circuits)
                            Power is applied to the output device if it’s output
                            image table bit has been previously set to a 1.

                       Copy the status of ALL of the input terminals to
                       the input image table
                            If an input is active (i.e., there is electrical continuity),
                            the corresponding bit in the input image table will be
                            set to a 1.
                                                                                        46




Ladder Logic Fundamentals                                                                          23
MET 382                                                                                               1/14/2008




                    The Scanning Process
                       Read inputs             All input                          Input Image
                                              Terminals                              Table




                   Solve the ladder program                                        (    )

                   (update output image table as
                   necessary)
                                                                                   [END]



                     Update outputs           All output                         Output Image
                                              Terminals                             Table

                                                                                                 47




                    The Scanning Process
                     In a ladder program, a specific output address (e.g.,
                     O:013/02) should NOT be referenced on more than one
                     rung!
                     r ng!
                        This is sometimes called “duplicate coils”

                        Using duplicate coils will cause unpredictable operation and should
                        be avoided

                        When using duplicate coils “the last rung wins”

                        See example on next slide




                                                                     Continued on next slide …
                                                                                                 48




Ladder Logic Fundamentals                                                                                   24
MET 382                                                                                          1/14/2008




                    Duplicate Coil Example
                  Problem: Rungs 11 and 19 both reference the same output address:




                  Solution: Edit the ladder program as follows:
                                            p g




                   Problem corrected, this output is only used once in the entire program   49




                    The Scanning Process
                       The actual scan time is a function of:
                            The
                            Th speed of the processor module
                                   d f th               d l

                            The length of the ladder program

                            The type of instructions executed

                            The t l l dd t /f l
                            Th actual ladder true/false conditions (
                                                            diti   (e.g.,
                            jump instructions, subroutines, etc.)



                                                                                            50




Ladder Logic Fundamentals                                                                              25
MET 382                                                                                     1/14/2008




                    The Scanning Process
                     The actual scan time is calculated and stored in the PLCs
                     memory
                        The PLC computes the scan time each time the END instruction is
                        executed

                        Scan time data can be monitored via the PLC programming
                        software (e.g., RSLogix 5)

                        Scan time data is addressable and can therefore be referenced in
                        the PLC program

                     Typical
                     T i l scan ti
                                 time d t i l d
                                       data includes:
                       The maximum scan time
                       The last scan time


                                                                                       51




                    The Scanning Process
                     Allen-Bradley PLCs generally have 3
                     modes of operation:

                        Run Mode
                            When placed in the RUN mode, the processor begins
                            the scanning process as previously described

                        Program Mode
                            When placed in the PROGRAM mode, the processor
                            stops scanning the ladder program and (typically) all
                            the outputs are turned off

                        Test Mode
                            The TEST mode is identical to the RUN mode, except
                            all outputs are disabled (held in their off state)         52




Ladder Logic Fundamentals                                                                         26
MET 382                                                                                      1/14/2008




                    The Scanning Process
                    Most Allen-Bradley processors (controllers) have
                    a 3-position keyswitch:
                       REM (Remote)
                            In the remote mode, the PLC programming software (e.g.,
                            RSLogix5000) can be used to place the controller into the
                            remote program mode or the remote run mode.

                       RUN
                            When keyswitch is placed in the RUN mode, the controller
                            is switched into the run mode. The PLC programming
                            software cannot change the controllers mode.

                       PROG (Program)
                            When keyswitch is placed in the PROG mode, the
                            controller is switched into the program mode. The PLC
                            programming software cannot change the controllers
                            mode.

                                                                                        53




Ladder Logic Fundamentals                                                                          27

More Related Content

What's hot

Servomechanism in Control systems engineering
Servomechanism in Control systems engineeringServomechanism in Control systems engineering
Servomechanism in Control systems engineeringNisarg Amin
 
PLC (PROGRAMMABLE LOGIC CONTROLLER)
PLC (PROGRAMMABLE LOGIC CONTROLLER)PLC (PROGRAMMABLE LOGIC CONTROLLER)
PLC (PROGRAMMABLE LOGIC CONTROLLER)Manoj Gowda K
 
Introduction to Programmable Logic Controllers (PLC's)
Introduction to Programmable Logic Controllers (PLC's)Introduction to Programmable Logic Controllers (PLC's)
Introduction to Programmable Logic Controllers (PLC's)morin moli
 
PLC(Programmable Logic Controller)-Control system Engineering.
PLC(Programmable Logic Controller)-Control system Engineering.PLC(Programmable Logic Controller)-Control system Engineering.
PLC(Programmable Logic Controller)-Control system Engineering.Tahmid Rongon
 
Programmable logic controller - Siemens S7-1200
Programmable logic controller - Siemens S7-1200Programmable logic controller - Siemens S7-1200
Programmable logic controller - Siemens S7-1200Ahmed Elsayed
 
Electric Actuator
Electric ActuatorElectric Actuator
Electric Actuatordiego5wh
 
Plc example presentation
Plc example presentationPlc example presentation
Plc example presentationRoshit Kadiru
 
Dc motor speed controller by pwm technique
Dc motor speed controller by pwm techniqueDc motor speed controller by pwm technique
Dc motor speed controller by pwm techniqueWeb Design & Development
 
programmable logic controller presentation
programmable logic controller presentationprogrammable logic controller presentation
programmable logic controller presentationAshutosh Verma
 
What Is a Programmable Logic Controller (PLC)
What Is a Programmable Logic Controller (PLC)What Is a Programmable Logic Controller (PLC)
What Is a Programmable Logic Controller (PLC)yogesh8418
 
PLC Introduction Details
PLC Introduction DetailsPLC Introduction Details
PLC Introduction Detailssuhaskhadake
 
TIA Portal STEP 7 Basic
TIA Portal STEP 7 BasicTIA Portal STEP 7 Basic
TIA Portal STEP 7 BasicBinh Vo
 

What's hot (20)

Servomechanism in Control systems engineering
Servomechanism in Control systems engineeringServomechanism in Control systems engineering
Servomechanism in Control systems engineering
 
PLC (PROGRAMMABLE LOGIC CONTROLLER)
PLC (PROGRAMMABLE LOGIC CONTROLLER)PLC (PROGRAMMABLE LOGIC CONTROLLER)
PLC (PROGRAMMABLE LOGIC CONTROLLER)
 
Introduction to Programmable Logic Controllers (PLC's)
Introduction to Programmable Logic Controllers (PLC's)Introduction to Programmable Logic Controllers (PLC's)
Introduction to Programmable Logic Controllers (PLC's)
 
PLC(Programmable Logic Controller)-Control system Engineering.
PLC(Programmable Logic Controller)-Control system Engineering.PLC(Programmable Logic Controller)-Control system Engineering.
PLC(Programmable Logic Controller)-Control system Engineering.
 
Programmable logic controller - Siemens S7-1200
Programmable logic controller - Siemens S7-1200Programmable logic controller - Siemens S7-1200
Programmable logic controller - Siemens S7-1200
 
Electric Actuator
Electric ActuatorElectric Actuator
Electric Actuator
 
plc introduction
plc introductionplc introduction
plc introduction
 
Plc example presentation
Plc example presentationPlc example presentation
Plc example presentation
 
Dc motor speed controller by pwm technique
Dc motor speed controller by pwm techniqueDc motor speed controller by pwm technique
Dc motor speed controller by pwm technique
 
Classic control
Classic control Classic control
Classic control
 
programmable logic controller presentation
programmable logic controller presentationprogrammable logic controller presentation
programmable logic controller presentation
 
What Is a Programmable Logic Controller (PLC)
What Is a Programmable Logic Controller (PLC)What Is a Programmable Logic Controller (PLC)
What Is a Programmable Logic Controller (PLC)
 
Industrial Automation
Industrial AutomationIndustrial Automation
Industrial Automation
 
6. steady state error
6. steady state error6. steady state error
6. steady state error
 
Plc
PlcPlc
Plc
 
Vt training plc_1
Vt training plc_1Vt training plc_1
Vt training plc_1
 
PLC Introduction Details
PLC Introduction DetailsPLC Introduction Details
PLC Introduction Details
 
TIA Portal STEP 7 Basic
TIA Portal STEP 7 BasicTIA Portal STEP 7 Basic
TIA Portal STEP 7 Basic
 
Dcs vs scada
Dcs vs scadaDcs vs scada
Dcs vs scada
 
Ppt on control system
Ppt on control systemPpt on control system
Ppt on control system
 

Viewers also liked

Ladder logic tutorial
Ladder logic tutorialLadder logic tutorial
Ladder logic tutorialdas1964
 
Programmable Logic Controller and ladder logic programming
Programmable Logic Controller and ladder logic programmingProgrammable Logic Controller and ladder logic programming
Programmable Logic Controller and ladder logic programmingseema Vishwakarma
 
INDUSTRIAL AUTOMATION USING PLC
INDUSTRIAL AUTOMATION USING PLCINDUSTRIAL AUTOMATION USING PLC
INDUSTRIAL AUTOMATION USING PLCMehvish Mushtaq
 
Plc Siemens Training Notes
Plc Siemens Training NotesPlc Siemens Training Notes
Plc Siemens Training Notesplc_course
 
PLC and SCADA training.
PLC and SCADA training.PLC and SCADA training.
PLC and SCADA training.Ishank Ranjan
 
PLC based Multichannel Automatic Liquid Level Controller
PLC based Multichannel Automatic Liquid Level ControllerPLC based Multichannel Automatic Liquid Level Controller
PLC based Multichannel Automatic Liquid Level ControllerVijay Badgujar
 
Basics of Automation, PLC and SCADA
Basics of Automation, PLC and SCADABasics of Automation, PLC and SCADA
Basics of Automation, PLC and SCADAIndira Kundu
 
MODUL PLC (Programmable Logic Control) DIDIK
MODUL PLC (Programmable Logic Control) DIDIKMODUL PLC (Programmable Logic Control) DIDIK
MODUL PLC (Programmable Logic Control) DIDIKDidik Supriyono
 
Ladder Intro Tutorial
Ladder Intro TutorialLadder Intro Tutorial
Ladder Intro Tutorialplc_course
 
Menggunakan cx programmer
Menggunakan  cx programmerMenggunakan  cx programmer
Menggunakan cx programmerBonanza Pratama
 
automatic mixing & filling bottle using PLC
automatic mixing & filling bottle using PLCautomatic mixing & filling bottle using PLC
automatic mixing & filling bottle using PLCLeelu Veerendra Pulagam
 

Viewers also liked (20)

PLC LADDER DIAGRAM
PLC LADDER DIAGRAMPLC LADDER DIAGRAM
PLC LADDER DIAGRAM
 
Ladder logic tutorial
Ladder logic tutorialLadder logic tutorial
Ladder logic tutorial
 
Programmable Logic Controller and ladder logic programming
Programmable Logic Controller and ladder logic programmingProgrammable Logic Controller and ladder logic programming
Programmable Logic Controller and ladder logic programming
 
INDUSTRIAL AUTOMATION USING PLC
INDUSTRIAL AUTOMATION USING PLCINDUSTRIAL AUTOMATION USING PLC
INDUSTRIAL AUTOMATION USING PLC
 
ppt on PLC
ppt on PLCppt on PLC
ppt on PLC
 
Omron ladder programming
Omron ladder programmingOmron ladder programming
Omron ladder programming
 
Omron plc training
Omron plc trainingOmron plc training
Omron plc training
 
Plc Siemens Training Notes
Plc Siemens Training NotesPlc Siemens Training Notes
Plc Siemens Training Notes
 
PLC and SCADA training.
PLC and SCADA training.PLC and SCADA training.
PLC and SCADA training.
 
PLC based Multichannel Automatic Liquid Level Controller
PLC based Multichannel Automatic Liquid Level ControllerPLC based Multichannel Automatic Liquid Level Controller
PLC based Multichannel Automatic Liquid Level Controller
 
Basics of Automation, PLC and SCADA
Basics of Automation, PLC and SCADABasics of Automation, PLC and SCADA
Basics of Automation, PLC and SCADA
 
Plc tutorial
Plc tutorialPlc tutorial
Plc tutorial
 
MODUL PLC (Programmable Logic Control) DIDIK
MODUL PLC (Programmable Logic Control) DIDIKMODUL PLC (Programmable Logic Control) DIDIK
MODUL PLC (Programmable Logic Control) DIDIK
 
Ladder Intro Tutorial
Ladder Intro TutorialLadder Intro Tutorial
Ladder Intro Tutorial
 
Ladder diagram
Ladder diagramLadder diagram
Ladder diagram
 
Menggunakan cx programmer
Menggunakan  cx programmerMenggunakan  cx programmer
Menggunakan cx programmer
 
Chapter 4 plc
Chapter 4 plcChapter 4 plc
Chapter 4 plc
 
PLC
PLCPLC
PLC
 
automatic mixing & filling bottle using PLC
automatic mixing & filling bottle using PLCautomatic mixing & filling bottle using PLC
automatic mixing & filling bottle using PLC
 
Plc ppt
Plc pptPlc ppt
Plc ppt
 

Similar to Ladder logic fundamentals plc tutorial

Introduction to plc programming
Introduction to plc programmingIntroduction to plc programming
Introduction to plc programmingnddng
 
Plc documentation final
Plc documentation finalPlc documentation final
Plc documentation finalSonu Kumar
 
Introduction to plc (s7)­
Introduction to  plc (s7)­ Introduction to  plc (s7)­
Introduction to plc (s7)­ majitra
 
LEARNING%20ACTIVITY%20Terminology.pptx
LEARNING%20ACTIVITY%20Terminology.pptxLEARNING%20ACTIVITY%20Terminology.pptx
LEARNING%20ACTIVITY%20Terminology.pptxSantiagoHernndez96
 
Embedded Systems Engineering section
Embedded Systems Engineering sectionEmbedded Systems Engineering section
Embedded Systems Engineering sectioneselab
 
Ladder Diagram Languages-Programmable Logic Controller
Ladder Diagram Languages-Programmable Logic ControllerLadder Diagram Languages-Programmable Logic Controller
Ladder Diagram Languages-Programmable Logic ControllerRathana San
 
CAM ladder logic diagram
CAM ladder logic diagramCAM ladder logic diagram
CAM ladder logic diagramMaharshi Soni
 
LTE in a Nutshell: Protocol Architecture
LTE in a Nutshell: Protocol ArchitectureLTE in a Nutshell: Protocol Architecture
LTE in a Nutshell: Protocol ArchitectureFrank Rayal
 
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
 
Basics of plc programming
Basics of plc programmingBasics of plc programming
Basics of plc programmingSergio Barrios
 
Basics of plc_programming
Basics of plc_programmingBasics of plc_programming
Basics of plc_programminghamza239523
 
Intel x86 Architecture
Intel x86 ArchitectureIntel x86 Architecture
Intel x86 ArchitectureChangWoo Min
 

Similar to Ladder logic fundamentals plc tutorial (20)

Unit 4 - PLC.pptx
Unit 4 - PLC.pptxUnit 4 - PLC.pptx
Unit 4 - PLC.pptx
 
Introduction to plc programming
Introduction to plc programmingIntroduction to plc programming
Introduction to plc programming
 
Lect03
Lect03Lect03
Lect03
 
BITTU PPT.pptx
BITTU PPT.pptxBITTU PPT.pptx
BITTU PPT.pptx
 
Plc documentation final
Plc documentation finalPlc documentation final
Plc documentation final
 
Introduction to plc (s7)­
Introduction to  plc (s7)­ Introduction to  plc (s7)­
Introduction to plc (s7)­
 
LEARNING%20ACTIVITY%20Terminology.pptx
LEARNING%20ACTIVITY%20Terminology.pptxLEARNING%20ACTIVITY%20Terminology.pptx
LEARNING%20ACTIVITY%20Terminology.pptx
 
Embedded Systems Engineering section
Embedded Systems Engineering sectionEmbedded Systems Engineering section
Embedded Systems Engineering section
 
Ladder Diagram Languages-Programmable Logic Controller
Ladder Diagram Languages-Programmable Logic ControllerLadder Diagram Languages-Programmable Logic Controller
Ladder Diagram Languages-Programmable Logic Controller
 
CAM ladder logic diagram
CAM ladder logic diagramCAM ladder logic diagram
CAM ladder logic diagram
 
EE6502 Microprocessor and Microcontroller
EE6502   Microprocessor and MicrocontrollerEE6502   Microprocessor and Microcontroller
EE6502 Microprocessor and Microcontroller
 
LTE in a Nutshell: Protocol Architecture
LTE in a Nutshell: Protocol ArchitectureLTE in a Nutshell: Protocol Architecture
LTE in a Nutshell: Protocol Architecture
 
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
 
Basics of plc programming
Basics of plc programmingBasics of plc programming
Basics of plc programming
 
Basics of plc_programming
Basics of plc_programmingBasics of plc_programming
Basics of plc_programming
 
Plc programing
Plc programingPlc programing
Plc programing
 
Hybrid Programmable Forwarding Planes: BoF Session
Hybrid Programmable Forwarding Planes: BoF SessionHybrid Programmable Forwarding Planes: BoF Session
Hybrid Programmable Forwarding Planes: BoF Session
 
Intel x86 Architecture
Intel x86 ArchitectureIntel x86 Architecture
Intel x86 Architecture
 
Modul PLC Programming.pdf
Modul PLC Programming.pdfModul PLC Programming.pdf
Modul PLC Programming.pdf
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 

Recently uploaded

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Recently uploaded (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Ladder logic fundamentals plc tutorial

  • 1. MET 382 1/14/2008 PLC Fundamentals – Ladder Logic Fundamentals MET 382 Controls & Instrumentation for Automation Spring ‘08 T.E. Kostek Topics PLC programming languages Anatomy of a ladder program Logic functions Logical continuity vs. electrical continuity I/O Mapping Mastering examine on and examine off instructions The PLC scanning process 2 Ladder Logic Fundamentals 1
  • 2. MET 382 1/14/2008 PLC Programming Languages In the United States, ladder logic is the most popular g p p method used to program a PLC This course will focus primarily on ladder logic programming Other programming methods include: Function block diagrams (FBDs) Structured text (ST) Instruction List (IL) Sequential function charts (SFCs) 3 Anatomy of a Ladder Program Input Instructions (conditions) Output Instructions (actions) Rung 0 Rung 1 Rung 2 Left power rail Right power rail 4 Ladder Logic Fundamentals 2
  • 3. MET 382 1/14/2008 Anatomy of a Ladder Program (cont’d) Input instructions are entered on the left Output instructions are entered on the right The power rails simulate the power supply lines L1 and L2 for AC circuits and +24 v and ground for DC circuits i it Most PLCs allow more than one output per rung 5 Anatomy of a Ladder Program (cont’d) The processor (or “controller”) scans controller ) ladder rungs from top-to-bottom and from left-to-right. The basic sequence is altered whenever jump or subroutine instructions are executed. 6 Ladder Logic Fundamentals 3
  • 4. MET 382 1/14/2008 Anatomy of a Ladder Program (cont’d) A 3 rung example ladder program 3-rung 7 Anatomy of a Ladder Program (cont’d) Rung Comment Rung Number Description assigned to alias tag Alias tag pointing to base address Base address Input Instruction 8 Ladder Logic Fundamentals 4
  • 5. MET 382 1/14/2008 Logic Functions PLC programming is a logical procedure In a PLC program, “things” (inputs and rungs) are either TRUE or FALSE If the proper input conditions are TRUE: The rung becomes TRUE and an output action occurs (for example, a motor turns on) If the proper input conditions are not TRUE: The rung becomes FALSE and an output action does not occur 9 Logic Functions (cont’d) Ladder logic is based on the following g g logic functions: AND OR Sometimes called “inclusive OR” Exclusive OR 10 Ladder Logic Fundamentals 5
  • 6. MET 382 1/14/2008 Logic Functions - AND Input 1 AND O t t Output Input 2 Logic Input 1 Input 2 Output 0 0 0 0 1 0 0 False 1 0 0 1 True 1 1 1 Contacts ANDed ( ) together 11 Logic Functions - OR Input 1 OR O O t t Output Input 2 Logic Input 1 Input 2 Output 0 0 0 0 1 1 0 False 1 0 1 1 True 1 1 1 Contacts ( ) ORed together 12 Ladder Logic Fundamentals 6
  • 7. MET 382 1/14/2008 Logic Functions - Exclusive OR In addition to ANDing and ORing, the Exclusive OR (XOR) is also useful. When the inputs are DIFFERENT, the XOR t ti t output is true. Input 1 XOR Output Input 2 Logic Input 1 Input 2 Output 0 0 0 0 1 1 0 False 1 0 1 1 True 1 1 0 13 Logic Functions (cont’d) Example 1 – Inputs ANDed together in series Inputs Output Three input instructions ANDed together. All 3 input instructions must be true in order to energize the output 14 Ladder Logic Fundamentals 7
  • 8. MET 382 1/14/2008 Logic Functions (cont’d) Example 2 – Inputs ORed together in parallel Inputs Output Three input instructions ORed together. If any of the 3 input instructions are true the output will be energized 15 Logic Functions (cont’d) Example 3 – A combination of ANDing and ORing 16 Ladder Logic Fundamentals 8
  • 9. MET 382 1/14/2008 Logical Continuity Logical continuity in a ladder rung occurs when there is a continuous path of TRUE conditions from the left power rail to the output instruction(s) When there is logical continuity, the rung becomes true and the output becomes energized 17 Logical Continuity – Example 1 Rung False Rung 0 T F T This input instruction is false This input instruction is true Rung False Rung 1 F Rung T R True Rung 2 F T T T 18 Left power rail Right power rail Ladder Logic Fundamentals 9
  • 10. MET 382 1/14/2008 Logical Continuity – Example 2 Virtual power flow (not actual current flow) Path of logical continuity Rung true due to this branch TRUE conditions are highlighted in green on the programming panels display PLC- PLC-5 Systems 19 Logical Continuity vs. Electrical Continuity Electrical continuity in an input circuit, occurs when there is a complete path for current to flow. A PLC input circuit is a simple series circuit consisting of a: Power supply, Switch, and a Load When there is electrical continuity, a bit in the PLCs memory (sometimes called the input image table) is set to a 1. 20 Ladder Logic Fundamentals 10
  • 11. MET 382 1/14/2008 Electrical Continuity Normally open (N.O.) pushbutton [shown pushed] +24v COM Input Module Input Circuitry 21 Electrical Continuity Power supply is implied + - +24v COM Input Module Input Circuitry Screw terminals Power rail Power rail 22 Ladder Logic Fundamentals 11
  • 12. MET 382 1/14/2008 Logical vs. Electrical Continuity Note: It’s possible to have electrical continuity and not have logical continuity (and vise versa). Control Wiring Diagram: Ladder Program: PB0 - N.O. pushbutton (shown pushed) This instruction is false when the pushbutton is pushed I_PB0 I PB0 ( ) No Logical Continuity Electrical Continuity 23 I/O Mapping Every discrete input is assigned to a specific bit in the PLC’s memory (input image table) If there is electrical continuity, the bit is set to a 1 If there is no electrical continuity, the bit is reset to a 0 Every discrete output is assigned to a specific bit in the PLC’s memory (output image table) PLC s In order for an output to turn on, its associated bit must first be set to a 1 24 Ladder Logic Fundamentals 12
  • 13. MET 382 1/14/2008 PLC Data Table Note: Bit addresses 1 word (16 bits) are given in octal for Input Input Image Table an Allen-Bradley module (only 1 word shown) PLC-5 system input, PB1 16 14 12 10 06 04 02 00 The bits are 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 numbered 0 – 17 17 15 13 11 07 05 03 01 I:XXX/10 Output Image Table output , LT1 (only 1 word shown) R O:XXX/01 16 14 12 10 06 04 02 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 17 15 13 11 07 05 03 01 PLC- PLC-5 Systems Output Module 25 I/O Mapping Output Image Table in RSLogix 5 software Input Image Table in RSLogix 5 software PLC- PLC-5 Systems 26 Ladder Logic Fundamentals 13
  • 14. MET 382 1/14/2008 I/O Mapping Output Image Table in RSLogix 5: O:005 is a 16 bit word address: O:005/07 is the address of a bit which resides in the word O:005 PLC- PLC-5 Systems 27 I/O Mapping 1 word = 16 bits (bits are Input Image Table in RSLogix 5: numbered in octal for a PLC-5) PLC- PLC-5 Systems 28 Ladder Logic Fundamentals 14
  • 15. MET 382 1/14/2008 I/O Mapping ControlLogix tag database: Alias tag Current tag Base address (a pointer to a base address) value (real address) ControlLogix Systems 29 Mastering Examine On & Examine Off Instructions Discrete input devices have normally open (N.O.) and/or normally closed (N.C.) contacts. Example: Pushbuttons can be purchased with either N.O. or N.C. mechanical contacts. “Normally” implies the state of the contacts when you are NOT pushing the button. 30 Ladder Logic Fundamentals 15
  • 16. MET 382 1/14/2008 Mastering Examine On & Examine Off Instructions Normally open (N.O.) vs. normally closed (N.C.) contacts: Contact Resistance between Resistance between Type: contacts when NOT pushed: contacts when pushed: N.O. Infinite ohms Zero ohms N.C. Zero ohms Infinite ohms 31 Mastering Examine On & Examine Off Instructions PLC programs have both normally open and normally closed input instructions. Normally closed input instruction y p Normally open input instruction 32 Ladder Logic Fundamentals 16
  • 17. MET 382 1/14/2008 Mastering Examine On & Examine Off Instructions The Examine On Instruction This input instruction examines the specified bit for a logic 1. If the bit is a 1, the instruction is true, otherwise the instruction is false. This is generally known as a normally open input instruction. 33 Mastering Examine On & Examine Off Instructions The Examine On Instruction This is the address assigned to the instruction (I:007/00). Note: This instruction must be assigned a bit address not a address, word address. This is the instruction PLC- PLC-5 Systems 34 Ladder Logic Fundamentals 17
  • 18. MET 382 1/14/2008 Mastering Examine On & Examine Off Instructions The Examine Off Instruction This input instruction examines the specified bit for a logic 0. If the bit is a 0, the instruction is true, otherwise the instruction is false. This is generally known as a normally closed input instruction. 35 Mastering Examine On & Examine Off Instructions Examine On instructions are also called: XIC, eXamine If Closed Examine Off instructions are also called: XIO, eXamine If Open Note: The terms Examine on, Examine off, Examine if closed (XIC), and Examine if open (XIO) are unique to Allen-Bradley PLCs. 36 Ladder Logic Fundamentals 18
  • 19. MET 382 1/14/2008 Mastering Examine On & Examine Off Instructions Examine On and Examine Off Instructions that are True are highlighted green in the PLC programming software: True False 37 Mastering Examine On & Examine Off Instructions A program can Examine On ( Examine Off) real p g (or ) inputs, real outputs, internal storage bits, timer done bits, etc. Examine ON Examine OFF an Examine ON a real input internal storage bit a real output 38 Ladder Logic Fundamentals 19
  • 20. MET 382 1/14/2008 Mastering Examine On & Examine Off Instructions Input and output field devices are wired to PLC discrete Input/Output (I/O) modules. How the system functions depends on the program! +24 VDC 120 VAC Start Two pushbuttons wired to two PLC inputs PLC uts (N.O.) Inputs s FAN Outpu Stop (N.C.) A fan is wired to a PLC output (Continued on next slide … ) 39 Mastering Examine On & Examine Off Instructions How the system functions depends on the program: The inputs could be programmed as two inputs ANDed together: Or, the inputs could be programmed as two inputs ORed together: In either case, the wiring is the same! The PLC program logically connects the input devices to the output actuators through the PLC 40 program! Ladder Logic Fundamentals 20
  • 21. MET 382 1/14/2008 Mastering Examine On & Examine Off Instructions Input field devices Instructions in the wired to the PLC The PLC Data Table PLC program Electrical Continuity Input Image Table Bit Logical Continuity +24v Start 0 or 1 (N.O.) The bit representing the push Current flows if button is button is: True if the bit is a 1 pressed ON (set to a 1) if there is electrical continuity +24v OFF (reset to a 0) if there is Start NO electrical continuity (N.C.) True if the bit is a 0 Current flows if button is NOT pressed 41 Mastering Examine On & Examine Off Instructions Output field devices Instructions in the wired to the PLC The PLC Data Table PLC program Electrical Continuity Output Image Table Bit Logical Continuity 120 VAC 0 or 1 FAN The bit representing the fan Output turns on when the output is: bit in the output image i th t ti The output image table ON (set to a 1) if there is table is a 1 (voltage is bit is set to a 1 when the logical continuity applied across the output rung is true or is reset to terminals and current flows OFF (reset to a 0) if there is a 0 when the rung is in the output circuit) NO logical continuity false 42 Ladder Logic Fundamentals 21
  • 22. MET 382 1/14/2008 The Scanning Process Scan refers to the continuous and sequential process of: Reading the PLC inputs Executing the ladder program (rung-by-rung) Updating the PLC outputs 43 The Scanning Process The scan sequence can be broken into two functional parts: The Program Scan Scan the ladder program The I/O Update Scan Write outputs, Read inputs 44 Ladder Logic Fundamentals 22
  • 23. MET 382 1/14/2008 The Scanning Process The Program Scan: For each rung executed, the PLC processor will: executed Examine the status of the input image table bits, Solve the ladder logic in order to determine logical continuity (is the rung true?), Update the appropriate output image table bits, if necessary. Note: The output will not actually be energized until the I/O update part of the scan. 45 The Scanning Process The I/O Update Scan: Copy the output image table status to the ALL of the output terminals (discrete output circuits) Power is applied to the output device if it’s output image table bit has been previously set to a 1. Copy the status of ALL of the input terminals to the input image table If an input is active (i.e., there is electrical continuity), the corresponding bit in the input image table will be set to a 1. 46 Ladder Logic Fundamentals 23
  • 24. MET 382 1/14/2008 The Scanning Process Read inputs All input Input Image Terminals Table Solve the ladder program ( ) (update output image table as necessary) [END] Update outputs All output Output Image Terminals Table 47 The Scanning Process In a ladder program, a specific output address (e.g., O:013/02) should NOT be referenced on more than one rung! r ng! This is sometimes called “duplicate coils” Using duplicate coils will cause unpredictable operation and should be avoided When using duplicate coils “the last rung wins” See example on next slide Continued on next slide … 48 Ladder Logic Fundamentals 24
  • 25. MET 382 1/14/2008 Duplicate Coil Example Problem: Rungs 11 and 19 both reference the same output address: Solution: Edit the ladder program as follows: p g Problem corrected, this output is only used once in the entire program 49 The Scanning Process The actual scan time is a function of: The Th speed of the processor module d f th d l The length of the ladder program The type of instructions executed The t l l dd t /f l Th actual ladder true/false conditions ( diti (e.g., jump instructions, subroutines, etc.) 50 Ladder Logic Fundamentals 25
  • 26. MET 382 1/14/2008 The Scanning Process The actual scan time is calculated and stored in the PLCs memory The PLC computes the scan time each time the END instruction is executed Scan time data can be monitored via the PLC programming software (e.g., RSLogix 5) Scan time data is addressable and can therefore be referenced in the PLC program Typical T i l scan ti time d t i l d data includes: The maximum scan time The last scan time 51 The Scanning Process Allen-Bradley PLCs generally have 3 modes of operation: Run Mode When placed in the RUN mode, the processor begins the scanning process as previously described Program Mode When placed in the PROGRAM mode, the processor stops scanning the ladder program and (typically) all the outputs are turned off Test Mode The TEST mode is identical to the RUN mode, except all outputs are disabled (held in their off state) 52 Ladder Logic Fundamentals 26
  • 27. MET 382 1/14/2008 The Scanning Process Most Allen-Bradley processors (controllers) have a 3-position keyswitch: REM (Remote) In the remote mode, the PLC programming software (e.g., RSLogix5000) can be used to place the controller into the remote program mode or the remote run mode. RUN When keyswitch is placed in the RUN mode, the controller is switched into the run mode. The PLC programming software cannot change the controllers mode. PROG (Program) When keyswitch is placed in the PROG mode, the controller is switched into the program mode. The PLC programming software cannot change the controllers mode. 53 Ladder Logic Fundamentals 27