NOTE:
Beginning with CR6 OS 7 and OS 32 for CR1000X, CR800-series, and CR300 data loggers, the
DataInterval()
for a
GetDataRecord()
table is not required to be integrally divisible
by the program main scan interval. This allows the scan rate of the aggregator data logger to
be independent of the
GetDataRecord()
interval and allows correct timestamps in the
case that the CRVW3 is storing data faster than the local
GetDataRecord()
program. For
example, if an aggregator data logger is running a main scan of one minute, and a CRVW3 is
storing measurements every 10 seconds, then in order to get all of the most recent records
from the CRVW3, the
MaxRecords
parameter of
GetDataRecord()
would be set to 6:
GetDataRecord
(Result,ComSDC7,2,4,0000,200,2,&H8000 + 1,VW_Data_
1,6)
C.3
GetDataRecord()
sample program
CRBasic Example 1: Using GetDataRecord() to extract data from a CRVW3
'GetDataRecord FromCRVW3
'Campbell Scientific CR1000X
'This program demonstrates how to use
'the GetDataRecord instruction to extract
'data from the CRVW3 final storage tables
'Result codes for GetDataRecord instructions
Public
GDRResult1, GDRResult2
'The following declarations and table definitions were extracted
'from the CRVW3 terminal mode "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 reinserted 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
CRVW3 3-Channel Vibrating-Wire Data Logger
79