G.1.3, 20 hz measurement example — three cdm-vw305s, 24, Appendix g. crbasic program library – Campbell Scientific CDM-VW300 Series Dynamic Vibrating-Wire Analyzer System User Manual
Page 96

Appendix G. CRBasic Program Library
G.1.3 20 Hz Measurement Example — Three CDM-VW305s, 24
Channels
'===20Hz-3Devices8Ch_3-25-13.CR3===
'CR3000 datalogger
'CDM-VW305 vibrating-wire analyzer
'Program to read 20-Hz dynamic data from three CDM-VW305 analyzers (8x3=24 channels)
'IMPORTANT -- Ensure that the CPI addresses coded on the following lines matches the addresses
'reported for each attached analyzer in the DevConfig or DVWTool software.
Const
CPI_ADDR1
=
5
Const
CPI_ADDR2
=
15
Const
CPI_ADDR3
=
25
Public
Freq1(8), Freq2(8), Freq3(8)
'dynamic frequencies
Public
Diag1(8)
As Long
, Diag2(8)
As Long
, Diag3(8)
As Long
'diagnostic codes
Public
StaticFreq1(8), StaticFreq2(8), StaticFreq3(8)
'Static (1Hz output) frequencies
Public
Therm1(8), Therm2(8), Therm3(8)
'Thermistor readings
Public
DynStdDev1(8), DynStdDev2(8), DynStdDev3(8)
'Dynamic Standard Deviations
'Setup for First Device
' CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8
' --- --- --- --- --- --- --- ---
Dim
Enable1(8)
As Long
=
{ 1, 1, 1, 1, 1, 1, 1, 1}
Dim
Max_AMP1(8)
=
{ 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002}
Dim
F_Low1(8)
=
{ 300, 300, 300, 300, 300, 300, 300, 300}
Dim
F_High1(8)
=
{ 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000}
Dim
OutForm1(8)
As Long
=
{ 0, 0, 0, 0, 0, 0, 0, 0}
Dim
Mult1(8)
=
{ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
Dim
Off1(8)
=
{ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
Dim
SteinA1(8)
=
{ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
Dim
SteinB1(8)
=
{ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
Dim
SteinC1(8)
=
{ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
'Setup for Second Device
Dim
Enable2(8)
As Long
=
{ 1, 1, 1, 1, 1, 1, 1, 1}
Dim
Max_AMP2(8)
=
{ 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002}
Dim
F_Low2(8)
=
{ 300, 300, 300, 300, 300, 300, 300, 300}
Dim
F_High2(8)
=
{ 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000}
Dim
OutForm2(8)
As Long
=
{ 0, 0, 0, 0, 0, 0, 0, 0}
Dim
Mult2(8)
=
{ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
Dim
Off2(8)
=
{ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
Dim
SteinA2(8)
=
{ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
Dim
SteinB2(8)
=
{ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
Dim
SteinC2(8)
=
{ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
'Setup for Third Device
Dim
Enable3(8)
As Long
=
{ 1, 1, 1, 1, 1, 1, 1, 1}
Dim
Max_AMP3(8)
=
{ 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002}
Dim
F_Low3(8)
=
{ 300, 300, 300, 300, 300, 300, 300, 300}
Dim
F_High3(8)
=
{ 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000}
Dim
OutForm3(8)
As Long
=
{ 0, 0, 0, 0, 0, 0, 0, 0}
Dim
Mult3(8)
=
{ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
Dim
Off3(8)
=
{ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
Dim
SteinA3(8)
=
{ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
Dim
SteinB3(8)
=
{ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
Dim
SteinC3(8)
=
{ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
'Shared rainflow configuration (not used, but required as configuration arguments)
Dim
RFMB(8)
As Long
=
{ 20, 20, 20, 20, 20, 20, 20, 20}
Dim
RFAB(8)
As Long
=
{ 20, 20, 20, 20, 20, 20, 20, 20}
Dim
RFLL(8)
=
{ 400.0, 400.0, 400.0, 400.0, 400.0, 400.0, 400.0, 400.0}
Dim
RFHL(8)
=
{4000.0,4000.0,4000.0,4000.0,4000.0,4000.0,4000.0,4000.0}
Dim
RFHY(8)
=
{ 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005}
Dim
RFOF(8)
As Long
=
{ 100, 100, 100, 100, 100, 100, 100, 100}
'Configure First Device
CDM_VW300Config
(1,CPI_ADDR1,0,Enable1(),Max_AMP1(),F_Low1(),F_High1(), _
OutForm1(),Mult1(),Off1(), SteinA1(),SteinB1(),SteinC1(), _
RFMB(),RFAB(),RFLL(),RFHL(),RFHY(),RFOF())
'Configure Second Device
CDM_VW300Config
(1,CPI_ADDR2,0,Enable2(),Max_AMP2(),F_Low2(),F_High2(), _
OutForm2(),Mult2(),Off2(), SteinA2(),SteinB2(),SteinC2(), _
RFMB(),RFAB(),RFLL(),RFHL(),RFHY(),RFOF())
'Configure Third Device
G-4