Appendix H. Additional Programming Examples
H.2 Datalogger-Controlled Multiplexer
'
'This example demonstrates how to program a CR1000 to collect measurements from sensors
'attached to four AM16/32 multiplexers. The four multiplexers are controlled directly
'by the data logger, not through the AVW200 as in other examples contained in this
'manual. Displacement is calculated from the measured frequencies by applying the
'Polynomial Gage Factors contained in each sensors' calibration report. Only the
'resistance from each thermistor is measured. Temp is calculated by applying the
'resistance to a known equation which converts resistance to temp. Temperature
'correction is not shown in this example. In this example 16
'VW displacement sensors with thermistors are attached to both the first and second
'multiplexers, while only 9 similar sensors are attached to the third multiplexer.
'32 VW displacement sensors with no thermistors are attached to the fourth multiplexer.
'
SequentialMode
Public batt_volt
Public Mux(6)
Public VWResults
Public Temp1(16),Temp2(16),Temp3(12)
Public Amp1(16),Amp2(16),Amp3(12),Amp4(32)
Public VWfreq1(16),VWfreq2(16), VWFreq3(9),VWFreq4(32)
Public Sig2Noise1(16),Sig2Noise2(16),Sig2Noise3(12),Sig2Noise4(32)
Public DecayRatio1(16),DecayRatio2(16),DecayRatio3(9),DecayRatio4(32)
Public FreqOfNoise1(16),FreqOfNoise2(16),FreqOfNoise3(12),FreqOfNoise4(32)
Public Displacement1(16),Displacement2(16), Displacement3(9),Displacement4(32)
Dim i
Dim j
Dim Digits
Dim Coef1(48)
Dim Coef2(48)
Dim Coef3(27)
Dim Coef4(96)
Const A=.0014051 'Coefficients for Steinhart-Hart equation
Const B=.0002369 'used to convert resistance to Temp
Const C=.0000001019
DataTable (MuxExample,1,-1)
DataInterval
(0,15,Min,10)
Minimum
(1,batt_volt,FP2,0,False)
Sample
(16,Displacement1(),FP2)
Sample
(16,VWfreq1(),FP2)
Sample
(16,Temp1(),FP2)
Sample
(16,Amp1(),FP2)
Sample
(16,Sig2Noise1(),FP2)
Sample
(16,FreqOfNoise1(),FP2)
Sample
(16,DecayRatio1(),FP2)
Sample
(16,Displacement2(),FP2)
Sample
(16,VWfreq2(),FP2)
Sample
(16,Temp2(),FP2)
Sample
(16,Amp2(),FP2)
H-7
Summary of Contents for AVW200 series
Page 2: ......
Page 78: ...Appendix C Antennas Antenna Cables and Surge Protectors for the AVW206 AVW211 and AVW216 C 8...
Page 86: ...Appendix E Status Table E 4...
Page 104: ...Appendix H Additional Programming Examples H 12...
Page 110: ...Appendix I Using MD485 Multidrop Modems with AVW200 Interfaces I 6...
Page 111: ......