Appendix H. Additional Programming Examples
'Assign coeficients listed in CoefString2 to individual variables
For i = 1 To 16
SplitStr
(PolyCoef2(3*i-2),CoefString2(i),",",3,5)
Next
i
Scan
(2,Min,0,0)
PanelTemp
(PTemp,250)
Battery
(Batt_volt)
AVW200(VWResults(1),ComRS232,0,15,Mux1(1,1),1,1,16,1000,2500,2,_60Hz,1,0)
For i = 1 To 16
Amp1(i)
=
Mux1(i,2)
Therm1(i)
=
Mux1(i,6)
VWFreq1(i) =
Mux1(i,1)
Sig2Noise1(i) =
Mux1(i,3)
DecayRatio1(i)
=
Mux1(i,5)
FreqOfNoise1(i)
=
Mux1(i,4)
Digits = (VWFreq1(i)/1000)^2 * 1000
'Convert frequency to Digits
'Convert resistance to temp F.
Temp1(i) = (1/(A + B*LN(Therm1(i)) +C*(LN(Therm1(i)))^3)-273.15)*1.8+32
'Calculate displacement (inches) from Digits and calibration polynomial
Displacement1(i)=PolyCoef1(3*i-2)*Digits^2 + PolyCoef1(3*i-1)* PolyCoef2(3*i)
Next
i
AVW200(VWResults(2),ComRS232,0,15,Mux2(1,1),2,1,8,1000,2500,2,_60Hz,1,
0)
AVW200(VWResults(2),ComRS232,0,15,Mux2(9,1),2,9,8,450,6500,2,_60Hz,1,0)
For i = 1 To 16
Amp2(i)
=
Mux1(i,2)
Therm2(i)
=
Mux1(i,6)
VWFreq2(i)
=
Mux1(i,1)
Sig2Noise2(i) =
Mux1(i,3)
DecayRatio2(i)
=
Mux1(i,5)
FreqOfNoise2(i)
=
Mux1(i,4)
Digits = (VWFreq2(i)/1000)^2 * 1000
'Convert frequency to Digits
'Calculate displacement (inches) from Digits and calibration ploynomial
Displacement2(i)=PolyCoef2(3*i-2)*Digits^2 + PolyCoef2(3*i-1)* PolyCoef2(3*i)
'Convert resistance to temp F.
Temp2(i) = (1/(A + B*LN(Therm2(i)) + C*(LN(Therm2(i)))^3)-273.15)*1.8+32
Next
i
CallTable
MuxExample
NextScan
EndProg
H-3
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: ......