User's Manual

Table Of Contents
PL-611 IQ Radar 300 Page 85
Communications
Communications
Communications
Communications
Communications: Data Types
The IQ Radar 300 parameters do not always use integers to hold values. For the
convenience of the programmer, those values are converted to and from a 16-bit integer
number. This section describes the conversion process.
Numeric Values
Numeric parameter values are the most common. For example, parameter P920
(Reading) returns a number that represents the current reading (either level or volume,
depending on the IQ-300 configuration).
Numeric values are requested or set in units or percent of span, and may be specified
using a number of decimal places.
Numeric values must be in the range -20,000 to +20,000 to be valid. If a parameter is
requested and its value is more than +20,000, the number 32,767 is returned; if it is less
than -20,000, the number -32,768 is returned. If this overflow happens, decrease the
number of decimal places.
If a parameter cannot be expressed in terms of percent of span, or has no meaningful
value, the number 22,222 is returned. Try requesting the parameter in units, or refer to
the Parameter Description section on page 55 for an explanation of the format and use
of the requested parameter.
Split Values
Certain parameters are actually a pair of numbers separated by a colon, using this
format: xx:yy.
One example is P807 (Transducer Noise) where:
xx = the average noise value in dB.
yy = the peak noise in dB.
The number which corresponds to xx:yy, for either reading or setting a parameter,
is determined by the following formula:
For storing to the device:
value = (xx + 128) x 256 + (yy + 128)
For reading from the device:
xx = (value / 256) – 128
yy = (value % 256) – 128
Where:
% is the modulus operator.
The modulus can be computed by following these steps: