22
The SDI-12 -command
1XQ4+0+0.2!
will set the current level as the reference level, set a scale-factor of 0.003048 and a measurement time of 2
seconds. Therefore, if wheel is 1ft (0.3048 meter) in circumference and one rotation gives 100 quadrature
counts, the resolution will be 3.048mm and 3.281 rotations of wheel will give 1 meter change in level. On
receiving an M4 command, the SDI module at address 1 will take 20 readings over 2 seconds, sending the
1D0! will then return the average, minimum, and maximum level followed by the status byte.
Offset
Offset is the value of level at the time of measurement set-up with respect to reference-level. If you have
configured just one measurement (which will normally be the scenario), the offset can be set/modified
through the SDI-12 extended command
aXQOo! (e.g. 0XQO-1.0!)
If you have configured more than one quadrature measurement, say M3 for current level and M4 for average
level, you can set the offset through the SDI-12 extended command
aXQm+o! (e.g. 0XQ4-1.0!)
Using aXQO-1.0 in later scenario will change the offset for M3 measurement, not for M4, i.e. whichever is
the first one from M1 through M9.
Scale-Factor
Scale factor is used to convert quadrature counts into desired units, in other words, it‟s the least count of
measurement.
Scale-Factor = Wheel-circumference / Counts-in-1-rotation
For example, if shaft wheel is 1ft in circumference and one complete rotation gives 100 quadrature counts,
Scale-Factor = 1/100
= 0.01
In order to get the result(s) in metric units with the same wheel,
Scale-Factor = 0.3048/100
= 0.003048, i.e. one count is equal to 3.048mm.
If you have configured just one measurement (which will normally be the scenario), Scale-factor can be
set/modified through SDI-12 extended command
aXQSs! (e.g. 0XQS-0.01!)
If you have configured more than one quadrature measurement, say M3 for current level in feet and M4 for
average level in meters, you can set scale-factor through SDI-12 extended command
aXQm+X+s! (e.g. 0XQ4+X-0.003048!)
where 2
nd
„X‟ is in uppercase and means “don‟t care” and sign before „s‟ can be plus or minus depending
upon required direction. Using 0XQS-0.003048 in later scenario will change the scale-factor for M3
measurement, not for M4, i.e. whichever is the first one from M1 through M9.
Direction of Rotation
The direction of the level measurement can be changed by swapping the wires on DIN and AN4 or by
changing the sign of the scale.