Section 7. Installation
139
program needs to access that value, the program must use the the alias-derived
name.
Variables in one, two, and three dimensional arrays can be assigned units. Units
are not used elsewhere in programming, but add meaning to resultant data table
headers. If different units are to be used with each element of an array, first
assign aliases to the array elements and then assign units to each alias. For
example:
Alias var_array(1) = solar_radiation
Alias var_array(2) = quanta
Units solar_radiation = Wm-2
Units variable2 = moles_m-2_s-1
7.6.3.10 Numerical Formats
Four numerical formats are supported by CRBasic. Most common is the use of
base-10 numbers. Scientific notation, binary, and hexadecimal formats can also
be used, as shown in the table
Formats for Entering Numbers in CRBasic
(p. 139).
Only standard, base-10 notation is supported by Campbell Scientific hardware and
software displays.
Formats for Entering Numbers in CRBasic
Format
Example
Base 10 Equivalent Value
Standard
6.832
6.832
Scientific notation
5.67E-8
5.67 x 10
-8
Binary
&B1101
13
Hexadecimal
&HFF
255
Binary format (1 = high, 0 = low) is useful when loading the status of multiple
flags or ports into a single variable. For example, storing the binary number
&B11100000 preserves the status of flags 8 through 1: flags 1 to 5 are low, 6 to 8
are high. CRBasic example
Load Binary Information into a Variable
(p. 139)
shows
an algorithm that loads binary status of flags into a LONG integer variable.
Summary of Contents for CR800 Series
Page 2: ......
Page 4: ......
Page 6: ......
Page 32: ......
Page 34: ......
Page 54: ......
Page 92: ......
Page 310: ......
Page 446: ...Section 8 Operation 446 8 11 2 Data Display FIGURE 100 CR1000KD Displaying Data ...
Page 448: ...Section 8 Operation 448 FIGURE 102 CR1000KD Real Time Custom ...
Page 449: ...Section 8 Operation 449 8 11 2 3 Final Storage Data FIGURE 103 CR1000KD Final Storage Data ...
Page 450: ...Section 8 Operation 450 8 11 3 Run Stop Program FIGURE 104 CR1000KD Run Stop Program ...
Page 452: ...Section 8 Operation 452 FIGURE 106 CR1000KD File Edit ...
Page 456: ......
Page 462: ......
Page 523: ...Section 11 Glossary 523 FIGURE 116 Relationships of Accuracy Precision and Resolution ...
Page 524: ......
Page 526: ......
Page 556: ......
Page 558: ......
Page 560: ......
Page 597: ......