Campbell Scientific AVW200 AVW200-series Vibrating Wire Interfaces - Page 93
Appendix H. Additional Programming Examples, H.1 AVW200-Controlled Multiplexer
View all Campbell Scientific AVW200 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 93 highlights
Appendix H. Additional Programming Examples H.1 AVW200-Controlled Multiplexer H.1.1 Direct RS-232 Connection 'This is an example of a program used by a CR1000 and AVW200 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. 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=.001403040 Const B=.000237318 Const C=.00000009 'Coefficients for Steinhart-Hart equation 'used to convert resistance to Temp 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-1