Chapter 4. Ladder Diagram (LD) Programming228 PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual GFK-2950C4.13.3 Standard Timer Function BlocksThe standard timers are a pulse timer (TP), an on-delay timer (TON), and an off-delay timer (TOF).The pulse timer block can be used to generate output pulses of a given duration. The on-delay timercan be used to delay setting an output ON for a fixed period after an input is set ON. The off-delaytimer can be used to delay setting an output OFF for a fixed period after an input goes OFF so thatthe output is held on for a given period longer than the input.Notes: Any block type can contain calls to the standard timers. (See Chapter 2 for a discussion of thevarious block types.) Interrupt blocks can contain standard timers. An instance of a timer can be passed by reference to a parameterized block or UDFB. When the timer stops timing as a result of reaching its Preset Time (PT), the Elapsed Time (ET)contains the actual timer duration. For example, if the Preset Time was specified as 333ms, butthe timer actually timed to 350ms, the 350ms value is saved in ET.Data Required for Standard Timer Function BlocksEach invocation of a timer has associated instance data that persists from one execution of thetimer to the next. Instance variables are automatically located in symbolic memory. (You cannotspecify an address.) You can specify a stored value for each element. The user logic cannot modifythe values.Each timer instance variable has the following structure. Elements of a timer structure cannot bepublished.The instance data type for each timer must be the same as the timer type:The TOF timer requires an instance variable of type TOF.The TON timer requires an instance variable of type TON.The TP timer requires an instance variable of type TP.Element Type Description DetailsIN BOOL Timer input Cannot be accessed in user logic.PT DINT Preset time Cannot be accessed in user logic.ET DINT Elapsed time Read only. Accessible in user logic.Q BOOL Set ON when timer finishes timing Read only. Accessible in user logic.ENO BOOL Enable output Read only. Accessible in user logic.TI BOOL Set ON when the timer instance is timing(that is, ET is incrementing).Read only. Accessible in user logic.Resetting the TimerThe preset time (PT) may be changed while the timer is timing to affect the duration.When the timer reaches PT, the timer stops timing and the elapsed time parameter (ET) contains theactual timer duration.To reset the timer function block, set the PT input to 0. When the function block resets:▪ ET is set to 0▪ Q is set to off (0)▪ The TI element is set to 0▪ The IN parameter is ignored