Relay Timers are used to automatically control relays for applications that might require failsafe control. For instance, controlling a relay using a standard relay control command may prove dangerous. Instead, timers can be used to explicitly specify the duration of time a relay should be activated. Using relay timer commands, users may tell a relay to turn on for 5 minutes. Should the computer fail to communicate with the controller after 5 minutes, the relay will automatically shut off. To extend this analogy, users may repeatedly tell a relay to turn on for 30 seconds. The relay will stay on as long as the
The following commands will set and activate a timer. Relay Timers offer even deeper functionality, as they may also be paused or resumed at any time. Similarly, relay timers may be set, but not activated until a later time. Reading the status and remaining time of timers is also possible using the timer command set. The following example commands demonstrate various timer features:
The commands below set the active status of all 16 timers. Timers are either active or inactive, in other words, they are running (counting down), or they are paused (not counting down). LSB and MSB are 16-bit binary values used to define the active state of each of the 16 timers. When a specific timer is set active, all other timers are set as inactive. When working with the above commands, make sure you always take into account that any bits not set will deactivate the associated timer, and may inadvertently deactivate any timers that may be running. It’s also important
The commands below demonstrate how to query a timer. Using query commands, users may ask the controller the amount of time remaining for each timer. Timers always count down in one second intervals, so each second, the received value will change for all active timers. A timer query command will return 4 parameters: Remaining Hours (H), Minutes (M), Seconds (S), and the Relay (R) associated with the timer.
As mentioned earlier, relay timers are simulated in firmware, operating as a background process called by a timer interrupt. ProXR controllers use an external system clock to maintain a 3% timing accuracy, not to be confused with a real time clock (RTC). Since relay timers are derived from the system clock, it would stand to reason that relay timers maintain a 3% accuracy as well. However, the CPU that powers ProXR controllers handles many interrupts on a priority basis, which can further deviate the accuracy to the timers. ProXR relay timers are best suited for applications that do not require precise