2. Programming Concepts executed, the timer coil will be ON when the current value reaches its preset value. When X0 = ON, TMR instruction is driven. When current value achieves K100, the assocailte timer contact T0 is ON to drive Y0. If X0 = OFFor the power is off, the current value in T0 will be cleared as 0 and output Y0 driven by contact T0 will be OFF. X0 T0 Y0 10 sec X0 present value K100 T0 Accumulative Timer The timer executes once when the program reaches END instruction. When TMR instruction is executed, the timer coil will be ON when the current value reaches its preset value. For accumulative timers, current value will not be cleared when timing is interrupted.
Timer T250 will be driven when X0 = ON. When X0 = OFFor the power is off, timer T250 will pause and retain the current value. When X0 is ON again, T250 resumes timing from where it was paused. T1 T2 T1+T2=10sec T250 present value Timers for Subroutines and Interrupts Timers for subroutines and interrupts count once when END instruction is met. The associated output coils will be ON if the set value is achieved when End instruction executes. T184~T199 are the only timers that can be used in subroutines or interrupts. Generals timers used in subroutines and interrupts will not work if the subroutines or interrupts are not executing.
Y0 2.11 C (Counter) Counters will increment their present count value when input signals are triggered from OFF ON. 2-25 TMR T0 K100 Y0 TMR T250 K100 T2 Y0 0 16 bits counters 32 bits counters Type General General High speed Counters C0~C199 C200~C231(C232) C232(C233)~C242, C245~C254 C243, C244 Count direction Count up Count up/down Count up Range 0~32,767 -2,147,483,648~+2,147,483,647 0~2,147,483,647 Preset value register Constant K or data register D (Word) Constant K or data register D (Dword) Output Counter will Counter will keep on counting when preset Counter will keep on