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

Inputs                 Ladder logic program                Outputs
                                                            Main program file 2
                                                     S1                          PL1                   L2
                              L1
                                             1
                                                                                            PL1
                                       S1
                                                     S2        JSR
                                       S2    2                 JUMP-TO-SUBROUTINE           PL2
                                                               SBR file number    U:3
                                       S3            S3                          20
                                             3                                  JMP         PL3
                                       S4
                                                     S4                          PL6
                                             4                                              PL4
                                       S5
                                                     S9                          20
                                       S6    5                                  JMP
                                                                                            PL5
                                                     S8                         PL2
                                       S7
                                             6
                                                                                            PL6
                                       S8            S10                         20
                                             7                                  JMP
                                       S9
                                                     S11
                                                                                PL4
                                             8
                                       S10
                                                               RTO
                                                  20     S7    RETENTIVE TIMER ON   EN
                                       S11                     Timer         T4:3
                                             9    LBL          Time base (sec)  1.0  DN
                                                               Preset          50
                                       S12                     Accumulated     0
                                                   T4:3/DN
                                                                                 T4:3
                                       S13  10                                   RES
                                                            Subroutine file 3
                                                                 S13            PL3
                                                  SBR
                                            11    SUBROUTINE

                                                    S12                          12
                                            12                                  JMP

                                                    S5                          PL5
                                            13

                                                    12      S6   TON
                                            14      LBL          TIMER ON DELAY     EN
                                                                 Timer      T4:6
                                                                 Time base    1.0
                                                                 Preset        5    DN
                                                                 Accumulated   0
                                                                       RET
                                            15                         RETURN


                              Figure 9-32  Program for Problem 4.











               206        Chapter 9  Program Control Instructions







          pet73842_ch09_184-206.indd   206                                                                              03/11/15   4:01 PM
   220   221   222   223   224   225   226   227   228   229   230