Page 315 - Programmable Logic Controllers, Fifth Edition - Mobile version
P. 315

JMP  LBL  JSR  RET  SBR  TND  MCR  SUS                JMP  LBL  JSR  RET  SBR  TND  MCR  SUS

                         Program Control  Ascii Control  Ascii String  Micro   Program Control  Ascii Control  Ascii String  Micro

                      Inputs              Main program                L1
                  L1                                                                                       Main program
                                                                          Inputs   Trapped input conditions
                                                                                     A     B      C     SUS
                          SW                                                   A
                                                                                                        Suspend
                                SW       Temporary end                         B                        Suspend ID  100
                                                          TND
                                                                               C
                                     Reminder of main program
                                                                     Figure 13-27  SUS (suspend) diagnostic instruction.

                                                                       •  All ladder logic outputs are de-energized, but other
               Figure 13-26  TND (temporary end) diagnostic instruction.
                                                                          status files have the data present when the suspend
                                                                          instruction was executed.
               operation of this output instruction can be summarized as
               follows:                                                 Most PLC system faults occur in the field wiring and
                                                                     devices. The wiring between the field devices and the ter-
                 •  The instruction operates only when its rung condi-  minals of the I/O modules is a likely place for problems
                    tions are true and stops the processor from scanning   to occur. Faulty wiring and mechanical connection prob-
                    any logic beyond the TND instruction.            lems can interrupt or short the signals sent to and from
                 •  When the processor encounters a true TND rung,   the I/O modules.
                    it resets the watchdog timer (to 0), performs an I/O   The sensors and actuators connected to the I/O of the
                    update, and begins running the ladder program at   process can also fail. Mechanical switches can wear out
                    the first instruction in the main program.       or be damaged during normal operation. Motors, heaters,
                 •  If the TND rung is false, the processor continues   lights, and sensors can also fail. Input and output field
                    the scan until the next TND instruction or the END   devices must be compatible with the I/O module to ensure
                    statement.                                       proper operation.
                 •  By inserting the TND instruction at different loca-  When an instruction does not seem to be working cor-
                    tions in the program you can test parts of the program   rectly, the problem may be an addressing conflict caused
                    sequentially until the entire program has been tested.  by the same address being used for two or more coil in-
                 •  Once the troubleshooting process has been com-   structions in the same program. As a result, multiple rung
                    pleted, any remaining TND instructions are re-   conditions can control the same output coil, making trou-
                    moved from the program.                          bleshooting more difficult. In the case of duplicate out-
                                                                     puts, the monitored rung may be true; but if a rung farther
                  The suspend (SUS) instruction, shown in Figure 13-27,   down in the ladder diagram is false, the PLC will keep the
               is used to trap and identify specific conditions for program   output off. The program of Figure 13-28 illustrates what
               debugging and system troubleshooting. The operation of
               this output instruction can be summarized as follows:       Inputs       Ladder logic program  Output

                 •  When the rung is true, this instruction places the   L1            I:1/1        O:2/1             L2
                    controller in the suspend or idle mode.                     I:1/1
                 •  The suspend ID, in this case 100, must be selected                                            PL
                    by the programmer and entered in the instruction.                          Same address  O:2/1
                 •  When the SUS instruction executes, the ID number                   I:1/2                     (OFF)
                    100 is written in word 7 (S:7) of the status file.          I:1/2
                 •  If multiple suspend instructions are present, then                              O:2/1
                    this will indicate which SUS instruction was active.
                 •  The suspend file (program or subroutine number
                    identifying where the executed SUS instruction re-  Figure 13-28  Program with the same address used for
                    sides) is placed in word 8 (S:8) of the status file.  two coils.



               296        Chapter 13  PLC Installation Practices, Editing, and Troubleshooting







          pet73842_ch13_281-304.indd   296                                                                              03/11/15   7:23 PM
   310   311   312   313   314   315   316   317   318   319   320