G.1.12, 50 hz measurement example — one cdm-vw300, two, Steinc(8) – Campbell Scientific CDM-VW300 Series Dynamic Vibrating-Wire Analyzer System User Manual
Page 111: Appendix g. crbasic program library, G-19

Appendix G. CRBasic Program Library
'Calculate static digits reading (for troubleshooting)
StaticDigits(1)
=
StaticStrain(1)/GageFactor/NomBatchFactor
StaticDigits(2)
=
StaticStrain(2)/GageFactor/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
SlowSequence
Scan
(5,sec,10,0)
'Rainflow-Histogram call must be in a slow sequence scan
CDM_VW300Rainflow
(CPI_ADDR,RF1(),RF2(),RF3(),RF4(),RF5(),RF6(),RF7(),RF8())
CallTable
rainflhist
NextScan
EndProg
G.1.12 50 Hz Measurement Example — One CDM-VW300, Two
Geokon 4000 Sensors with FieldCal() and CardOut() to
CF
'===Geokon4000-50Hz2ChEventCard_4-22-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 CardOut(), 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
'<<<<<<<<<<<<<<SET CPI ADDRESS HERE
'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
'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
G-19