Data Storage - Campbell CR300 Series Product Manual

Compact datalogger
Hide thumbs Also See for CR300 Series:
Table of Contents

Advertisement

Constants must be defined before they are used in the program. Constants can be defined in a
ConstTable/EndConstTable
display, the C command in terminal mode, or via a custom menu.
Constants can also be typed For
"MyString". Valid data types for constants are: Long, Float, Double, and String. Other data
types return a compile error.
When the CRBasic program compiles, the compiler determines the type of the constant (Long,
Float, Double, or String) from the expression. This data type is communicated to the
software. The software formats or restricts the input based on the data type communicated to it
by the data logger.
You can declare a constant with or without specifying a data type. If a data type is not specified,
the compiler determines the data type from the expression. For example: 
Long
use the
data type.

16.4.3 Data storage

Data can be stored in IEEE4 or FP2 formats. The format is selected in the program instruction that
outputs the data, such as
Additionally, data can be stored in IEEE8 format when high precision is needed. For more
information on double-precision math, watch an instructional video
at: http://www.campbellsci.com.au/videos/double-precision 
Float
While
(IEEE 4 byte floating point) is used for variables and internal calculations,
adequate for most stored data. Campbell Scientific 2 byte floating point (FP2) provides 3 or 4
significant digits of resolution, and requires half the memory space as
vs 4).
Table 16-2: Resolution and range limits of FP2 data
Zero
Minimum magnitude Maximum magnitude
0.000
FP2
The resolution of
greater. Thus, it may be necessary to use
resolution of a measurement. For example, if water level is to be measured and output to the
nearest 0.01 foot, the level must be less than 80 feet for
increment. If the water level is expected to range from 50 to 90 feet the data could either be
IEEE4
output in
or could be offset by 20 feet (transforming the range to 30 to 70 feet).
construct allowing them to be changed using the keyboard
example: Const
Const
A = 9999.0 will use the Floatdata type.
Minimum()
and Maximum().
±0.001
is reduced to 3 significant digits when the first (left most) digit is 8 or
IEEE4
A as Long = 9999, and
.
±7999.
output or an offset to maintain the desired
FP2
output to display the 0.01 foot
Const
B as String =
Const
A = 9999 will
FP2
IEEE4
(2 bytes per value
16. Working with data     81
is

Advertisement

Table of Contents
loading

Table of Contents