Specifications
SR50A Sonic Ranging Sensor
10. Datalogger Program Examples
In the following datalogger program examples only the CR1000 and the
CR10X dataloggers are used. The programming of CR800, CR850 and the
CR3000 dataloggers are effectively the same as the CR1000. Also for a
CR23X datalogger refer to the CR10X programming examples.
10.1 Programming Example 1
SR50A SDI-12 “M1!” CR10X Datalogger
;{CR10X}
;
;In this example, the SR50A is mounted 2.5 meters above the ground.
;The CR10X sends an SDI-12 command to the SR50A, which outputs a
;non-temperature compensated distance value (Raw_Dist) and signal quality value.
;Two input locations are used to store incoming data.
*Table 1 Program
01: 60 Execution Interval (seconds)
;Measure the 107 temperature probe:
1: Temp (107) (P11)
1: 1 Reps
2: 1 SE Channel ;SE channel 1 used for this example
3: 1 Excite all reps w/E1 ;Excite channel 1 used for this example
4: 1 Loc [ T_Kelvin ]
5: 1.0 Multiplier
6: 273.15 Offset ;This converts the value to degrees Kelvin
;Use SDI-12 command "M1!" to receive Distance and Signal Quality from the SR50A
2: SDI-12 Recorder (P105)
1: 0 SDI-12 Address
2: 1 Start Measurement (aM1!)
3: 1 Port ;Use Ports 5-8 for CR23X
4: 3 Loc [ Raw_Dist ]
5: 1.0 Multiplier
6: 0.0 Offset
;Apply air temperature compensation to distance:
3: Z=F x 10^n (P30)
1: 273.15 F
2: 0 n, Exponent of 10
3: 5 Z Loc [ Ref_Temp ]
4: Z=X/Y (P38)
1: 9 X Loc [ T_Kelvin ]
2: 5 Y Loc [ Ref_Temp ]
3: 6 Z Loc [ Mult1 ]
5: Z=SQRT(X) (P39)
1: 6 X Loc [ Mult1 ]
2: 6 Z Loc [ Mult1 ]
26










