
Appendix G. CRBasic Program Library
G-16
If TimeIntoInterval
(0,1,Sec) Then
CDM_VW300Static
(CPI_ADDR,StaticStrain(),Temp(),StrainStdDev())
'Obtain un-shifted
'static strain.
'Calculate static digits reading (for troubleshooting)
StaticDigits(1)
=
StaticStrain(1)/GaugeFactor/NomBatchFactor
StaticDigits(2)
=
StaticStrain(2)/GaugeFactor/NomBatchFactor
'Now shift the given StaticStrain using the Offset/Baseline reading to obtain
'Final/adjusted StaticStrain.
StaticStrain(1)
=
StaticStrain(1) + StrainBL(1) : StaticStrain(2)
=
StaticStrain(2) + _
StrainBL(2)
'Calculate static frequency from static digits (for troubleshooting)
StaticFreq(1)
=
SQR(StaticDigits(1)*1000) : StaticFreq(2)
=
SQR(StaticDigits(2)*1000)
CallTable
static
EndIf
NextScan
EndProg
G.1.11 50 Hz Measurement Example
— One CDM-VW300, Two
Geokon 4000 Sensors with FieldCal()
'===Geokon4000-50Hz2Ch_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 gauges
'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
'<<<<<<<<<<<<<<SET CPI ADDRESS HERE
'Constants specific to the Geokon 4000 strain gauges
Const
GaugeFactor
=
4.062
'G = 4.062 - Gauge factor taken from sensor manual
Const
NomBatchFactor
=
0.97
'B=0.97 - Batch Factor taken from sensor calibration sheet
'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
'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*GaugeFactor*NomBatchFactor, 0.001*GaugeFactor*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())
Summary of Contents for CDM-VW300 Series
Page 2: ......
Page 4: ......
Page 6: ......
Page 12: ......
Page 59: ...User Manual 47 Figure 7 16 LoggerNet connect screens showing frequencies from CDM VW300 ...
Page 70: ...CDM VW300 Series Dynamic Vibrating Wire Analyzers 58 ...
Page 76: ...Appendix B SC CPI Datalogger to CPI Interface B 4 ...
Page 80: ...Appendix C CDM Devices and CPI Bus C 4 Figure C 2 Long cable lengths of a distributed CPI bus ...
Page 86: ...Appendix E Calculating Measurement Error E 4 ...
Page 116: ...Appendix G CRBasic Program Library G 26 ...