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

O:2/0  N/S   E/W  O:2/3     N/S    E/W
                                                       O:2/1            O:2/4
                                                       O:2/2            O:2/5
                                                               Step 1                 Step 2
                                                            N/S     E/W            N/S    E/W







                                                               Step 3                 Step 4

                                               15  14  13  12  11  10  9  8  7  6  5   4  3   2  1   0
                                 Output
                                  word    O:2  0   0  0   0   0  0   0  0   0   0  0   0  0   0   0  0
                                                                                                        Positions
                                          B3:0  0  0  0   0   0  0   0  0   0   0  0   0  0   0   0  0  Start
                                          B3:1  0  0  0   0   0  0   0  0   0   0  1   0  0   0   0  1  Step 1
                                 Sequencer
                                    file   B3:2  0  0  0   0   0  0   0  0   0   0  0   1  0   0   0  1  Step 2
                                          B3:3  0  0  0   0   0  0   0  0   0   0  0   0  1   1   0  0  Step 3
                                          B3:4  0  0  0   0   0  0   0  0   0   0  0   0  1   0   1  0  Step 4

                                Figure 12-8  Four-step sequencer.


                     •  The arrows in the figure indicate the unmasked bits   •  The position of the sequencer instruction is incre-
                       that are passed through the mask and into the desti-  mented by one for each false-to-true transition of
                       nation address.                                       the sequencer rung.
                     •  The dashes in the bits of the designation address   •  Whenever PB is momentarily closed, the
                       indicate that those bits remain unchanged in the des-  sequencer is both enabled and advanced to
                       ignation location during the sequencing.              the next position.
                     •  These unchanged bits therefore can be used inde-   •  When the sequencer is at step 1, the binary informa-
                       pendently of the sequencer.                           tion in word B3:1 (100001) of the sequencer file is
                                                                             transferred into word O:2 of the output.
                     The  sequencer  output  instruction  requires  preceding
                   logic on the rung where it is located. When this logic goes   •  As a result output O:2/0 and O:2/5 will be on and
                   from false to true, it triggers the sequencer to perform its   all the rest will be off.
                   functions. Only when the logic preceding the sequencer   •  Advancing the sequencer to step 2 will transfer the
                   instruction makes the transition from false to true will it   data from word B3:2 (010001) into word O:2.
                   go through its functions of reading the data file, applying   •  As a result output O:2/0 and O:2/4 will be on and
                   the mask, and transferring the masked data file to the out-  all the rest will be off.
                   put destination. After this cycle, it waits for another false-  •  Advancing the sequencer to step 3 will transfer the
                   to-true occurrence of the preceding logic to increment to   data from word B3:3 (001100) into word O:2.
                   the next step.                                          •  As a result output O:2/2 and O:2/3 will be on and
                     Figure 12-10 illustrates how the sequencer moves data   all the rest will be off.
                   from a file to an output. The operation of the logic rung   •  Advancing the sequencer to step 4 will transfer the
                   can be summarized as follows:                             data from word B3:4 (001010) into word O:2.
                     •  Pushbutton PB is used to send false-to-true trigger   •  As a result output O:2/1 and O:2/3 will be on and
                       signals to the sequencer output instruction.          all the rest will be off.



                                                                     Sequencer and Shift Register Instructions  Chapter 12  257







          pet73842_ch12_252-280.indd   257                                                                              03/11/15   7:19 PM
   271   272   273   274   275   276   277   278   279   280   281