![Campbell SDMS40 Скачать руководство пользователя страница 32](http://html1.mh-extra.com/html/campbell/sdms40/sdms40_product-manual_3916973032.webp)
CRBasic Example 1: CR1000X SDI-12 program to measure the SDMS40
'**************************************************************************
' Main Program
'**************************************************************************
BeginProg
Scan
(10,Sec,5,0)
PanelTemp
(PTemp,_60Hz)
Battery
(batt_volt)
CallTable
Diagnostic
' The user's programming for other sensors would go here in the main scan
NextScan
SlowSequence
Scan
(SDMS40_Interval,min,5,0)
If
Calibrate_Flag = true
Calibrate_Flag = false
Call
CalibrateSensors
Else
' Measure average snow depth
SDI12Recorder
(Snow_Depth_Avg,SDI12_PORT1,0,
"M!"
,1.0,0,-1,1)
' Returning SDMS40 36 snow Depth Points by sending 0D1! thru 0D8! commands
SDI12Recorder
(SDMS40_Snow_Depth_Points(1) ,SDI12_PORT1,0,
"D1!"
_
,1.0,0,-1,1)
SDI12Recorder
(SDMS40_Snow_Depth_Points(6) ,SDI12_PORT1,0,
"D2!"
, _
1.0,0,-1,1)
SDI12Recorder
(SDMS40_Snow_Depth_Points(11) ,SDI12_PORT1,0,
"D3!"
, _
1.0,0,-1,1)
SDI12Recorder
(SDMS40_Snow_Depth_Points(16) ,SDI12_PORT1,0,
"D4!"
, _
1.0,0,-1,1)
SDI12Recorder
(SDMS40_Snow_Depth_Points(21) ,SDI12_PORT1,0,
"D5!"
, _
1.0,0,-1,1)
SDI12Recorder
(SDMS40_Snow_Depth_Points(26) ,SDI12_PORT1,0,
"D6!"
, _
1.0,0,-1,1)
SDI12Recorder
(SDMS40_Snow_Depth_Points(31) ,SDI12_PORT1,0,
"D7!"
, _
1.0,0,-1,1)
SDI12Recorder
(SDMS40_Snow_Depth_Points(36) ,SDI12_PORT1,0,
"D8!"
, _
1.0,0,-1,1)
EndIf
CallTable
(SnowDepth)
SDMS40 Multipoint Scanning Snowfall Sensor
26