Exemple De Programmation 6; Cr1000 Mode Rs-232 Pour Le Sr50At - Campbell Scientific Sonic SR50A Manuel D'utilisation

Table des Matières

Publicité

'Flush the serial buffer
SerialFlush
(Com1)
'Recieve serial string from SR50A
SerialIn
(SR50AData,Com1,200,13,50)
SplitStr
(ParseVals,SR50AData,"",5,0)
'Measure the 107 temperature sensor:
Therm107
(Air_Temp,1,1,Vx1,0,250,1.0,0)
'Use Air_Temp to calculate corrected distance:
Temp_Corr_Distance=Raw_Distance*(SQR((Air_Temp+273.15)/273.15))
'Subtract the corrected distance from the initial distance of the SR50A to the ground:
Snow_Depth=Initial_Distance - Temp_Corr_Distance
'Call Data Table and Store Data:
CallTable
(Table1)
NextScan
EndProg

Exemple de programmation 6 :

10.6

CR1000 mode RS-232 pour le SR50AT

'CR1000 Series Datalogger
'In this example, the SR50AT is mounted 2.5 meters above the ground.
'The SR50AT is used in RS-232 mode (internal jumpers are set).
'The CR1000 sends a serial string to the SR50AT, which is in "Measure on Poll Mode",
'and then receives a serial string in return which is parsed into different values.
'Wiring: Black: Power Ground
'
clear: Power Ground
'
Red: +12V,
'
White:C1
'
Green:
'Declare Variables
'Declare SR50AData as a dimensioned string of maximum 50 chrs
Dim
SR50AData as STRING * 50
Public
ParseVals(6) as FLOAT
Alias
ParseVals(1)=SerialAddress
Alias
ParseVals(2)=Dist_To_Snow
Alias
ParseVals(3)=SignalQuality
Alias
ParseVals(4)=SR50AT_Temp
Alias
ParseVals(5)=Diagnostics
Alias
ParseVals(6)=Chcksum
Public
Snow_Depth
C2
- 51 -
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