CS725 Snow Water Equivalent Sensor
24
'Define Data Tables
DataTable (Diagnostics,1,-1)
DataInterval (0,1440,Min,10)
Minimum (1,batt_volt,FP2,0,False)
Maximum (1,batt_volt,FP2,0,False)
Minimum (1,PTemp,FP2,0,False)
Maximum (1,PTemp,FP2,0,False)
EndTable
DataTable (CS725_6Hour,1,-1)
DataInterval (30,360,Min,10)
Sample (1,CS725_TIME_String,String)
Sample (1,CS725_StationID,String)
Sample (1,CS725_SerialNum,IEEE4)
Sample (1,CS725_K_Counts,IEEE4)
Sample (1,CS725_TL_Counts,IEEE4)
Sample (1,CS725_SWE_K,IEEE4)
Sample (1,CS725_K_TL_Ratio,IEEE4)
Sample (1,CS725_SWE_TL,IEEE4)
Sample (1,CS725_Crystal_TEMP_MIN,IEEE4)
Sample (1,CS725_Crystal_TEMP_MAX,IEEE4)
Sample (1,CS725_Hist_Blocks,IEEE4)
Sample (1,CS725_K_Disp,IEEE4)
Sample (1,CS725_PWR_Volt,IEEE4)
EndTable
'Main Program
BeginProg
'Prepare COM1 for the CS725
SerialOpen (Com1,9600,3,0,1000)
'Scan rate is dependent on application
Scan (30,Sec,7,0)
PanelTemp (PTemp,250)
Battery (batt_volt)
'Based on the Factory default settings of the CS725 will
'calculate SWE on the Hour every 6 Hours.
'The CS725 is read every 6 hour in this program.
'The reading will take place 10 minutes After the period to ensure the CS725
'is not processing calculations at the top of the hour when the measurement is
requested
'flag is set 10 minutes into every 6 hour period
If TimeIntoInterval (10,360,Min) Then Read_CS725_SWE_Flag = TRUE
'If the flag is high obtain a measurement
If Read_CS725_SWE_Flag = TRUE Then
'Reset the Flag
Read_CS725_SWE_Flag = False
'Load the command into the string
CS725_COMMAND_String = CS725_Command_get_output
'Flush the serial buffer
SerialFlush (Com1)
'Send the command string out
SerialOut (Com1,CS725_COMMAND_String,"",0,0)
'Wait up to 2 seconds, a <CR> or 100 chars for the values to be returned.
SerialIn (CS725SerialIn, Com1, 200,13, 100)
'The string is in the following format
'02/25/2014 12:59: 1234 23 637733 485431 24425 80 76 79 22 23 21 0 6 12 24 -1
1.3
' 12.05
'Split out the string into smaller strings - use a space as the filter
Summary of Contents for CS725
Page 2: ......
Page 35: ......
Page 47: ......
Page 49: ...Appendix Title B 2 ...
Page 52: ...CS725 Snow Water Equivalent Sensor C 3 ...
Page 55: ......