I have an application where I need to measure precipitation using a tipping bucket rain gage. I am using a CR1000 datalogger. My sampling rate is every 5 minutes. I would like to display hourly, daily, monthly as well as total rain fall. What set of CR1000 instructions would be necessary? What is the easiest way to accomplish this using minimal tables?
Thank You,
wx2day
Try this
Public Rain_mm,Hourly_Rain,Daily_Rain,Monthly_Rain,Total_Rain
Dim Time(9)
DataTable (Rain,True,1000)
Sample (1,Hourly_Rain,FP2)
Sample (1,Daily_Rain,FP2)
Sample (1,Monthly_Rain,FP2)
Sample (1,Total_Rain,FP2)
EndTable
BeginProg
Scan (5,Min,3,0)
RealTime (Time())
PulseCount (Rain_mm,1,1,2,0,0.2,0)
Hourly_Rain=Hourly_Rain+Rain_mm
Daily_Rain=Daily_Rain+Rain_mm
Monthly_Rain=Monthly_Rain+Rain_mm
Total_Rain=Total_Rain+Rain_mm
If TimeIntoInterval (0,1,Hr) Then Hourly_Rain=0
If TimeIntoInterval (0,24,Hr) Then Daily_Rain=0'change the zero to 9 if you want rainfall total at 9am
If Time(5)=0 AND Time(4)=0 AND Time(3)=0 Then Monthly_Rain=0
CallTable (Rain)
NextScan
EndProg
Thank You Grant! Sorry I took so long to respond!