Campbell Scientific AVW200-series Vibrating Wire Interfaces User Manual
Page 54

AVW200-series 2-Channel Vibrating Wire Spectrum Analyzer Modules
CallTable avw200
CallTable avwcard
NextScan
EndProg
7.1.2 Wireless/One Sensor/Resistance Converted to Temperature
'This is an example of a program used by a CR1000 and AVW206 to one Geokon 4450 VW
'displacement sensor. The 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 4450 sensor. The coefficients used to convert resistance to
'temperature are from the Steinhart-Hart equation.
'The CR1000 communicates with the remote AVW206 through an RF401 radio attached to the
'logger's CS/IO port in SDC7 mode.
'The Pakbus address of the AVW206 used in this example is 15.
'
Public batt_volt,Ptemp
Public VWvalues(6)
Public VWResults
Public Psi,Temp
Alias VWvalues(1) = Freq
Alias VWvalues(2) = Amp
Alias VWvalues(3) = Sig2Noise
Alias VWvalues(4) = NoiseFreq
Alias VWvalues(5) = DecayRatio
Alias VWValues(6) = Therm
Dim Digits
Dim ZeroRding(32)
'Below are coefficients for Steinhart-Hart equation used to convert 'resistance to Temp
Const A=.0014051
Const B=.0002369
Const C=.0000001019
BeginProg
Scan (10,Sec,0,0)
PanelTemp (PTemp,250)
Battery (Batt_volt)
AVW200(VWResults,ComSDC7,0,15,VWvalues(1),1,1,1,1000,2500,2,_60Hz,1,0)
Digits = (Freq/1000)^2 * 1000
'Convert frequency to Digits
'Convert resistance to temp F.
Temp = (1/(A + B*LN(Therm) + C*(LN(Therm))^3)-273.15)*1.8+32
46