Campbell Scientific SR50-L CSC Ultrasonic Distance Sensor User Manual
Page 13
![background image](/manuals/416106/13/background.png)
SR50 Sonic Ranging Sensor
7
Probe is used and that the SR50 SDI-12/DATA Bus is wired to control port 1
(see Figure 2).
This program is similar to that used on a CR23X.
;{CR10X}
;
*Table 1 Program
01: 60
Execution
Interval
(seconds)
; Measure the 107 temperature probe.
1: Temp (107) (P11)
1: 1
Reps
2: 1
SE
Channel
; S.E. Chan #1 used for this example
3: 1
Excite all reps w/E1
; Excite Chan #1 used for this example
4: 1
Loc [ T_KELVIN ]
5: 1
Mult
6: 273.15 Offset
; This converts the value to degrees Kelvin.
; Measure the SR50 using code ‘1’ for parameter 2. This will cause the SR50 to measure the
distance to target (in meters) and provide a measurement quality number.
2: SDI-12 Recorder (P105)
1: 0
SDI-12
Address
2: 1
Start
Measurement
(aM3!)
; <<< code ‘1’ is used (SEE TABLE 1).
3: 1
Port
; Control Port 1 used for this example.
4: 2
Loc [ DEPTH ]
; Two input locations are used. One for distance and
5: -1
Mult
; one for measurement quality.
6: 0
Offset
; Instruction 105 initiates the measurement using the "0" command in Parameter 2. The single value
; returned to Input Location 2 is the distance to the surface in meters. A multiplier of -1 is used
; because the distance to target value will be subtracted from the distance to ground value to obtain
; snow depth (see 8th instruction).
; The next four instructions apply temperature compensation to the distance value.
3: Z=F x 10^n (P30)
1: 273.15 F
2: 0
n, Exponent of 10
3: 4
Z Loc [ REF_TEMP ]
4: Z=X/Y (P38)
1: 1
X Loc [ T_KELVIN ]
2: 4
Y Loc [ REF_TEMP ]
3: 5
Z Loc [ MULT ]
5: Z=SQRT(X) (P39)
1: 5
X Loc [ MULT ]
2: 5
Z Loc [ MULT ]