![background image](http://html1.mh-extra.com/html/campbell/cr200/cr200_instruction-manual_489088085.webp)
Section 9. Programming
75
CRBASIC EXAMPLE 4.
Using a variable array in calculations
Public TempC(4)
Public TempF(4)
Dim T
BeginProg
Scan (1,Sec,0,0)
Therm109 (TempC(),4,1,Ex1,1.0,0)
For T = 1 To 4
TempF(T) = TempC(T) * 1.8 + 32
Next
NextScan
EndProg
9.6.1.2
Dimensions
The CR200(X) cannot use multi-dimensioned arrays.
9.6.1.3
Data Types
Variables, calculations, and stored data use IEEE4 4-byte floating point, a
binary format, with least significant bit first. Time is stored as integer seconds
since midnight, the start of 1990, which is also a 4-byte number.
CR200(X) IEEE4 Data
Word Size
Range
Resolution
4 bytes
±1.8 x 10-38 to
±1.7 x 1038
24 bits (about 7 digits)
9.6.1.4
Flags
Flags are a useful program control tool. While any variable can be used as a
flag, variables named "Flag" works best because datalogger support software
automatically adds variables call "Flag" to the Ports and Flags window. Because
the CR200(X) does not support the Boolean data type, the IIF function may be
used to distinguish between zero and non-zero values, effectively creating a
Boolean value. The value of -1(all bits on) is defined as true and the value of
zero (all bits off) is defined as false.
CRBASIC EXAMPLE. Flag Declaration
and Use
(p. 76) shows an example using a flag to initiate measurements.
Содержание 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: ......