Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Using split to calculate daily averages


AaronC Nov 23, 2010 06:21 PM

I am trying to construct split parameters to calculate and output daily averages of hourly values. I want this to run each morning to calcluate the previous day's daily average for a number of sensors.

I am using a mixed-array logger.

sample data
210 2010 325 0000 194 9.2 4.2 7.5
...
210 2010 325 2200 254 9.6 7.7 7.4
210 2010 325 2300 286 8.4 7.2 7.5
210 2010 326 0000 295 8.5 7.1 7.6
etc.

If I set:
Start cond: 2[-0]:3[-1]:4[0]
Stop cond: 2[-0]:3[-0]:4[0]
Copy: 1[210]

I get 24 hours of data from the previous day, starting at 0000 and going until 2300, which is what I want to run my averages on. However, I can't seem to get a select (and or copy) statements working that will calculate the averages right.

Here is what I have tried as an example:

smpl(".A C21"),smpl(edate("YYMMDD 'PS DH'HHNN";4;3;2)),smpl("/WSD"),Avg(5[150..1100]),smpl("/TUD"),Avg(6[5..30]),smpl("/WTD"),Avg(7[0.01..100]),smpl("/WPD"),Avg(8[4..11])

With "Trigger on Stop condition" = true, I get no output.
With "trigger on stop condition" = false, I get 24 hours of data, but no averaging. I just want an output of averages, nothing else.

I must be missing something really obvious, here. Averaging data shouldn't be this hard, right? Any pointers would be much appreciated!

-Aaron


ChipsNSalsa Dec 16, 2010 12:00 AM

This simple example should work:

Start Condition = :3[-1]::
Stop Condition = :3[-0]::
Copy = 1[210]
Select = Avg(8[4..11])

If it does then try throwing in your original select line. You shouldn't need the "Trigger on stop condition" enabled because you don't need to continue processing data after the stop condition is met.

Log in or register to post/reply in the forum.