Internet PLC Forum

General => Technical support => Topic started by: MarkWater on June 03, 2014, 02:54:20 PM

Title: Timers Showing -1
Post by: MarkWater on June 03, 2014, 02:54:20 PM
When my timer is inactive, or completed it shows a -1 on my HMI. Is there a way to replace this with a 0?
Title: Re:Timers Showing -1
Post by: support on June 03, 2014, 03:29:16 PM
Internally the timer present-value uses -1 to indicate to the CPU that it is inactive. If the timer-present value is zero it could also mean time-out which may not be your intention?

If you don't reset the timer, but simply assign it a new PV and clear its contact whenever you want to restart the timer then it will count down to zero from the new value and will never become -1 (except after power on reset).

E.g.   CLRIO Timer1    ' assuming timer is named Timer1
         TIMERPV[1] = 50   ' start a 5 second count down.