on 12-06-2007 11:42 PM
I've tried to come up with the average of tag values over a span of a month two different ways:
1. using the Statistics mode
2. using the HistoryEvent mode and averaging the resultant data with an average function.
For most tags the two results are quite similar. I have one tag however that contains a lot of zero values and for that tag, the Statistics mode average is about 10% higher than the HistoryEvent mode average. It's like the Statistics mode ignores the zero values when doing it's calculations.
Is this correct? My tag query is returning data from six tags - does this cause the Statistics mode any heartache?
David Macindoe
Statistics Mode can be specific to the actual Data Source itself - what is your underlying Historian?
6 tags shouldn't matter since each one is independent when it comes to MIN,MAX,AVG, etc.
Regards,
Jeremy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
David,
Martin K - if you are listening please feel free to correct or confirm the following:
The PI UDS uses native Statistical method calls to the PI API/SDK, so the results are coming directly from PI. In this case, xMII is not doing a HistoryEvent call and then doing the average calcs on the raw event records, like it would be if you did it in BLS.
Regards,
Jeremy
Thanks, Jeremy. I was assuming the Statistics mode was pulling all tag values for the requested date range to the xMII server and doing the statistics processing there. In any event, I really can't use it because it's giving me incorrect results. I'll just go with the HistoryEvent call and do the averaging in BLS.
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.