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.

Average and StdDev depending on TimeStamp


crdrodriguezre Jun 23, 2020 12:51 AM

Hello!

I have a datalogger CR300-CELL200 and a CR1000X. Both of them are monitoring an ambient temperature each second. I want to create a program which helps me to calculate the average and the standard deviation for each minute from second 00 to second 59 along the 24 hrs, according to the datalogger's clock. Does it exist a function which fits to my requirement?

Thank you so much.


JDavis Jun 23, 2020 09:14 PM

It could be done with a data table. Just offset the time in the DataInterval instruction. Below is an example.

DataTable (Test,1,-1)
  DataInterval (59,60,Sec,10)
  Average (1,AirTemp,IEEE4,False)
  StdDev (1,AirTemp,IEEE4,False)
EndTable


BH Jul 6, 2020 09:16 PM

A similar follow up question:

I have a CR300 program with 60 second scan loop and want daily averages in a table.  I want the timestamp in the table to be the date the data were collected.  Not the date when the average was posted to the table.

' This code appears to calculate the average over a day (say 6/1/2020), then places a timestamp showing the next day the table: 2020-06-02 00:00:00.

DataTable(flow_daily,1,1000)

  DataInterval (24,24,Hr,10)

  Average(1,flow,IEEE4,0) 

EndTable

Do the following average the same data as above?

 DataInterval (0,1,Day,10)

 DataInterval(1439,1440, Min,10) ' the last minute of the day

Thanks in advance!

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