G.1.5, 50 hz measurement example — one cdm-vw300, two, Appendix g. crbasic program library – Campbell Scientific CDM-VW300 Series Dynamic Vibrating-Wire Analyzer System User Manual
Page 100

Appendix G. CRBasic Program Library
CDM_VW300Dynamic
(CPI_ADDR5,Freq5(),Diag5())
CDM_VW300Dynamic
(CPI_ADDR6,Freq6(),Diag6())
CallTable
dynamic
If TimeIntoInterval
(0,1,Sec) Then
CDM_VW300Static
(CPI_ADDR1,StaticFreq1(),Therm1(),DynStdDev1())
'Get static readings
CDM_VW300Static
(CPI_ADDR2,StaticFreq2(),Therm2(),DynStdDev2())
CDM_VW300Static
(CPI_ADDR3,StaticFreq3(),Therm3(),DynStdDev3())
CDM_VW300Static
(CPI_ADDR4,StaticFreq4(),Therm4(),DynStdDev4())
CDM_VW300Static
(CPI_ADDR5,StaticFreq5(),Therm5(),DynStdDev5())
CDM_VW300Static
(CPI_ADDR6,StaticFreq6(),Therm6(),DynStdDev6())
CallTable
static
EndIf
NextScan
EndProg
G.1.5 50 Hz Measurement Example — One CDM-VW300, Two
Channels
'===50Hz-1Device2Ch_4-25-13.CR3===
'CR3000 datalogger
'CDM-VW300 vibrating-wire analyzer
'Program to read 50-Hz dynamic data from one CDM-VW300 analyzer measuring two channels
'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
'<<<<<<<<<<<<< Public Freq(2) 'dynamic frequencies Public Diag(2) As Long 'diagnostic code Public StaticFreq(2) 'Static (1Hz output) frequencies Public Therm(2) 'Thermistor readings 'Standard Deviation of the dynamic readings that occurred during the latest one-second interval Public DynStdDev(2) 'The following arrays are used to configure the CDM-VW300 series device. Refer to the 'CDM_VW300Config instruction used below. ' ' CH1 CH2 ' --- --- 'Set to true (Enabled=1, Disabled=0) only those channels which have sensors connected Dim Enable(2) As Long = { 1, 1} 'Specify the target/desired resonant amplitude at which the sensor will be maintained 'via excitation, given in volts. This should be in the range 0.010 to 0.001 Dim Max_AMP(2) = { 0.002, 0.002} 'Low Frequency Boundary (sensor frequency should never fall below Dim F_Low(2) = { 300, 300} 'High Frequency Boundary (sensor frequency should never exceed 'this value regardless of environmental changes) Dim F_High(2) = { 6000, 6000} 'Output Format - Hz vs. Hz^2 :: Value of 0 – measured frequency is given in units of Hz, 'Value of 1 – measured frequency is squared and given in units of Hz^2 Dim OutForm(2) As Long = { 0, 0} 'Multiplier (factor) to be applied to sensor output frequency Dim Mult(2) = { 1.0, 1.0} 'Offset (shift) to be applied to sensor output frequency Dim Off(2) = { 0.0, 0.0} 'Steinhart-Hart coefficients [A,B,C] for converting thermistor ohms to 'temperature in Celsius. Specifying zeroes for A,B,C results in a reading in Ohms. Dim SteinA(2) = { 0.0, 0.0} Dim SteinB(2) = { 0.0, 0.0} Dim SteinC(2) = { 0.0, 0.0} 'Rainflow configuration (not used in this program, 'but required as configuration arguments) 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} G-8
'this value regardless of environmental changes)