- 31 -
ADVANCED TOPICS
INTERNAL ERROR HANDLING
In order to maximize data integrity, and provide useful information to the user, the
data logger keeps track of data errors as best it can. These errors are carried
through intermediate calculations so that stored data is marked appropriately if it is
bad.
The errors that are recognized are as follows:
Missing sensor
Bad response from sensor (not enough SDI parameters returned)
Over range
Under range
Divide by zero
These are all carried through intermediate calculations with variables. As an
example, if you were reading the air temperature, whose native form is in degrees C,
and converting to Fahrenheit for storage, you might have a calculation that looked
like: FTemp=(Temp*9/5)+32; If the sensor is removed, then when the variable
FTemp is logged, the error code for Missing sensor will be stored in place of the
data. If there are multiple errors (such as a Divide by zero that results from an
intermediate calculation having a bad value because of the missing sensor) then
their priority is as shown in the above list, with the highest priority first.
This can cause problems if not used carefully. For example, the calculation of an
average will fail if even one of the values is bad. This can be tested for using the
command:
ERR(name)
This command returns an error code that can be used for testing the validity of a
variable or sensor:
IF(ERR(name)==0)
// Check validity of data in name variable
{
// This is executed if there are no errors
}
ELSE
{
\\ This is executed if there was any error
}
The error codes returned are defined as follows:
0
no errors
1
sensor error (SDI sensor responded, but not enough data in
response)
2
missing sensor
3
under range value
4
over range value
5
division by zero
6
other errors
The data logger cannot detect a missing rain gauge but can detect a missing SDI
sensor. In the case of SDI sensors, it may not be possible to detect if two sensors
are set to the same address, depending on how the sensors behave under these
conditions. With SDI sensors, some sensors return unusual readings as error
Summary of Contents for HDL1
Page 1: ...HDL1 HDL1 G5 Data Logger Operating Manual...
Page 2: ......
Page 8: ...iv THIS PAGE INTENTIONALLY LEFT BLANK...
Page 12: ...4 THIS PAGE INTENTIONALLY LEFT BLANK...
Page 20: ...12 THIS PAGE INTENTIONALLY LEFT BLANK...