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

Timer_Sw    Ladder logic
                                                      <Local:1:I.Data.6>
                                                                    TON
                                                                    Timer On Delay    EN
                                                                    Timer  Status_Timer
                                                                    Preset    10000   DN
                                                                    Accum         0               Outputs L2

                                                                                  EN_PL       EN_PL
                                                       Status_Timer.EN        <Local:2:O.Data.1>
                                    L1
                                            Input                                             TT_PL
                                                                                  TT_PL
                                                       Status_Timer.TT        <Local:2:O.Data.2>
                                            Timer_Sw
                                                                                             DN_PL
                                                                                  DN_PL
                                                       Status_Timer.DN        <Local:2:O.Data.3>



                                                                 FBD equivalent
                                                                   TONR_01
                                                                    TONR     ...
                                                              Timer On Delay with Reset
                                                      0                          0
                                             Timer_Sw         TimerEnable   ACC       ACC_Value
                                                         10000                   0
                                                  10000       PRE            EN           EN_PL
                                                                                 0
                                                                             TT              TT_PL
                                                              Reset              0
                                                                             DN                   DN_PL
                                    Figure 15-110  Comparison between ladder logic and the FBD equivalent for a
                                    10 second TON and TONR timer.

                     •  When the Motor_Stop button is opened the output    •  Opening the Timer_Sw resets all outputs as well as
                       of the BAND block turns false to de-energize the      the accumulated value to zero.
                       contactor coil and stop the motor.                  •  The timer can also be reset by way of the Reset
                                                                             input.
                     Figure 15-110 shows a comparison between ladder
                   logic and the FBD equivalent for the 10 second TON (on-  Figure 15-111 shows a comparison between ladder logic
                   delay timer) and TONR (on-delay with reset). The opera-  and the FBD equivalent for the Up/Down counter used to
                   tion of the FBD can be summarized as follows:         limit the number of parts stored in a buffer zone to 50. The
                                                                         operation of the FBD can be summarized as follows:
                     •  When the Timer_Sw is closed, the TONR func-
                       tion block timer turns true and starts accumulating   •  The CTUD up/down counter function block accu-
                       time.                                                 mulated value is initially reset by momentary actua-
                     •  The accumulated time is monitored by the output      tion of the Restart_Button.
                       reference tag named ACC.                            •  The accumulated count is monitored by the output
                     •  The EN (enable bit) output changes to 1 to turn on   reference tag named ACC.
                       the EN_PL.                                          •  Each time a part enters the buffer zone, the Enter_
                     •  The TT (timer timing bit) output changes to 1 to     Limit_Sw is actuated and the CUEnable input turns
                       turn on the TT_PL.                                    true to increment the count by 1.
                     •  The timer times out after 10 seconds to set the DN   •  Each time a part exits the buffer zone, the Exit_
                       (done bit) to 1 and turn on the DN_PL and reset the   Limit_Sw is actuated and the CDEnable input turns
                       TT bit to zero and turn off the TT_PL.                true to decrement the count by 1.
                     •  The EN bit and EN_PL remain on as long as the      •  Whenever the number of parts in the buffer zone
                       Timer_Sw stays toggled closed.                        reaches 50 the DN bit is set to 1 and the output of




                                                                                   Function Block Programming  Part 6   391







          pet73842_ch15_333-394.indd   391                                                                              03/11/15   7:34 PM
   405   406   407   408   409   410   411   412   413   414   415