Data Types And Formats; Variables - Campbell CR300 Series Product Manual

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

Advertisement

16.4 Data types and formats

Data takes different formats as it is created and manipulated in the data logger, as it is displayed
through software, and as it is retrieved to a computer file. It is important to understand the
different data types, formats and ranges, and where they are used.
See the CRBasic Editor help for additional data types and formats, and program examples:
https://help.campbellsci.com/crbasic/cr300/
Table 16-1: Data types, ranges and resolutions
Data type
Description
IEEE four-byte
Float
floating point
four-byte
Long
signed integer
four-byte
Boolean
signed integer
String
ASCII String
IEEE four-byte
IEEE4
floating point
IEEE eight-byte
IEEE8
floating point
Campbell Scientific
FP2
two-byte floating point
NSEC
eight-byte time stamp

16.4.1 Variables

In CRBasic, the declaration of variables (via the
As
that specifies the data type. The data types are Float, Long, Boolean, and
type descriptor
String. The default type is Float.
Example variables declared with optional data types
Public
PTemp
As
Float, Batt_volt
Public
Counter
As Long
Public
SiteName
As String
.
Range
+/–1.8 *10^–38 to
+/–3.4 *10^38
–2,147,483,648 to
+2,147,483,647
–1, 0
 
+/–1.8 *10^–38 to
+/–3.4 *10^38
+/–2.23 *10^–308 to
+/–1.8 *10^308
–7999 to +7999
 
DIM
* 24
Resolution
24 bits
(about 7 digits)
1 bit
True (–1) or
False ( 0)
 
24 bits
(about 7 digits)
53 bits
(about 16 digits)
13 bits
(about 4 digits)
nanoseconds
PUBLIC
or the
statement) allows an optional
Where used
variables
variables, output
variables,
sample output
variables,
sample output
internal calculations,
output
internal calculations,
output
output
variables, output
16. Working with data     79

Advertisement

Table of Contents
loading

Table of Contents