User's Manual

Serial communication protocol
PC
DESCRIPTION: This command configures the physical channels, which are the input stage of the
data acquisition system. The physical channel descriptors contain verifiers,
conversion parameters for converting measured values into engineering units and
the hardware parameters needed for the actual sampling of the data.
PARAMETERS: PC <pnr> <modemask> <lowerverifier> <upperverifier> <n>
<a(0)> <a(n)> <chantype> <address> <parameters>
<pnr> — Physical channel number
<modemask> — See section 3.5.3.2
<lowerverifier>: — Lowest allowed value (float value or - for no verifier)
<upperverifier>: — Highest allowed value (float value or - for no verifier)
<n>: — The number of parameters used for the conversion (the current maximum
is two). When <n> is zero, no conversion at all is done. When <n> is 1, then a
table based conversion is done. Thus the meanings of <n> are:
0: no conversion,
1: table conversion (<a(0)> specifies the number of the table to be used),
2: linear conversion.
<a(0)>, <a(1)>: — Floating point parameters for the conversion function,
where <a(0)> is an offset, while <a(1)> is the factor (k * x + d). For analog-
to-digital channels, these two values denote the lower and upper threshold for the
analog to digital conversion (default 30% and 70% of full scale). These parameters
are applied to the raw values of the sampled data (e.g. to analog values in the
range from 0 (or slightly less) to 8191). If <n> is 1, then the one parameter
(<a(0)>) is the number of the conversion table for the table based conversion.
Currently there are 3 of those tables:
0: Gypsum Block Sensor Table
1: Leaf Wetness Sensor Table
2: Watermark Soil Moisture Sensor Table
which can be used for the corresponding sensors.
Note: For table based conversions the verifiers are applied before the conversion takes
place (i.e., they are applied to the raw values).
<address>: — consists of [module.]port, where
module: omitted for base device, 1..3 for first to third expansion module
port: port name as indicated on the devices top (AIN1..AIN8 or DIN1..DIN4
on base device and AIN1..AIN8 on expansion boards)
<chantype>: — This parameter gives the type of the channel and also indicates
which parameters are needed:
0: Analog channel with parameters <range> <address> <spt>
The ADC gives values in the range from 0 to 8191 (0V or 0mA give 0, the
max. value of the selected range gives 8191, so 20mA give 8191, too).
Assume a level sensor, which delivers a signal from 0V to 2.5V and 0V (or
0) is a level of 1 meter and 2.5V (or 8191) is a level of 5 meter. Thus the
conversion formula is:
45