![background image](http://html1.mh-extra.com/html/campbell/cr200/cr200_instruction-manual_489088081.webp)
Section 9. Programming
71
processing instructions that compress many common calculations used in
CR200(X) dataloggers.
These four elements must be properly placed within the program structure.
9.4 Numerical Formats
Four numerical formats are supported by CRBASIC. Most common is the use of
base 10 numbers. Scientific notation, binary, and hexadecimal formats may also
be used, as shown in
TABLE. Formats for Entering Numbers in CRBASIC
(p.
71). Only standard base 10 notation is supported by Campbell Scientific
hardware and software displays.
Table 5.
Formats for Entering Numbers in CRBASIC
Format
Example
Base 10 Equivalent Value
Standard 6.832
6.832
Scientific notation
5.67E-8
5.67X10
-8
Binary &B1101
11
Hexadecimal &HFF
255
Binary format is useful when loading the status (1 = high, 0 = low) of multiple
flags or ports into a single variable, e.g., storing the binary number
&B11100000 preserves the status of flags 8 through 1. In this case, flags 1 - 5
are low, 6 - 8 are high.
CRBASIC EXAMPLE. Load Binary Information into a
Variable
(p. 71) shows an algorithm that loads binary status of flags into a
LONG integer variable.
CRBASIC EXAMPLE 2.
Load binary information into a single variable
Public FlagInt
Public Flag(8)
Public I
DataTable (FlagOut,True,1000)
Sample (1,FlagInt)
EndTable
BeginProg
Scan (1,Sec)
FlagInt = 0
For I = 1 To 8
Flag (I) = IIF (Flag(I)= 0,0,-1)
If Flag(I) = true then
FlagInt = F 2 ^ (I - 1)
EndIf
Next I
CallTable FlagOut
NextScan
EndProg
Содержание CR200
Страница 32: ...Section 2 Quickstart Tutorial 22 ...
Страница 45: ...Section 3 Overview 35 3 3 Specifications ...
Страница 46: ...Section 3 Overview 36 ...
Страница 58: ...Section 4 Sensor Support 48 ...
Страница 62: ...Section 5 Measurement and Control Peripherals 52 ...
Страница 78: ...Section 8 CR200 X Configuration 68 ...
Страница 102: ...Section 9 Programming 92 ...
Страница 138: ...Section 11 Programming Resource Library 128 ...
Страница 156: ...Section 16 Support Software 146 ...
Страница 160: ...Section 17 Care and Maintenance 150 ...
Страница 166: ...Section 18 Troubleshooting 156 18 3 3 Diagnosis and Fix Procedures 18 3 3 1 Battery Voltage Test ...
Страница 167: ...Section 18 Troubleshooting 157 18 3 3 2 Charging Circuit Test Solar Panel ...
Страница 168: ...Section 18 Troubleshooting 158 18 3 3 3 Charging Circuit Test Transformer ...
Страница 169: ...Section 18 Troubleshooting 159 18 3 3 4 Adjusting Charging Circuit Voltage ...
Страница 170: ...Section 18 Troubleshooting 160 ...
Страница 184: ...Appendix A Glossary 14 ...
Страница 190: ...Appendix B Status Table and Settings 20 ...
Страница 192: ...Appendix C Serial Port Pin Outs 22 ...
Страница 211: ......