4 cwb100rssi() instruction, 5 cwb100routes() instruction – Campbell Scientific Wireless Sensor Network (CWB100, CWS220, and CWS900) User Manual

Page 42

Advertising
background image

Wireless Sensor Network

in the array for program use regardless of the order in which the sensor was
discovered.

CRBasic instruction Fieldnames is used after each output instruction to provide
a unique output name to the values. If more than one output instruction is in
the DataTable and Fieldnames is omitted, a compiler error will be returned
indicating duplicate output names. If the compiler error is ignored and the
program sent to the datalogger, the datalogger may generate additional
compiler errors or it may accept the program but size the DataTable with fewer
fields than specified in the program. It is therefore good practice to put a
FieldNames instruction after each output instruction that utilizes ArrayIndex.

4.4 CWB100RSSI() Instruction

The CRBasic instruction CWB100RSSI is used to trigger a round of RSSI
(signal strength) polling of each sensor in the network. The RSSI values will
be returned along with other data in the next measurement cycle. If RSSI
polling is never triggered, the RSSI field associated with each sensor will
always return NAN. The instruction has the following format:

CWB100RSSI ( Port )

Port: The Port parameter is a constant indicating the control port (C1, C3, C5,
or C7) to which the CWB100 Data line is connected.

The CWB100RSSI() instruction should not be executed as often as the
CWB100() instruction polls the sensors. This is because it requires an
additional RF polling cycle to measure the RSSI from the sensors, which
decreases battery life and scan rate (see Section 3.5).

4.5 CWB100Routes() Instruction

The CRBasic instruction CWB100Routes is used to view the routes used by
various wireless sensors to transmit their data to the CWB100 base station.
The instruction returns the sensor serial number, the sensor name and any hops
to the base for each wireless sensor in the network. A hop is a sensor's link
through a routing sensor back to the wireless base. The hop is also specified as
sensor serial number sensor name. The format of the returned string is:

RadioID SensorName Hop1 Hop2 Hop3

The path specified by Hop1 Hop2 Hop3 is the path from the sensor back to the
base (the base would be after Hop3). If a sensor transmits directly to the base
with no hops, only the RadioID and SensorName will be returned. The
information for each sensor is terminated by a carriage return/line feed.

This instruction does not trigger any additional communication to the sensors
in the wireless sensor network, and thus, does not affect power consumption of
the sensors.

The instruction has the following format:

CWB100Routes ( Port, Routes )

34

Advertising