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

timer accumulated time to zero and shift the logic
                   L1    Inputs    LS   Ladder logic program           •  After 3 seconds, the timer done bit is set to reset the
                     Limit switch       BSR               EN              bit 1 to the left to B3:0/1.
                                        BIT SHIFT RIGHT
                              LS        File      #B3:50               •  This causes PL1 to turn off and PL2 to turn on.
                                        Control      R6:1  DN
                      Sensor                                           •  After another 3 seconds, the timer done bit is set
                                        Bit address  Ι:3/5
                                        Length        24                  once again.
                              Ι:3/5                                    •  The BSL instruction shifts the bits to the left
                                                                          once more and causes PL2 to turn off and PL3
                                                                          to turn on.
                       B3: Table - Before limit switch clock pulse     •  The process continues with each of the pilot lights

                       15 14 13 12 11  10 9 8  7 6 5  4  3 2 1 0          turned on in sequence for 3 seconds.
                 B3:50  1  0  1  1   0  0  0 1  1 0 0  1  0 1 1 0       A shift register is often used in material handling pro-
                 B3:51  0  0  0  0   0  0  0 0  1 0 1  1  0 0 1 1
                                                                     cesses where some form of binary information must be
                                                                     synchronized with a moving part on a conveyor.  The
                                                     Unload bit      binary information refers to any two conditions that can
                                                      R6:1/UL  1     be assigned to the moving product—for example, the
                              Shift direction
                 15                                      0           presence or absence of a part. As the part moves along
                  1  0  1  1  0  00  1  1  0 0  1  0  1  1  0  B3:50  the conveyer, some form of sensing device will determine
                         Invalid       1  0  1  1  0  0  1  1  B3:51  which of these two categories the passing product falls
                                      24                             into. Figure 12-27 illustrates cartons traveling on a con-
                                  0                                  veyor being detected by a photoelectric sensor. The sen-
                                     Ι:3/5
                                   Bit address                       sor that drives the data line on a shift register is fixed such
                                                                     that the beam detects the presence or absence of a carton.
                        B3: Table - After limit switch clock pulse   A logic 1 sensor condition state can indicate the presence
                                                                     of a carton, and a 0 the absence.
                       15 14 13 12 11  10 98   76 5  4  3 21 0
                 B3:50  1  1  0  1   1  0  00  11 0  0  1 01 1          The process of Figure 12-28 illustrates a spray-painting
                 B3:51  0  0  0  0   0  0  00  01 0  1  1 00 1       operation controlled by a shift left register. As the parts
                                                                     pass along the production line, the shift register bit pat-
                                                                     terns represent the items on the conveyor hangers to be
                                                     Unload bit      painted. Each file bit location represents a station on the
                                                      R6:1/UL  0
                              Shift direction                        line, and the status of the bit indicates whether or not a
                                                                     part is present at that station.
                  1  1  0  1  1  0 0  0  1  1  0  0  1  0  1  1  B3:50  The program for the spray-painting operation is shown
                         Invalid      0  1  0  1  1  0 0  1  B3:51
                                                                     in Figure  12-29. Its operation can be summarized as
                                      24                             follows:
                                  0
                                     Ι:3/5                             •  Limit switch LS1 is used to detect the hanger and
                                   Bit address
                                                                          limit switch LS2 the part.
               Figure 12-25  Bit shift right (BSR) instruction program.
                                                                       •  The pulse generated by the hanger-operated limit
                                                                          switch LS1 shifts the status of the data provided by
                                                                          part-detection limit switch LS2.

               on-delay timer T4:0. The operation of the program can be   •  The logic of this operation is such that when a part
               summarized as follows:                                     to be painted and a part hanger occur together at
                                                                          station 1 (indicated by simultaneous closing of LS2
                 •  Go to the data tables and set bit addresses B3:0/0,   and by LS1), logic 1 is input into the shift register at
                    B3:0/1, B3:0/2 to logic 0 and bit address R6:0/UL     B3:0/0.
                    to logic 1.                                        •  This causes the SOL 1 rung to be true and the
                 •  When the PLC is then placed in run, bit B3:0/0 is     undercoat spray gun to energize.
                    set to logic 1 causing PL1 to turn on.             •  At station 5, a 1 appears in bit B3:0/5 of the shift
                 •  Closing input switch SW starts timer T4:0             register to make the SOL 2 rung true and topcoat
                    timing.                                               spray gun energize.



               268        Chapter 12  Sequencer and Shift Register Instructions







          pet73842_ch12_252-280.indd   268                                                                              03/11/15   7:20 PM
   282   283   284   285   286   287   288   289   290   291   292