- 32 -
indicators. These will often be caught by the Over range and Under range
messages. This behavior depends on the sensor manufacturer.
TIME FUNCTIONS AND TIME BUILTINS
When a timer expires, its time of expiry is saved. Any time function or built-in used
during the execution of the timer block accesses the saved time, not the current time.
This means that time delays due to slow sensors (such as SDI) have no effect on the
accuracy of time difference calculations
a time function or built-in will return the
same value whether used before or after the slow sensor.
WHEN ARE SENSORS READ?
Within a timer block, the first occurrence of a sensor name is when it is read. The
read value is stored internally and reused within that block whenever the same name
is encountered. This means that the values won t change because of differences
between successive sensor readings. It also reduces SDI bus traffic, thus speeding
up the data logger response and also lowers the average power consumption.
CARRYING SENSOR READINGS BETWEEN TIMER BLOCKS
If the timers all trigger at the same time (such as one reading every minute and
another every hour), then on the hour, the minute sensor data will be used for both
timers, with only one reading of the sensor.
If the timers have timed out at different times, then the sensor will be read again.
If you want to carry a sensor reading forward to another timer block that does not
occur in synchronization, use a variable to hold the value.
NON-REGULAR LOGGING
Although the main focus of the data logger is the regular periodic storage of data, it is
possible to log data only when specific conditions are met.
The first thing that must be recognized is that a timer must be set up to read the
sensor periodically, even if the value is not to be logged. This is because the SDI
protocol does not allow sensors to automatically send readings to the data logger --
the data logger must go out and read them to get a value. This value is then
examined and a decision made whether to store it or not. The following example only
stores turbidity data if it is above a certain threshold.
{
// initialization block
Thresh = 50;
// only log if turbidity > 50ntu
}
EVERY 3600
// check value hourly
{
IF(Turb > Thresh)
// read sensor and compare to threshold
{
LOG(Turb);
// was higher, so log turbidity
}
}
It is possible to get considerably more complex -- for example, triggering a water
sampler whenever the turbidity crosses certain thresholds, but ignoring the changes
inside the thresholds.
Another use is to log data only when it changes -- this saves storage if the readings
tend to be stable for long periods of time.
Содержание HDL1
Страница 1: ...HDL1 HDL1 G5 Data Logger Operating Manual...
Страница 2: ......
Страница 8: ...iv THIS PAGE INTENTIONALLY LEFT BLANK...
Страница 12: ...4 THIS PAGE INTENTIONALLY LEFT BLANK...
Страница 20: ...12 THIS PAGE INTENTIONALLY LEFT BLANK...
Страница 42: ...34 THIS PAGE INTENTIONALLY LEFT BLANK...