Appendix G. CRBasic Program Library
G-14
EndTable
BeginProg
'50 Hz/20msec scan rate
Scan
(20,msec,500,0)
CDM_VW300Dynamic
(CPI_ADDR,Freq(),Diag())
CallTable
dynamic
If TimeIntoInterval
(0,1,Sec) Then
CDM_VW300Static
(CPI_ADDR,StaticFreq(),Therm(),DynStdDev())
CallTable
static
EndIf
NextScan
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.10 50 Hz Diagnostic Example
— One CDM-VW300, Two
Geokon 4000 Sensors with FieldCal()
'===Geokon4000-50Hz2ChDiags_4-25-13.CR3===
'CR3000 datalogger
'CDM-VW300 vibrating-wire analyzer
'Program to read 50-Hz diagnostic data from one CDM-VW300 analyzer measuring two Geokon 4000
'strain gauges.
'Diagnostic code evaluation example -- use counters to track diagnostic flag counts.
'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 cal 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
'Diagnostic Code flags
Public
ExciteStr(2) : Units ExciteStr()
=
Volts
'Excitation strength on the VW channel in volts
Const
VoltFactor
=
1/42.5
'For converting 0-255 range of excitation into 0 to 6V
Public
LowAmpCount(2)
As Long
Public
HighAmpCount(2)
As Long
Public
LowFreqCount(2)
As Long
Public
HighFreqCount(2)
As Long
Public
ResetCounts
As
Boolean
'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}
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 ...