Campbell Scientific Sonic SR50A Manuel D'utilisation page 51

Table des Matières

Publicité

'Main Program
BeginProg
Scan
(60,Sec,0,0)
PanelTemp
(PTemp,250)
Battery (Batt_volt)
'Once installed enter the actual distance from the SR50AT to the Ground with
'no snow present. If in doubt it is better to use a slightly larger value
'than a smaller value. Errors in the value will show up as an offset error
'in the snow depth values
'If a new value for the variable NewDistanceToGround is entered (non zero)
'The following code will send that value to the SR50AT.
If
NewDistanceToGround > 0.0
'Convert the floating point value to a text string for the SDI-12 command
XtendedDistValStr =
'To send the Distance to ground (in meters) value to the SR50A the
'SDI-12 extended command is as follows:
'aXDM.MMM!- where D.DDD is the value such as 2.345 Meters
SDI12commandstring
'Send out the SDI-12 command to the sensor
SDI12Recorder
'Read back the Distance to Ground value in the SR50A to confirm
SDI12Recorder
'If the Sensor is present confirm the value was sent correctly
'Never use more than 3 deciaml places of precision for the new value
If
ExtendedCMDResult = 1.0
'Reset the value so that no more attempts will be made to update the
'Distance to Ground value.
NewDistanceToGround = 0.0
'Read back the Distance to Ground value from the SR50A to confirm.
'This is not necessary but recommended.
SDI12Recorder
EndIf
EndIf
'Read the Snow depth from the SR50A "M4!" command returns depth with
'quality and temperature
SDI12Recorder
(SR50AReturnValues,1,0,"M4!",1.0,0)
'Call Output Tables
'Example:
CallTable
Test
NextScan
EndProg
then
FormatFloat
(NewDistanceToGround,"%4.3f")
= "XM;" + XtendedDistValStr + "!"
(ExtendedCMDResult,1,0,SDI12commandstring,1.0,0)
(SR50ADistanceToGround,1,0,"R0!",1.0,0)
then
(SR50ADistanceToGround,1,0,"R0!",1.0,0)
- 49 -
Capteur de télémétrie sonique SR50A

Publicité

Table des Matières
loading

Ce manuel est également adapté pour:

Sonic sr50at

Table des Matières