beautypg.com

2 short form data output (.fs) command, Short form data output (.fs) command – Campbell Scientific CS725 Snow Water Equivalency Sensor User Manual

Page 44

background image

CS725 Snow Water Equivalency Sensor

'CS725_Crystal_TEMP_MAX *Suggest to Output to Final Storage*
'CS725_Hist_Blocks

*Suggest to Output to Final Storage*

'CS725_K_Disp

*Suggest to Output to Final Storage*

'CS725_Stats
'CS725_PWR_Volt

*Suggest to Output to Final Storage*

SplitStr (CS725_Values(loopcount),CS725SplitStr(loopcount + 3),"",1,0)

Next


'Prepare the output time string from when the CS725 produced the data
'Format is YYYY-MM-DD HH:MM

CS725_TIME_String = FormatFloat (CS725_Year,"%04.0f") + "-" + FormatFloat
(CS725_Month,"%02.0f") + "-" + FormatFloat (CS725_Day,"%02.0f") + " " + FormatFloat
(CS725_Hour,"%02.0f") + ":" + FormatFloat (CS725_Min,"%02.0f")


EndIf

'Call Output Tables.
CallTable Diagnostics
CallTable CS725_6Hour


NextScan
EndProg

15.2 Short Form Data Output (.fs) Command

The following program example reads the SWE values from the CS725 using
the command [.fs].

The format of the data output from [.fs] command is as follows:

DD/MM/YYYY HH:MM:SS SWE_K SWE_TL

01/10/2009 06:59:50 123 129

'CR1000 Series Datalogger
'Program for CS725 Sensor


'Wiring CS725

'Red -Power

+12VDC

'Black -Power Gnd G - Ground
'Green -RS-232 TX C2

'White -RS-232 RX C1
'Clear -Shield

G – Ground


'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
'precede .Fs with an ESCAPE key CHR(27) and emd with an Enter CHR(13)
Const CS725_Command_get_output = CHR(27) + ".Fs" + CHR(13)

36