Author: HCA Central Version: 1 Added to Library: 11-Nov-23 HCAVersion needed: 17 Keywords: Utility Requirements: Uses the ElapsedTimeImage program available in the library. Import that first!
Package Description: Keeps track of the total time a device is ON for today and for yesterday
Program Description: Add the "Track Time" tag - with no value, to any device you want to create an "on time today" accumulator.
Schedule the program with a "Generic ON" at midnight - or whenever you want to - to move accumulated time for today into the "Time Yesterday" tag
If you want, create a program that runs on design loading and then does a Start-Program on this program with a "Generic OFF" trigger to clear the time accumulators.
The tags "Time Today" and "Time Yesterday" are of the form #seconds, elapsed time image.
If you want to use this data in another program you can easily extract out the number of seconds from the tag and use that as data. The image is for ease of display
NOTE: This program requires the ElapsedTimeImage program available in the Library. If you don't have it loaded or it is a different folder than expected, the Start-Program element in this program will be invalid. To resolve do this:
1. First import ElapsedTimeImage from the library
2. Change the Start-Program element in this program to select "ElapsedTimeImage", set then two parameters as this. Please enter exactly as shown
TimeMark: %timeMark%
With Seconds: yes
Change the result return dropdown to select [elapsedImage]
Parameters:
Name | Type | Description | Default |
---|---|---|---|
Device | Object | Any device you want to keep track of ON time for, The state-change triggering object. |