Instructions
UM-0085-B09 DT80 Range User Manual Page 345
RG
Rnnn Settings
Some sample settings for the Rnnn channel option are shown below:
Option
Data Value (Register) to Read
(none)
First data value in default register set (register set #0)
R001 (or R1)
First data value in default register set (register set #0)
R019
(or
R19
)
19
th
data value in default register set (register set #0)
R100
not valid
R101
First data value in register set #1
R344
44
th
data value in register set #3
For example, suppose a particular SDI-12 device measures 9 different quantities in one go (i.e. it has 9 registers in its
default register set). These 9 values would then be returned to the data logger using an exchange of messages similar to
the following (underlined text is sent by the data logger, the remainder is returned by the sensor):
0D0!0+005.7541+068.0368+017.6721+054.3521+052.0475+016.2069+017.1182+016.8696
0D1!0+019.1727
These 9 register values can then be accessed using 5SDI12(R1) through 5SDI12(R9). So if you were interested in
the third value in the list you would use:
5SDI12(R3)
5SDI12 17.7
As can be seen, the third value returned by the sensor (+017.6721) is the return value of the channel.
Example
Measure on Demand
In this example, the documentation for a hypothetical SDI-12 weather station states: "Send the aC1! (or aM1!)
command to measure (1) internal temperature (degC), (2) external temperature, (3) humidity (%RH) and (4) pressure
(hPa). Send the aC2! (or aM2!) command to measure (1) wind speed (km/h), (2) max gust and (3) direction (degrees)".
The device is connected to the DT80 using digital I/O 7D, and has been configured with an SDI-12 address of 3.
In this case the device has two register sets (#1 and #2), one with four registers (measured quantities), one with three.
The following DT80 job will read and log external temperature, pressure and wind speed every two minutes:
BEGIN"CLOUDY"
RA2M 7SDI12(AD3,R102,"Ext temp~degC")
7SDI12(AD3,R104,"Pressure~hPa")
7SDI12(AD3,R201,"Wind speed~km/h")
LOGON
END
Note: If your sensor supports both the aMn! and the newer aCn! SDI-12 commands (most modern sensors will) then be sure to refer
to the section on the a
Cn! command in the sensor documentation when determining which register numbers to use. These two SDI-12
commands do much the same thing but the ordering of the returned data values may be different. The DT80 always uses the a
Cn!
command in preference to a
Mn!.
Continuous Measurements
The weather station documentation goes on to say "To enable continuous measurement mode (sampling every t
seconds), use the aXC=t! command; to disable use aXCD!. [SDI-12 "X" commands are often used to implement device
specific functions such as this.] Use a
R1! and aR2! to return the most recent values of int temp/ ext temp/ RH/ pressure
and wind speed/ gust/ direction respectively”.
The following job does the same thing as the previous example, but this time continuous measurement mode is used:
BEGIN"CLOUDY_CM"
SDI12SEND 7 "3XC=10!" ' enable continuous mode
RA2M 7SDI12(AD3,R102,CM,"Ext temp~degC")
7SDI12(AD3,R104,CM,"Pressure~hPa")
7SDI12(AD3,R201,CM,"Wind speed~km/h")
LOGON
END