Campbell Scientific Sonic SR50A Manuel D'utilisation page 54

Table des Matières

Publicité

Capteur de télémétrie sonique SR50A
'Declare the initial distance of the SR50AT from the ground in meters:
Const
Initial_Distance=2.5
'Define Data Tables
DataTable
(Table1,True,-1)
DataInterval
(0,60,Min,10)
Sample
(1,Snow_Depth,FP2)
EndTable
'Main Program
BeginProg
'Open RS232 port for communications 9600 BAUD is the default:
SerialOpen
(Com1,9600,0,0,2000)
Scan
(10,Sec,0,0)
'Measure the SR50A:
'Transmit serial command "p33<CR>"
SerialOut
(Com1,"p33"+chr(13),"",0,0)
'Flush the serial buffer
SerialFlush
(Com1)
'Recieve serial string from SR50A
SerialIn
(SR50AData,Com1,200,13,50)
SplitStr
(ParseVals,SR50AData,"",6,0)
'Subtract the corrected distance from the initial distance of the SR50A to the ground:
Snow_Depth=Initial_Distance - Dist_To_Snow
'Call Data Table and Store Data:
CallTable
(Table1)
NextScan
EndProg
- 52 -

Publicité

Table des Matières
loading

Ce manuel est également adapté pour:

Sonic sr50at

Table des Matières