Logger CR350, sensor SDI12.
I am trying to save power by reducing the number of scans, but also need data from every minute. Ideally, I want to record average/max/min data from 1 sec scans of the last 6 sec of every minute (54-60) and write that to a table. Is there an easy way to program this? Hopefully without scanning every 1 sec and only writing table for the last 6 sec (saving power!).
Thanks for all support.
Do a 1 second scan, but don't measure every scan. The logger uses very little power waking up, then going back to sleep.
Make a boolean variable to mark when to do measurements. Also, use that within the DisableVar parameter of the Average(), Maximum(), and Minimum() instructions.
Suggested viewing:
https://www.campbellsci.com/videos/crbasic-4
https://www.campbellsci.com/videos/crbasic-5
If you want to enable a range of time, I suggest TimeIsBetween().
Do note that the program will compile in SequentialMode. That can be a limiting factor in what measurements can be done within 1 second.
Public PTemp Public MeasureEnable As Boolean DataTable (Test,1,-1) 'Set table size to # of records, or -1 to autoallocate. DataInterval (0,60,Sec,10) Minimum (1,PTemp,IEEE4,NOT MeasureEnable,False) EndTable BeginProg Scan (1,Sec,0,0) MeasureEnable = TimeIsBetween (54,60,60,Sec) If MeasureEnable Then PanelTemp (PTemp,60) EndIf CallTable Test NextScan EndProg
Exactly what I need. Thank you so much, Great support.