EasyManuals Logo

Campbell CR310 User Manual

Campbell CR310
321 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #97 background imageLoading...
Page #97 background image
Constants must be defined before they are used in the program. Constants can be defined in a
ConstTable/EndConstTable construct allowing them to be changed using the keyboard
display, the C command in terminal mode, or via a custom menu.
Constants can also be typed For example:Const A as Long = 9999, and Const B as String =
“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: Const A = 9999 will
use the Long data type. Const A = 9999.0 will use the Floatdata 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 Minimum() and Maximum().
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 .
While Float (IEEE 4 byte floating point) is used for variables and internal calculations, FP2 is
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 IEEE4 (2 bytes per value
vs 4).
Table 16-2: Resolution and range limits of FP2 data
Zero Minimum magnitude Maximum magnitude
0.000 ±0.001 ±7999.
The resolution of FP2 is reduced to 3 significant digits when the first (left most) digit is 8 or
greater. Thus, it may be necessary to use IEEE4 output or an offset to maintain the desired
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 FP2 output to display the 0.01 foot
increment. If the water level is expected to range from 50 to 90 feet the data could either be
output in IEEE4 or could be offset by 20 feet (transforming the range to 30 to 70 feet).
16. Working with data81

Table of Contents

Other manuals for Campbell CR310

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Campbell CR310 and is the answer not in the manual?

Campbell CR310 Specifications

General IconGeneral
BrandCampbell
ModelCR310
CategoryData Loggers
LanguageEnglish

Related product manuals