G.1.13, 50 hz measurement example — one cdm-vw300, two, Rainflow-histogram configuration – Campbell Scientific CDM-VW300 Series Dynamic Vibrating-Wire Analyzer System User Manual
Page 113: Appendix g. crbasic program library, G-21

Appendix G. CRBasic Program Library
G.1.13 50 Hz Measurement Example — One CDM-VW300, Two
Geokon 4000 Sensors with FieldCal() and TableFile() to
CF
'===Geokon4000-50Hz2ChEventTableFile_4-25-13.CR3===
'CR3000 datalogger
'CDM-VW300 vibrating-wire analyzer
'Program to read 50-Hz dynamic data from one CDM-VW300 measuring two Geokon 4000
strain gages.
'Write data to CF card at each event.
'Demonstrate use of TableFile() with Option 64, DataEvent(), and DataInterval() to conserve
' data
storage.
'IMPORTANT -- Ensure that the CPI address coded on the following line matches the address
'reported for the attached analyzer in the DevConfig or DVWTool software.
Const
CPI_ADDR
=
1
'<<<<<<<<<<<<< 'Constants specific to the Geokon 4000 strain gages Const GageFactor = 4.062 'G = 4.062 - Gage factor taken from sensor manual Const NomBatchFactor = 0.97 'B=0.97 - Batch Factor taken from calibration sheet provided with ' sensors 'Output will be in Strain, not Digits nor Frequency Public Strain(2) : Units Strain() = Microstrain 'Measured strain output in units of Microstrain Public StrainBL(2) : Units Strain() = Microstrain 'Baseline/offset strain reading in units of ' Microstrain (for calibration) Public DCode(2) As Long 'Dynamic diagnostic code Public StaticStrain(2) : Units StaticStrain() = Microstrain 'Static (1Hz) strain reading in ' microstrain Public StaticDigits(2) 'Calculated Static (1Hz) Digits output (for troubleshooting) Public StaticFreq(2) : Units StaticFreq) = Hz 'Calculated Frequency (1Hz) from static digits '(for troubleshooting) Public Temp(2) : Units Temp() = DegC ' Temperature in DegC Public TempBL(2) : Units TempBL() = DegC ' Temperature Baseline in DegC Public StrainStdDev(2) : Units StrainStdDev() = Microstrain 'StdDev of dynamic strain readings Public ZeroMode 'Mode variable for baseline/offset zeroing calibration Public NewDynFileStored As Boolean 'Needed for TableFile Public NewStaticFileStored As Boolean 'True when a new file was just created on the card Public LastDynFileName As String * 35 'The name of the new file just created on the card Public LastStaticFileName As String * 35 'Configure the CDM-VW300 device Dim Enable(2) As Long = { 1, 1} Dim Max_AMP(2) = { 0.002, 0.002} Dim F_Low(2) = { 300, 300} Dim F_High(2) = { 6000, 6000} 'Use Hz^2 (1) instead of Hz (0) so we can get to digits Dim OutForm(2) As Long = { 1, 1} 'Use a multiplier of 0.001 to divide by 1000 and get digits, then scale further to get to Strain Dim Mult(2) = { 0.001*GageFactor*NomBatchFactor, 0.001*GageFactor*NomBatchFactor} 'Digits (Hz^2/1000) times G times B results in strain Dim Off(2) = { 0.0, 0.0} 'Use Steinhart-Hart coefficients To get Thermistor output in DegC Dim SteinA(2) = {1.4051E-3, 1.4051E-3} Dim SteinB(2) = { 2.369E-4, 2.369E-4} Dim SteinC(2) = { 1.019E-7, 1.019E-7} Dim RFMB(2) As Long = { 20, 20} Dim RFAB(2) As Long = { 20, 20} Dim RFLL(2) = { 400.0, 400.0} Dim RFHL(2) = {4000.0,4000.0} Dim RFHY(2) = { 0.005, 0.005} Dim RFOF(2) As Long = { 100, 100} CDM_VW300Config (0,CPI_ADDR,0,Enable(),Max_AMP(),F_Low(),F_High(), _ OutForm(),Mult(),Off(), SteinA(),SteinB(),SteinC(), _ RFMB(),RFAB(),RFLL(),RFHL(),RFHY(),RFOF()) DataTable (static,true,-1) 'Even though data is observed once per second, 'write out 1 minute averages G-21