04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Section 10. Troubleshooting<br />

10.3.4 NAN and ±INF<br />

10.3.4.1 Measurements and NAN<br />

10.3.4.1.1 Voltage Measurements<br />

10.3.4.1.2 SDI-12 Measurements<br />

CRBasic EXAMPLE. Using NAN in Expressions<br />

the measurement and processing times in the Status table (MeasureTime,<br />

ProcessTime, MaxProcTime) for all scans, then try experimenting with the<br />

InstructionTimes() instruction in the program. Analyzing InstructionTimes()<br />

results can be difficult due to the multitasking nature of the logger, but it can be a<br />

useful tool for fine tuning a program.<br />

NAN (not-a-number) and ±INF (infinite) are data words indicating an exceptional<br />

occurrence in datalogger function or processing. NAN is a constant that can be<br />

used in expressions as shown in CRBasic example Using NAN in Expressions (p.<br />

428).. NAN can also be used in conjunction with the disable variable (DisableVar)<br />

in output processing (data storage) instructions as shown in CRBasic example<br />

Using NAN to Filter Data (p. 431).<br />

A NAN indicates an invalid measurement.<br />

The <strong>CR1000</strong> has the following user-selectable voltage ranges: ±5000 mV, ±2500<br />

mV, ±250 mV, ±25 mV, ±7.5 mV, ±2.5 mV. Input signals that exceed these<br />

ranges result in an over-range indicated by a NAN for the measured result. With<br />

auto range to automatically select the best input range, a NAN indicates that either<br />

one or both of the two measurements in the auto-range sequence over ranged. A<br />

voltage input not connected to a sensor is floating and the resulting measured<br />

voltage often remains near the voltage of the previous measurement. Floating<br />

measurements tend to wander in time, and can mimic a valid measurement. The<br />

C (open input detect/common-mode null) range-code option can be used to force<br />

a NAN result for open (floating) inputs.<br />

NAN is loaded into the first SDI12Recorder() variable under these conditions:<br />

• When busy with terminal commands.<br />

• When the command is an invalid command.<br />

• When the sensor aborts with CR LF and there is no data.<br />

CRBasic Example 68.<br />

Using NAN in Expressions<br />

If WindDir = NAN Then<br />

WDFlag = False<br />

Else<br />

WDFlag = True<br />

EndIf<br />

428

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!