Appendix H. Additional Programming Examples
H.1.2 Wireless/Sensors with Different Frequencies
'
'This is an example of a program used by a CR1000 and AVW206 to control two
'AM16/32B multiplexers. Sixteen Geokon 4450 VW displacement sensors are
'attached to each multiplexer and each sensor provides a frequency, which is
'converted to displacement, and resistance, which is converted to
'temperature. Polynomial Gage Factors used in this example were taken
'from the calibration sheets of the individual 4450 sensors. The
'coefficients used to convert resistance to temperature are from the
'Steinhart-Hart equation.
'The CR1000 communicates with the remote AVW206 through a RF401 radio attached to the
logger's CS/IO port in Modem Enable mode.
'The Pakbus address of the AVW206 used in this example is 20
Public batt_volt,Ptemp
Public Mux1(16,6)
Public Mux2(16,6)
Public VWResults(2)
Public Amp1(16),Amp2(16)
Public Temp1(16),Temp2(16)
Public Therm1(16),Therm2(16)
Public VWfreq1(16),VWfreq2(16)
Public Sig2Noise1(16),Sig2Noise2(16)
Public DecayRatio1(16),DecayRatio2(16)
Public FreqOfNoise1(16),FreqOfNoise2(16)
Public Displacement1(16),Displacement2(16)
Dim i
Dim j
Dim Digits
Dim ZeroRding(32)
Dim GageFactor(32)
Dim PolyCoef1(48) As Float
Dim PolyCoef2(48) As Float
Dim CoefString1(16) As String *30
Dim CoefString2(16) As String *30
Const A=.0014051
'Coefficients for Steinhart-Hart equation
Const B=.0002369
'used to convert resistance to Temp
Const C=.0000001019
'Store Freq, amplitude, signal to noise, freq of noise, decay ratio and ‘resistance from both mux's.
DataTable (MuxExample,1,-1)
DataInterval
(0,10,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)
H-4
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: ......