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).
7.7.2 SDI-12 programmed mode/recorder mode
The datalogger 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 datalogger 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 datalogger 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 datalogger
issues the
aM!
and
aD0!
commands with proper elapsed time between the two. The datalogger
automatically issues retries and performs other services that make the SDI-12 measurement work
as trouble free as possible.
For troubleshooting purposes, responses to SDI-12 commands can be captured in programmed
mode by placing a variable declared
As String
in the variable parameter. Variables not
declared
As String
will capture only numeric data.
7.7.3 Programming the datalogger to act as an SDI-12
sensor
The
SDI12SensorSetup()
/
SDI12SensorResponse()
instruction pair programs the
datalogger to behave as an SDI-12 sensor. A common use of this feature is to copy data from the
datalogger to other Campbell Scientific dataloggers over a single data-wire interface (terminal
7. Communications Protocols
96
Содержание CR1000X
Страница 1: ...Revision 02 21 2019 Copyright 2000 2019 Campbell Scientific ...
Страница 2: ......
Страница 4: ......
Страница 6: ......
Страница 8: ......
Страница 16: ...Appendix A Glossary 176 Appendix B Index 214 Table of Contents viii ...
Страница 20: ...l Smart sensors o SDI 12 o RS 232 o Modbus o DNP3 o TCP IP o RS 485 1 Data acquisition system components 4 ...
Страница 192: ......
Страница 237: ...wiring panel 5 Appendix B Index 220 ...