CS725 Snow Water Equivalent Sensor
26
'CR1000 Series Datalogger
'Program for CS725 Sensor
'Wiring CS725
'Red -Power:
+12VDC
'Black and Clear:
G - Ground near +12V
'Green -RS-232 TX:
C2
'White -RS-232 RX:
C1
'Declare Public Variables
Public PTemp As Float,batt_volt As Float
Public Read_CS725_SWE_Flag As Boolean
Public CS725_RET_Values(8) As Float
Public CS725SerialIn As String * 100
Public CS725_COMMAND_String As String * 20
Alias CS725_RET_Values(7) = SWE_K
Alias CS725_RET_Values(8) = SWE_TL
'Declare Constants
'Command to Read back last results in short data output form
'preceed .fs with an ESCAPE key CHR(27) and emdcmd? with an Enter CHR(13)
'Change - Previously ".Fs", software version V5c_15_L and newer is ".fs" Lower case
F Const CS725_Command_get_output = CHR(27) + ".fs" + CHR(13)
'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
'Define Data Tables
DataTable (CS725Hourly,1,-1)
DataInterval (0,60,Min,10)
Sample (8,CS725_RET_Values(1),IEEE4)
EndTable
'Main Program
BeginProg
'Prepare COM1 for the CS725
SerialOpen (Com1,9600,3,0,10000)
'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 the CS725 will
'calculate SWE on the hour every 6 hours.
'We will simply read the CS725 every hour in this program.
'The reading will take place 10 minutes after the hour to ensure the CS725
'is not burdened with extra processing when the measurement is requested
If TimeIntoInterval (10,60,Min) Then Read_CS725_SWE_Flag = TRUE
If Read_CS725_SWE_Flag = TRUE Then
'Reset the Flag
Read_CS725_SWE_Flag = False
'Load the command into the string
Содержание CS725
Страница 2: ......
Страница 35: ......
Страница 47: ......
Страница 49: ...Appendix Title B 2 ...
Страница 52: ...CS725 Snow Water Equivalent Sensor C 3 ...
Страница 55: ......