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.

get the average of readings


MtJoy Dec 14, 2016 03:08 PM

I know there is function such as AVESPA, AVERUN.

but what I need is, for example,  after using AVESPA we got good readings in one hour interval in DAT file.

Is there a way to get the average reading of every 24hrs. 


JDavis Dec 14, 2016 04:30 PM

Just use the Average instruction inside a table with a 24 hour interval.


AMK Dec 14, 2016 04:36 PM

JDavis,

Is there a way to use that 24hr average variable in a conditional program statement? We are looking a ways to use the previous 24hr average battery voltage to control when the data logger radio is powered on or off? I.e. When 24hr_batt is less than 12, turn radio power off. How would you reference that variable?


JDavis Dec 14, 2016 04:42 PM

For that scenario, you might be better using AvgRun to calculate a 24hr running average.

In the case of data stored to tables, you can read them back out. For more information look at the Datatable Access topic in the CRBasic help.


jra Dec 14, 2016 05:01 PM

Here's an article on pulling data out of a DataTable into a variable: 

https://www.campbellsci.com/blog/programmatically-access-stored-data-values 


MtJoy Dec 14, 2016 07:56 PM

Janet, link expired page not found.

.figured out. your link text is .com  but actual link is .ca.

https://www.campbellsci.ca/blog/programmatically-access-stored-data-values

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