When using system.tag.queryTagHistory, I have NULL as value until there is a change for that tag.
How can I get the initial value of each tag at start time?
In the picture, before Mode changes to MODE_AUTOMATIC it was probably at MODE_MANUAL, but I cannot see it.
It should be as simple as ‘return the closest value recorded before start time’.
Or is there a function to get the a value at a specific time in history, instead of using a date range?
There is Tag History Bindings in Perspective, it seems to work as expected if I ask for one data point per tag with a narrow date range. But I don’t know how to do the same in script.
When testing if I can get the last value in history for a specific time, I used a Tag History Binding in Perspective with a time range of zero (same Start Date and End Date) and 1 as Point Count.
About the script calling system.tag.queryTagHistory with NULL value until there is a tag change; the default range is 1 hours customisable by the user.