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

Output
                                 L1    Inputs                   Ladder logic program           Module O:2  L2
                                                      S1      SQO
                                                              SEQUENCER OUTPUT                    0
                                                              File             #B3:0    EN         1
                                                              Mask              F0FF              2
                                              S1                                        DN
                                                      S2      Dest               O:2              3
                                                              Control           R6:0              4
                                                              Length              8               5
                                                              Position            2
                                              S2                                                  6
                                                                                                   7
                                                                                                  8
                                                                                                  9
                                                                                                  10
                                         S1           S2                                          11
                                                                                                  12
                                                                                                  13
                                       Field triggered input events
                                                                                                  14
                                                                                                  15
                                             15     11 10 98            0 Destination
                                             0000          0000 11 11     O:2            Current step  Pos 2


                                             1111 0000 1111 11 11         Mask

                                          Pos                             File
                                           0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  #B3:0
                                           1 0 0 1 1 0 0 0 0 0 0 1 1 0 0 1 1
                                        Pos  2 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
                                           3 1 1 0 0 0 0 0 0 1 1 0 0 1 1 0 0
                                           4 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
                                           5 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0
                                           6 0 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1
                                           7 0 0 0 1 0 0 0 0 0 0 0 1 1 1 1 1
                                           8 0 1 0 1 0 0 0 0 0 1 0 1 0 1 0 1
                                 Figure 12-18  Event-driven sequencer output program.



                   are identical to the data stored in the sequencer file, the   •  The mask (F000h) allows unused bits of the
                   control found bit is set to 1.                            sequencer instruction to be used independently.
                     An example of an SLC 500 sequencer compare (SQC)        In this example, unused bit I:1/0 is used for the
                   instruction program is shown in Figure 12-19. The opera-  conditional input of the sequencer compare
                   tion of the program can be summarized as follows:         rung.
                     •  The data in the highest 4 bits of the source (I:1)   The sequencer load (SQL) instruction is used to read
                       are compared to the data in file #B3:22.          the  PLC input  module  and  store  the  input  data in  the
                     •  In this example, the highest 4 bits in I:1 match   sequencer file. Loading input conditions for a large num-
                       the status of the highest 4 bits in B3:25 at step   ber of process steps is prone to errors. In such instances
                       position 3.                                       the sequencer load instruction can be used to load data
                     •  If the pushbutton input I:1/0 is true at this point,   into a sequencer file one step at a time. For example, a
                       the found (FD) bit is set, which turns output     robot may be jogged manually through its sequence of
                       PL1 on.                                           operation, with its input devices read at each step. At
                     •  Whenever the combination of opened and closed    each step, the status of the input devices is written to
                       switches connected to I:1/12, I:1/13, I:1/14, and   the data file in the sequencer compare instruction. As a
                       I:1/15 is equal to the combination of 1s and 0s   result, the file is loaded with the desired input status at
                       on a step in the sequencer reference file and the   each step, and these data are then used for comparison
                       input I:1/0 is true, the PL1 output will become   with the input devices when the machine is run in auto-
                       energized.                                        matic mode.



                                                                     Sequencer and Shift Register Instructions  Chapter 12  263







          pet73842_ch12_252-280.indd   263                                                                              03/11/15   7:20 PM
   277   278   279   280   281   282   283   284   285   286   287