![background image](http://html1.mh-extra.com/html/campbell/cr200/cr200_instruction-manual_489088098.webp)
Section 9. Programming
88
CRBASIC EXAMPLE. Use of Variable Arrays to conserve Code
p. 88 shows
example code to convert five temperatures in a variable array from C to F:
CRBASIC EXAMPLE 15.
Use of Variable Arrays to Conserve Code Space
For I = 1 to 5
TempC(I) = TempC(I) * 1.8 + 32
Next I
9.10.3 Logical Expressions
Measurements can indicate absence or presence of an event. For example, an
RH measurement of 100% indicates a condensation event such as fog, rain, or
dew. The CR200(X) can render events into binary form for further processing,
i.e., events can either be TRUE, indicating the condition occurred or is
occurring, or FALSE, indicating the condition has not yet occurred or is over.
Several words are commonly interchanged with True / False such as High /
Low, On / Off, Yes / No, Set / Reset, Trigger / Do Not
Trigger. The CR200(X) understands only True / False or -1 /
0, however. The CR200(X) represents "true" with "-1"
because AND / OR operators are the same for logical
statements and binary bitwise comparisons.
In the binary number system internal to the CR200(X), "-1" is expressed with
all bits equal to 1 (11111111). "0" has all bits equal to 0
(00000000). When -1 is ANDed with any other number, the
result is the other number. This ensures that if the other
number is non-zero (true), the result is non-zero.
Using TRUE or FALSE conditions with logic operators such as AND and OR,
logical expressions can be encoded into a CR200(X) to perform three general
logic functions, facilitating conditional processing and control applications.
1.
Evaluate an expression, then take one path or action if the expression is
true (= -1), and / or another path or action if the expression is false (=
0).
2.
Evaluate multiple expressions linked with AND or OR.
3.
Evaluate multiple and / or links.
Содержание 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: ......