Nan And Inf - Campbell CR300 Series Operator's Manual

Hide thumbs Also See for CR300 Series:
Table of Contents

Advertisement

CR300-Series Datalogger
9.3

NAN and INF

54
2.
Check wires and cables for the following:
a.
Incorrect wiring connections. Make sure each sensor and device
are wired to the channels assigned in the program. If the program
was written in Short Cut, check wiring against the generated
wiring diagram. If written in CRBasic Editor, check wiring
against each measurement and control instruction.
b.
Loose connection points
c.
Faulty connectors
d.
Cut wires
e.
Damaged insulation, which allows water to migrate into the
cable. Water, whether or not it comes in contact with wire, can
cause system failure. Water may increase the dielectric constant
of the cable sufficiently to impede sensor signals, or it may
migrate into the sensor, which will damage sensor electronics.
3.
Check the CRBasic program. If the program was written solely with Short
Cut, the program is probably not the source of the problem. If the program
was written or edited with CRBasic Editor, logic and syntax errors could
easily have crept into the code. To troubleshoot, create a stripped-down
version of the program, or break it up into multiple smaller units to test
individually. For example, if a sensor signal-to-data conversion is faulty,
create a program that only measures that sensor and stores the data, absent
from all other inputs and data. Write these mini-programs before going to
the field, if possible.
NAN (not a number) and INF (infinite) are data words indicating an
exceptional occurrence in datalogger function or processing. INF indicates that
the program has encountered an arithmetic expression that is undefined.
A NAN indicates an invalid measurement. NANs are expected in the following
conditions:
Input signals exceed the voltage range chosen for the measurement.
An invalid SDI-12 command is sent
An SDI-12 sensor does not respond or aborts without sending data
Undefined arithmetic expressions, such as 0 ÷ 0.
NAN is a constant that can be used in expressions. This is shown in the
following code snip that sets a CRBasic control feature (a flag) if the wind
direction is NAN:
If
WindDir = NAN
Then
WDFlag = False
Else
WDFlag = True
EndIf
If a NAN is included in the values being processed, NAN will be stored. Note
that since there is no such thing as NAN for integers, values that are converted
from float to integer will be expressed in data tables as the most negative
number for a given data type. For example, the most negative number of data

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr300-rf407Cr300-rf412Cr300-rf422

Table of Contents