Campbell Scientific AVW200 AVW200-series Vibrating Wire Interfaces - Page 96

H.1.2 Wireless/Sensors with Different Frequencies, AM16/32B multiplexers.

Page 96 highlights

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 Const B=.0002369 Const C=.0000001019 'Coefficients for Steinhart-Hart equation 'used to convert resistance to Temp '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

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112

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