Hi,
How to get from historian the initial value of a tag at startTime and changes 'as stored' up to endTime?
In a single line of code if possible.
Thanks
Hi,
How to get from historian the initial value of a tag at startTime and changes 'as stored' up to endTime?
In a single line of code if possible.
Thanks
Perhaps using something like
For exemple, I have a tag that has a value of 2 since 1st of september.
If I call queryRawPoints, and ask for values between yesterday and today. I get 0 for the value.
I tried setting to true includeBounds.. no changes
So the only way I see, is to call queryAggregatedPoints (with a 1 sec diff) and then call queryRawPoints for the range I’m checking.
Am I missing something?
Are you getting a different value from calling queryAggregatePoints?
Share your tag's historical configuration. Also, show an example of the code you are using when getting 0 as a result from queryRawPoints.
how to get the initial value of PGM_AUDIT_0 and PGM_AUDIT_1?
(without making multiple call to api)
What I do understand, is that queryRawPoints, will give me the historian transactions that happen in the range I’m asking and not give me the way the tag evolved during the time range.
There's no magic wand. You have to query before your time range to get that starting value.
If you reliably set a max time between samples in your tag config, then that's how far back before your desired start you need to ensure you get enough samples.
If you only want to use one query, then you need to post process the result to
Sorry.
It’s okay, I was wondering if I did not understood something right.
Would it be a good idea to have the API do this for us?
I imagine it’s something that everyone has to do frequently.
Thank you Phil