EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-01-29 04:29 PM . Last Modified: 2023-05-03 12:18 AM
So the 'Max' and 'Min' historic aggregates have a 'Max Last' and 'Min Last' version where if the sample period only contains a single value, the aggregate will also grab the last preceding value before the sample period.
Is there an equivalent way to do a 'Start Last' for the 'Start' historic aggregate, i.e. if the sample period only contains one single value, don't grab that single value as your 'Start' but look at the immediate preceding value before the sample period?
I'm trying to implement a Delta calculation and this is tripping me up because the aggregate will return a 0 if the sample period only has a single value but there is no option to tell it to look for the last preceding value. The latter option would be very useful for doing delta calculations on points that have infrequent sampling.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-01-29 08:21 PM
'Start' is not a historic aggregate, neither is 'Runtime' if you have that also. These are 'Historic Algorithms' 😉
And both 'Start' and 'Runtime' are custom Historic Algorithms, meaning that they do NOT ship by default with ClearSCADA (or Geo SCADA Expert).
You (or someone else) has had to go into the Server Configuration utility, and go to Database Configuration -> Historic Algorithms and create these. This means there are some limitations to their configuration which don't exist with the built-in algorithms (since obviously Aveva have access to all the magic in the backend when they are coding up the built-in algorithms).
I think that you're potentially out of luck on this. But it's probably worth raising a feature request to get the 'at end' and 'at start' additions to custom Historic Algorithms. Although I suspect that even if they are implemented, it wouldn't be within the timeframe that you need.
If your interval time isn't dynamic then you could map your starts into Calculation Points, and then use 'Value at end of the interval' and 'Value at start of the interval' to get results... but it's definitely not perfect.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-01-29 08:59 PM
The OPC-HDA quality flags may be of help here, combined with some COUNT(). Its a little messy but might help
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-01-30 03:12 AM
@rlao wrote:So the 'Max' and 'Min' historic aggregates have a 'Max Last' and 'Min Last' version where if the sample period only contains a single value, the aggregate will also grab the last preceding value before the sample period.
This isn't correct, the number of values of in the sample period (zero, one or more) doesn't make any difference with the "Min Last" and "Max Last" algorithms. The last value before the sample period is always included in the calculation.
@BevanWeiss wrote:
'Start' is not a historic aggregate, neither is 'Runtime' if you have that also. These are 'Historic Algorithms' 😉
And both 'Start' and 'Runtime' are custom Historic Algorithms, meaning that they do NOT ship by default with ClearSCADA (or Geo SCADA Expert).
This isn't correct. "Start" is a standard historic algorithm, its from the OPC HDA standard and is included in ClearSCADA / Geo SCADA Expert. "Runtime" however is a custom algorithm.
Whilst there isn't a "Start Last" algorithm, there is the "End Last" algorithm could this be of use? This gives the last value in the sample period or the preceding value if there are no values in the sample period.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-01-30 11:53 PM
My bad, I ran off on a tangent. Replace all of my 'Start' mentions with 'Starts' (i.e. count of 0->1 transitions).
I was definitely thinking that we were trying to get a delta on 'Starts'... which is a Custom Algorithm (like Runtime.. hence why I mentioned that).
I see the issue now. I think this is definitely deserving of a feature request. If there is an End Last, then there should be a Start Last. I can imagine quite a few situations where you'd want to obtain the 'oldest' value from the interval (and if there is no value within the interval, then the newest value prior to the start of the interval).
You'd need to do some conditional stuff to use EndLast.. since if Start returns a valid value that would be prefered to EndLast of all time before the interval you selected.
I think Adam might be right... a historic query might be the only way currently.
I feel I did some Delta stuff mid last year which would have used something similar... I think I ended up just doing a calculation point and using Delta. Perhaps a DeltaInclusive might be more useful... that would always return a delta that is 'valid' across a time interval, even if it has to extend outside of the time interval to retrieve either/or Start / End point.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-02 09:11 PM
Hi Andrew,
Yes apologies I was mistaken on the my understanding of Min/Max Last algorithms. I should have used 'End Last' as the example of what I was after.
Unfortunately, 'End Last' is similar but not exactly what I am after. I was looking for a way to return the first value in the sample period and to look to the preceding value only if there is no values in the sample period, hence 'Start Last'.
My ultimate aim was a Delta algorithm that wouldn't simply return a zero value if there were only one sample in the sample period, but instead look to the preceding sample before the sample period to calculate difference between first and last value. If there existed a 'Start Last' algorithm, I can simply do a subtraction between 'Start Last' and 'End' to accomplish this.
Although now that I think about it, 'Start Last' minus 'End' probably won't work as I would need 'Start Last' to look at the preceding value if there is only one value in the sample period, not no values in the sample period.
In the end I wrote up a bit of scripting to achieve what I wanted, but it would be very handy to have a variant of the Delta algorithm that looks at preceding values if there are insufficient samples in the sampling period. @BevanWeiss more or less hit the nail on the head with his description of a 'DeltaInclusive' algorithm.
Time to bug my Schneider support contact with another feature request.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-03 01:55 AM
@rlao If you let me know the PDEV I'll upvote it
I expect that it should be relatively easy for an intern or such to be given it as an introductory Geo SCADA Expert development task...
I think even if there was a 'Start Last' and an 'End Last' it wouldn't give you what you wanted... since if you only have one point in your interval, then it is both the Start and the End (the alpha and the omega...) and you'd be back to a delta of 0/0 (but without any magic calculus limits as x->inf) 😉
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-10 07:43 PM
PDEV-2046, votes from both of you.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-02-10 08:11 PM
Thanks Jesse, I'll mark this as solved.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-06-20 08:10 AM
Sounds like something I'm needing right now too. Throw my upvote at it!
I've been trying to use delta this week to calculate the difference in start/end value of an hourly interval with a historic algorithm, but ran into issues since delta doesn't carry over the value from the previous interval. In my head I was expecting it to work like End Last would, so I'll dub it Delta Last.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.