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

Pump
                                                                                           Low
               L1    Inputs           Program           Output  L2                running  level  High
                                                                                                  level
                   ON
                                I:1/0       O:2/5                                   G       R      Y
                         I:1/0       Latch    L            PL
                                      rung          O:2/5
                   OFF                                                     ON/OFF                     High sensor switch
                                I:1/1       O:2/5
                          I:1/1               U
                                     Unlatch
                                      rung
                        15 14 13 12 11 10 98 76 54 32 10
                    O:2/
                                                                         MAN/AUTO                      Low sensor switch
                                           Status bit
               Figure 6-55  Output latch and output unlatch operation.




                 •  The status bit will remain set to 1 when the pushbut-                        Pump motor
                    ton is released and logical continuity of the latch   Figure 6-56  Process used to control the level of water in a
                    rung is lost.                                    storage tank.
                 •  When the off pushbutton (I:1/1) is momentarily ac-
                    tuated, the unlatch rung becomes true and the latch   Status Indicating Lights—Water pump running light
                    status bit (O:2/5) is reset back to 0 and so the light   (green)
                    is switched off.                                       - Low water level status light (red)
                 •  The status bit will remain reset to 0 when the push-    - High water level status light (yellow)
                    button is released and logical continuity of the latch   Figure 6-57 shows a program that can be used to imple-
                    rung is lost.                                    ment control of the water level in the storage tank. The
                  Output latch is an output instruction with a bit-level   latch and unlatch instructions form part of the program.
               address. When the instruction is true, it sets a bit in the   The operation of the program can be summarized as
               output image file. It is a retentive instruction because the   follows:
               bit remains set when the latch instruction goes false. In   •  An internal storage bit is used for the latch and ad-
               most applications it is used with an unlatch instruction.   dress rather than an actual discrete output address.
               The output unlatch instruction is also an output instruc-  Both have the same addresses.
               tion with a bit-level address. When the instruction is true,   •  The rung 1 Examine-on instruction addressed
               it resets a bit in the output image file. It, too, is a retentive   to the off/on switch prevents the pump motor
               instruction because the bit remains reset when the instruc-  from starting under any condition when in the off
               tion goes false.                                           (open) state.
                  The process shown in Figure 6-56 is to be used to con-  •  In the MAN mode, the rung 1 Examine-on instruc-
               trol the level of water in a storage tank by turning a dis-  tion addressed to the low sensor switch allows the
               charge pump on or off. The modes of operation are to be    pump motor to operate only when the low level sen-
               programmed as follows:
                                                                          sor switch is closed.
                  OFF Position—The water pump will stop if it is run-  •  In the AUTO mode, whenever the high sensor
                  ning and will not start if it is stopped.               switch is momentarily closed the Examine-on in-
                  Manual Mode—The pump will start if the water in         struction of rung 1 addressed to it will energize the
                  the tank is at any level except low.                    latch coil. The pump will begin running and con-
                  Automatic Mode—If the level of water in the tank        tinue to operate until the unlatch coil is energized by
                  reaches a high point, the water pump will start so that   the rung 3 Examine-off instruction addressed to the
                  water can be removed from the tank, thus lowering       low sensor switch.
                  the level.                                           •  The pump running status light is controlled by the
                     - When the water level reaches a low point, the pump   rung 4 Examine-on instruction addressed to the
                    will stop.                                            motor output.



               118        Chapter 6  Developing Fundamental PLC Wiring Diagrams and Ladder Logic Programs







          pet73842_ch06_098-130.indd   118                                                                              05/11/15   4:20 PM
   132   133   134   135   136   137   138   139   140   141   142