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

ignores the inputs and de-energizes all nonretentive
                                                                                        Ladder logic program
                    outputs (that is, the output energize instruction, the   L1  Inputs  PB          PL1       Outputs  L2
                    on-delay timer, and the off-delay timer).                      1
                 •  All retentive devices, such as latches, retentive tim-   PB
                    ers, and counters, remain in their last state. TOF                Switch        Q2:0    PL1
                    timers will start timing when the MCR goes false.              2                JMP
                 •  Input A of the start rung is false so output A and       Switch                         PL2
                    T4:1 will be false and output B will remain in its                 PB            PL2
                    last state.                                                    3                        PL3
                 •  The input conditions in each rung will have no
                    effect on the output conditions.                                  Q2:0     PB    PL3
                  A common application of an MCR zone control in-                  4   LBL
               volves examining one or more fault bits as part of the start
               fence and enclosing the portion of the program you want
               de-energized in case of a fault in the MCR zone. In case of   Figure 9-6  Jump (JMP) operation.
               a detected fault condition, the outputs in that zone would
               be de-energized automatically.
                  If you start instructions such as timers or counters
               in an MCR zone, instruction operation ceases when        Some manufacturers provide a skip instruction, which
               the zone is disabled. The TOF timer will activate when   is essentially the same as the jump instruction.
               placed inside a false MCR zone. When troubleshooting     The program of Figure 9-6 illustrates the use of a jump
               a program that contains an MCR zone, you need to be   instruction in conjunction with Allen-Bradley SLC 500
               aware of which rungs are within zones in order to cor-  programmable controllers. In this example,  Addresses
               rectly edit the circuit.                              Q2:0 through Q2:255 are the addresses used for the jump
                  MCR-controlled areas must contain only two MCR     (JMP) instructions. The Q2 is internal and provided by
               instructions—one to define the start and one to define the   the software as you program the JMP instruction. The Q2
               end. Never overlap or nest MCR zones. Any additional   simply identifies this as ladder file 2. A JMP instruction in
               MCR instructions, or a jump instruction programmed    ladder file 3 would be Q3. The label (LBL) instruction is
               to jump to an MCR zone, could produce unexpected      a target for the jump instruction.
               and damaging results to your program and to machine     •  The jump instruction with its associated label in-
               operation.                                                 struction (LBL) must have the same address.
                  In addition to controlling power to an entire system,   •  The area of the program that the processor jumps
               MCRs are also used when only a portion of a program is     over is defined by the locations of the jump and
               required to be isolated. For example:                      label instructions in the program.
                 •  Inhibiting zones of the program while loading recipes.  •  When the jump instruction is true, all logic between the
                 •  Monitoring emergency stops.                           jump and label instructions is bypassed and the proces-
                 •  Establishing preconditions to synchronize a ma-       sor continues scanning after the LBL instruction.
                    chine on start-up.                                 •  The label instruction must be programmed as the
                                                                          first instruction on the rung where it resides.
               9.3  Jump Instruction                                   •  The label instruction is always true, and the remain-
               In PLC programming it is sometimes desirable to be able    ing instructions on the rung must make up a verifi-
               to jump over certain program instructions when certain     able rung.
               conditions exist. The jump (JMP) instruction is an output   •  The instructions to the right of the LBL on the label
               instruction used for this purpose. When the jump instruc-  rung are outside the jump zone and as such are not
               tion is used, the PLC will not execute the instructions of a   affected by the jump.
               rung that is jumped. The jump instruction is often used to   The operation of the program can be summarized as
               jump over instructions not pertinent to the machine’s op-  follows:
               eration at that instant. In addition, sections of a program
               may be programmed to be jumped should a production      •  When the switch is open the jump instruction is not
               fault occur.                                               activated.



               188        Chapter 9  Program Control Instructions







          pet73842_ch09_184-206.indd   188                                                                              03/11/15   4:01 PM
   202   203   204   205   206   207   208   209   210   211   212