2 nan and ±inf, 1 measurements and nan, 1 voltage measurements – Campbell Scientific CR200/CR200X-series Dataloggers User Manual
Page 165: 2 sdi-12 measurements, 2 floating point math, nan, and ±inf, Crbasic example 21. using nan in expressions

Section 18. Troubleshooting
18.1.2 NAN and ±INF
NAN (not-a-number) and ±INF (infinite) are data words indicating an
exceptional occurrence in CR200(X) function or processing. NAN is a constant
that can be used in expressions such as in
CRBASIC EXAMPLE. Using NAN in
Expressions
(p. 153) NAN can also be used in the disable variable (DisableVar)
in output processing (data storage) instructions, as indicated in
CRBASIC
EXAMPLE. Using NAN in Expressions
p. 153.
CRBASIC EXAMPLE 21.
Using NAN in Expressions
If WindDir = NAN Then
WDFlag = True
Else
WDFlag=False
EndIf
18.1.2.1 Measurements and NAN
A NAN indicates an invalid measurement.
18.1.2.1.1
Voltage Measurements
The CR200(X) measures voltage inputs ranging from 0 to 2500 mV. Input
signals that exceed this ranges result in an over range indicated by a NAN for
the measured result. A voltage input not connected to a sensor is floating and
the resulting measured voltage often remains near the voltage of the previous
measurement. Floating measurements tend to wander in time, and could
temporarily impersonate a valid measurement.
18.1.2.1.2
SDI-12 Measurements
SDI-12 Measurements
NAN is loaded into the first SDI12Recorder () variable under these conditions:
•
When busy with terminal commands.
•
When the command is an invalid command.
•
When the sensor aborts with CR LF and there is no data.
18.1.2.2 Floating Point Math, NAN, and ±INF
TABLE. Math Expressions and CRBASIC Results
(p. 154) lists math
expressions, their CRBASIC form, and IEEE floating point math result for the
CR200(X).
153