- 26 -
The t_IsLeap() function can be used in two different ways, as it returns both Boolean
and numeric values:
IF(t_IsLeap(2003))
Boolean (true/false usage)
IF(t_IsLeap(2003) == 0)
numeric usage
The numeric value is 0 if a leap year, 1 if not. The Boolean usage will be the most
commonly used form.
INITIALIZING VARIABLES
To initialize variables to known values before the timers start operation, include a
block of code inside curly braces. It must be after the sensor and variable definitions
and not part of a timer loop, but is usually placed before the timer loops for better
readability.
Example:
(Variables and sensors defined before this)
{
A=5;
TurbSampl = 10;
}
(Timers follow)
This sets the value of A to be 5, and TurbSampl to 10.
DEFINING SDI SENSORS
The general syntax for defining an SDI sensor is as follows:
SDI name:LowValue TO HighValue, units, SDI command, SDI data field
number;
For example:
SDI Turb1:0.0 TO 1800.0,NTU,1M1!,3;
What this means is:
The name for this reading is Turb1
The lowest allowed value is 0.0
The highest allowed value is 1800.0
(The number of decimals in the stored data is 1, since only one shown in the
lowest and highest values)
The units are NTU
The SDI command to be sent to the sensor is 1M1!
The required data will be found in the third field of the sensor reply
The maximum name length is 10 characters long, and is case sensitive.
The maximum units string length is 10 characters.
The maximum SDI command length is 10 characters. This must have the correct
case and end with ! .
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...