4. In response, the query
Select SDI12 Port:
is presented with a list of available ports.
Enter the port number assigned to the terminal to which the SDI-12 sensor is connected,
and press Enter.
5. In answer to
Enter timeout (secs):
type
100
and press Enter.
6. In response to the query
ASCII (Y)?
, type
Y
and press Enter.
7. SDI-12 communications are then opened for viewing.
15.6.1.1 SDI-12 transparent mode commands
SDI-12 commands and responses are defined by the SDI-12 Support Group (
) and
are available in the
. Sensor manufacturers determine which commands to
support. Commands have three components:
l
Sensor address ( a): A single character and the first character of the command. Sensors are
usually assigned a default address of zero by the manufacturer. The wildcard address ( ?) is
used in the
Address Query
command. Some manufacturers may allow it to be used in
other commands. SDI-12 sensors accept addresses 0 through 9, a through z, and A through
Z.
l
Command body (for example, M1): An upper case letter (the “command”) followed by
alphanumeric qualifiers.
l
Command termination ( !): An exclamation mark.
An active sensor responds to each command. Responses have several standard forms and
terminate with
<CR><LF>
(carriage return–line feed).
15.6.2 SDI-12 programmed mode/recorder mode
The data logger can be programmed to read SDI-12 sensors or act as an SDI-12 sensor itself. The
SDI12Recorder()
instruction automates sending commands and recording responses. With
this instruction, the commands to poll sensors and retrieve data is done automatically with
proper elapsed time between the two. The data logger automatically issues retries. See CRBasic
Editor help for more information on this instruction.
Commands entered into the
SDIRecorder()
instruction differ slightly in function from similar
commands entered in transparent mode. In transparent mode, for example, the operator
manually enters
aM!
and
aD0!
to initiate a measurement and get data, with the operator
providing the proper time delay between the request for measurement and the request for data.
In programmed mode, the data logger provides command and timing services within a single
line of code. For example, when the
SDI12Recorder()
instruction is programmed with the
M!
command (note that the SDI-12 address is a separate instruction parameter), the data logger
issues the
aM!
and
aD0!
commands with proper elapsed time between the two. The data logger
15. Communications protocols
100