D-1
Appendix D. GetDataRecord Sample
Program
CRBasic Example D-1. Using GetDataRecord to Extract Data From a CRVW3
GetDataRecordFromCRVW3.CR1
'Campbell Scientific CR1000
'This program demonstrates how to use
'the GetDataRecord instruction to extract
'data from the CRVW3's final storage tables
'Result codes for GetDataRecord instructions
Public
GDRResult1, GDRResult2
'The following declarations and table definitions were extracted
'from the CRVW3 terminal mode's "show table structure" command.
'Note that if you change settings on the CRVW3, these definitions
'could also change, and so they would need to be re-extracted
'from the terminal mode again and re-inserted into the program
'in that case
Public
Batt_Volt
Public
CPU_Temp
Public
Chan1_Freq
Public
Chan1_Amp
Public
Chan1_SigNoisR
Public
Chan1_NoisFreq
Public
Chan1_DecayRat
Public
Chan1_Therm
Public
Chan1_Temp
Public
Chan1_Digits
Public
Chan1_EngOut
DataTable
(VW_Data,1,-1)
Sample
(1,Batt_Volt,IEEE4)
Sample
(1,CPU_Temp,IEEE4)
Sample
(1,Chan1_Freq,IEEE4)
Sample
(1,Chan1_Amp,IEEE4)
Sample
(1,Chan1_SigNoisR,IEEE4)
Sample
(1,Chan1_NoisFreq,IEEE4)
Sample
(1,Chan1_DecayRat,IEEE4)
Sample
(1,Chan1_Therm,IEEE4)
Sample
(1,Chan1_Temp,IEEE4)
Sample
(1,Chan1_Digits,IEEE4)
Sample
(1,Chan1_EngOut,IEEE4)
EndTable
Public
CalTime(2)
As Long
Public
FreqBL_Chan1
Public
TempBL_Chan1
Public
PressureBL_Chan1
DataTable
(CalHist,1,-1)
Sample
(1,CalTime,Nsec)
Sample
(1,FreqBL_Chan1,IEEE4)
Sample
(1,TempBL_Chan1,IEEE4)
Sample
(1,PressureBL_Chan1,IEEE4)
EndTable
'End of declarations extracted from the CRVW3 terminal mode
Summary of Contents for CRVW3
Page 2: ......
Page 3: ......
Page 7: ......
Page 13: ...Table of Contents vi ...
Page 121: ...Appendix A Updating CRVW3 Firmware A 4 ...
Page 131: ...Appendix E Engineering Output and Calibration E 4 ...
Page 133: ......
Page 134: ......