I'm trying to add a Geonor T200B precip gauge to an existing met station. Logger is CR1000. The arrangement of existing sensors requires me to run the program in Pipeline mode. To control the T200B, I can use PeriodAvg or PulseCount, but they are used inside a conditional statement which allows the sensor to warm up before measuring. But, PeriodAvg and PulseCount cannot be inside a conditional statement in PipeLine mode. Is there a workaround?
If TimeIntoInterval (25,30,Min) Then 'set flag to true to power on and measure T200B 5 mins before top/bottom of hour
T200B_Flag = true
If T200B_Flag = true Then 'power on sensor
T200B_Warmup = Timer (1,Sec,0)
If T200B_Warmup >= 15 Then '15 sec warmup delay
T200B_Depth_Raw = (T200B_A * (T200B_Freq - T200B_f0) + T200B_B * (T200B_Freq - T200B_f0)^2) * 10
SW12(0) 'power off sensor
T200B_Warmup = Timer(1,Sec,3) 'reset timer
If TimeIntoInterval (0,30,min) Then
T200B_Flag = false
As you need to put the PeriodAvg in the main part of the scan and not in a conditional statement, it will happen every time the scan runs. Thats fine, but you just need to change your logic so that you only use the values measured at the times you want.
Create another value(s) which get updated only when the sensor is on, i.e. in your case, 5min before top and bottom of the hour. Then use those values in your output table.
With a bit of experimentation, this should work for you.