Timekeeping - Campbell CR300 Series Product Manual

Compact datalogger
Hide thumbs Also See for CR300 Series:
Table of Contents

Advertisement

undefined arithmetic expression, such as 0 ÷ 0. NAN indicates an invalid measurement. For more
information, see
Tips and Tricks: Who's NAN?
NANs are expected in the following conditions:
 
Input signals exceed the voltage range chosen for the measurement.
l
 
An invalid SDI-12 command is sent.
l
 
An SDI-12 sensor does not respond or aborts without sending data.
l
NAN is a constant that can be used in expressions. This is shown in the following example code
that sets a CRBasic variable to False when the wind direction is NAN:
If
WindDir = NAN
   WDFlag = False
Else
   WDFlag = True
EndIf
If an output processing instruction encounters a NAN in the values being processed, NAN will be
stored. For example, if one measurement in a data storage interval results in NAN, then the
average, maximum and minimum will record NAN. However, because NAN is a constant, it can
be used in conjunction with the disable variable parameter (DisableVar) in output processing
instructions. Use variable = NAN in the DisableVar parameter to discard NANs from affecting
the other good values. The following example code discards NAN WindSpeed measurements
from the Minimum output:
Minimum
(1,WindSpeed,FP2,WindSpeed=NAN,False)
NOTE:
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 type FP2 is –7999; so, NAN for FP2 data will appear in a
data table as –7999. If the data type is Long, NAN will appear in the data table as –
2147483648.

22.3 Timekeeping

Measurement of time is an essential data logger function. Time measurement with the onboard
clock enables the data logger to run on a precise interval, attach time stamps to data, measure
the interval between events, and time the initiation of control functions. Details on clock accuracy
and resolution are available in the
the clock when the data logger is not externally powered. See
Then
System
specifications (p. 239). An internal lithium battery backs
.
Internal
battery (p. 162).
22. Tips and troubleshooting     172

Advertisement

Table of Contents
loading

Table of Contents