
Appendix G. CRBasic Program Library
G-20
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*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())
DataTable
(static,true,-1)
'Even though data is observed once per second,
'write out 1 minute averages
DataInterval
(0,1,Min,10)
'Using TableFile, write the 1 minute averages out each
'15 minutes to a file on the CRD (Compact Flash) device
TableFile
("CRD:"&Status.StationName(1,1)&".TFStatic", _
64,-1,0,15,Min,NewStaticFileStored,LastStaticFileName)
Average
(2,StaticStrain(),IEEE4,False)
Average
(2,Temp(),IEEE4,False)
Average
(2,StrainStdDev(),IEEE4,False)
EndTable
DataTable
(dynamic,true,-1)
'Using DataEvent, only store data in this table when
'the Microstrain reading is greater than 200 on either channel
DataEvent (100,(Strain(1) > 200) OR (Strain(2) > 200),1,100)
'Using TableFile, write out the 50Hz data to the CRD (Compact
'flash) into a new file whenever 600 data records have been captured
TableFile ("CRD:"&Status.StationName(1,1)&".TFDynamic", _
64,-1,600,0,Sec,NewDynFileStored,LastDynFileName)
Sample
(2,Strain(),IEEE4)
Sample
(2,DCode(),IEEE4)
EndTable
DataTable(CalHist,NewFieldCal,-1)
CardOut (0 ,2000)
SampleFieldCal
EndTable
BeginProg
'50 Hz/20msec scan rate
Scan
(20,msec,500,0)
CDM_VW300Dynamic
(CPI_ADDR,Strain(),DCode())
'Get unshifted strain
'Now shift the given Strain using the Baseline/Offset value
Strain(1)
=
Strain(1) + StrainBL(1) : Strain(2)
=
Strain(2) + StrainBL(2)
'Zeroing calibration for Geokon 4000 Vibrating Wire Strain Gauge
'Strain offset and Temperature baseline readings
FieldCal(0,Strain(),2,0,StrainBL(),ZeroMode,0,1,100)
'Calibrate for 2 seconds
FieldCal(4,Temp(),2,0,TempBL(),ZeroMode,0,1,100)
CallTable
dynamic
CallTable
CalHist
If TimeIntoInterval
(0,1,Sec) Then
CDM_VW300Static
(CPI_ADDR,StaticStrain(),Temp(),StrainStdDev())
'Obtain unshifted 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
Содержание CDM-VW300 Series
Страница 2: ......
Страница 4: ......
Страница 6: ......
Страница 12: ......
Страница 59: ...User Manual 47 Figure 7 16 LoggerNet connect screens showing frequencies from CDM VW300 ...
Страница 70: ...CDM VW300 Series Dynamic Vibrating Wire Analyzers 58 ...
Страница 76: ...Appendix B SC CPI Datalogger to CPI Interface B 4 ...
Страница 80: ...Appendix C CDM Devices and CPI Bus C 4 Figure C 2 Long cable lengths of a distributed CPI bus ...
Страница 82: ...Appendix D Digits Conversion D 2 Figure D 1 Geokon Calibration Report of a Sensor without a Thermistor ...
Страница 86: ...Appendix E Calculating Measurement Error E 4 ...
Страница 116: ...Appendix G CRBasic Program Library G 26 ...
Страница 117: ...Appendix G CRBasic Program Library G 27 ...