Home Automation FAQ
Sponsored by Creative Control Concepts
Prev 5 | Prev | List | Next | Next 5
[Search] [Appearance] [Show Expert Edit Commands]
(Answer) (Category) Home Automation FAQ : (Category) HA Equipment : (Category) Creative Control Concepts/HCS-II : (Category) XPRESS Control Language :
My minute timer only took 30 seconds?
XPRESS has 2 types of timers available to it: second timers and minute timers. These timers increment in sync with the realtime clock of the HCS-II.

The timers increment each time their corresponding realtime clock value changes. Thus, if you start a minute timer 20 seconds into a realtime minute, the timer will increment to one (ie one minute) after only 40 seconds when the RTC minute register changes. Thus a minute timer can have a maximum error of 59 seconds!

This is not a big concern, however. Second timers can count up to 32,768 (so can minute timers) since they each have 16-bit registers. (You might think 65,536 but XPRESS limits integers to 32,768) Thus, if you need a highly accurate minute timer, use a second timer which will have a max error of one second. Need to time 5 minutes? Use a second timer for 300 seconds and you will get a MUCH better result.

Minute timers were intended to be used for long duration timers (hours) where a one minute error is not critical.

ans-ins-part
Append to This Answer
Previous: (Answer) Displaying Time variables
This document is: http://www.automationfaq.com/cgi-bin/fom?file=319
[Search] [Appearance] [Show Expert Edit Commands]
This is a Faq-O-Matic 2.721.
This FAQ administered by Mike Baptiste