Hi, we want to record rain from a TB3 at one minute intervals, but only write to the table those records with rain. Easy enough with a 1 minute scan, but it's nice to keep the scan at 10 seconds.
10 second scan
I tried the above but it will write the total (since the previous write) only when a tip happened in the last scan of the minute.
'TB4 Rain Gauge measurement Rain_in:
We have been writing to the table when any scan has a tip, but we don't like having to deal with the seconds in our database.
In the CR200 to do this you need to keep a running total of the rain within the main scan which is reset after data is stored.
This code should do this:
'CR200 Series Datalogger
Public rain_in, rain_in_min
'Define Data Tables
'Totalise the rain here for the test
'Reset total after data stored (at end of the minute)
If Tips.output(1,1) Then rain_in_min=0
what this 10 sec is? what this does ? why not 1 or 60?
The original request from Dave was to have the Scan at 10s.
It could run at 1s or 60s as you say, but there may be other measurements that need to work at 10s. For Help on the Scan instruction, please see CRbasic Help for Scan.