16
Examples
To configure M5 to measure the ratio of the AN2 voltage to Vref, with all other parameters set to
factory default, use
1XR5+2+FD!
Which will configure the M5 command in the module at SDI-12 address “1” to measure the ratio of
the AN2 voltage to Vref with the factory defaults of: slope=1.00, offset=0, Averaging-
time=0.067seconds, Vref-warm-up-time=0.010 seconds, no switched voltage, un-buffered input and
auto-gain.
If M5 is currently set to measure something other than Ratio, then
1XR5+2! is equivalent to 1XR5+2+FD!
Note:
An „FD‟ except in place of reference channel is invalid, i.e.
1XR5+FD! or
1XR5+2+3+FD! or
1XR5+2+3+2.0+FD!
are all invalid commands
To set M5 to measure the ratio of the AN2 voltage to the AN4 voltage with a switched voltage of 5
volts and all other parameters set to factory default, first use
1XR5+2+FD! and then
1XR5+X+4+X+X+X+X+5! (or 1XR5+2+4+X+X+X+X+5!)
All except the 2
nd
parameter as „X‟. „X‟ means “leave the parameter unchanged” (factory default in
this example).
Note:
Using 1XR5+2+4+X+X+X+X+5! instead of the sequence of two commands shown above, will also
do the same but the parameters substituted by „X‟ may or may not be factory defaults. It depends on
what the M5 command is programmed for prior to this set-up. If M5 is set for something other than
Ratio, then parameters substituted by „X‟ will be default Ratio-measurement parameters.
If M5 is set to measure Ratio and you need to change just few parameters, say Vref-warm-up time to
30 milli-seconds, use
1XR5+X+X+X+X+X+0.03!
Verification and Reading current Set-up
There are 3 options to read set-up
1.
aD0 command after XR command
2.
aXRm (1XR5! in our examples) command
3.
aXGm and aXGm+2 commands (1XG5! and 1XG5+2! in our examples)
All of the different kinds of set-up commands return
a0027<CR><LF> , where a is the address of SDI-12 AnalogPlus module (10027<CR><LF> in our
examples)
This means it will return 7 parameters on a successive D0 command after 2 seconds. The response to
D0 is
a+s+o+t+v+w+x+g<CR><LF>
(the characters in lower-case have the same meaning as mentioned above).
You won‟t see channel information and input type because SDI-12 command D0 can not return an
alphabetic character. To interrogate the channel set-up of the Ratio measurement on M5, you may
use the
aXR5!
Command which returns
a+p+n+s+o+t+v+i+g<CR><LF> or