I am using a CR800 with a CS450 pressure transducer. To adjust the CS450 to account for drift, I am currently using a constant table (STGADJ) and simple code to accomplish this. However, each time a change is made in the constant table, it compiles the program and clears additional fields (total storm event volume calculator, etc (not shown below)) that are required at my stations.
My question: Is there another way to write in code for an offset that can be changed with the keypad, that does not compile the program?
Thanks
CR800
'Declare Constants
ConstTable
Const STGADJ = 0
EndConstTable
'Declare Variables and Units
Public Batt_Volt
Public Cr800Temp_C
Public CS450_Stg
Public Stage_avg
Public CS450(2)
Alias CS450(1)=CS450_PS
Alias CS450(2)=CS450_WTemp
'Define Data Tables
DataTable(SR3_ETI_FLOW10,True,-1)
DataInterval(0,10,Min,10)
Average (1,Cr800Temp_C,FP2,False)
Average(1,SFSTG_ft,IEEE4,False)
Average(1,Stage_avg,IEEE4,False)
EndTable
'Main Program
BeginProg
Scan(60,Sec,1,0)
SW12 (1 )
Battery(Batt_Volt)
'CS450 Pressure Transducer Generic SDI-12 Sensor measurements
SDI12Recorder (CS450,1,0,"M!",1.0,0)
'Convert PS to Stage (ft)
CS450_Stg=(CS450_PS)*2.31
'Allows for stage offset to be adjusted
SFSTG_ft= (CS450_Stg) + (STGADJ)
'Calculate 10 minute average stage to activate samplers
AvgRun (Stage_avg,1,SFSTG_ft,10)
EndProg
STGADJ could be a Public variable instead of a Constant. The value would be editable in the Public table using the keyboard display, software, or RTMC.
Dana W.
Consider using "PreserveVariables"
With your program, even with a recompile or power cycle, your additional fields should be preserved.
I am also surprised that you are able to accurately able to account for the amount of drift that would be experienced with a CS450. Makes me wonder if you don't have something else going on.
I am also surprised that you are able to accurately able to account for the amount of drift that would be experienced with a CS450. Makes me wonder if you don't have something else going on.