![Campbell CR3000 Micrologger Скачать руководство пользователя страница 174](http://html1.mh-extra.com/html/campbell/cr3000-micrologger/cr3000-micrologger_operators-manual_489090174.webp)
Section 7. Installation
174
argument TRUE is predefined in the CR3000 operating system to only equal -1,
so only the argument -1 is always translated as TRUE. Consider the expression
If
Condition(1) = TRUE
Then
...
This condition is true only when Condition(1) =
-1. If Condition(1) is any other
non-zero, the condition will not be found true because the constant TRUE is
predefined as -1 in the CR3000 system memory. By entering = TRUE, a literal
comparison is done. So, to be absolutely certain a function is true, it must be set
to TRUE or -1.
Note TRUE is -1 so that every bit is set high (-1 is &B11111111 for all
four bytes). This allows the AND operation to work correctly. The AND
operation does an AND boolean function on every bit, so TRUE AND X
will be non-zero if at least one of the bits in X is non-zero (if X is not zero).
When a variable of data type BOOLEAN is assigned any non-zero
number, the CR3000 internally converts it to -1.
The CR3000 is able to translate the conditions listed in table Binary Conditions of
TRUE and FALSE
(p. 174)
to binary form (-1 or 0), using the listed instructions and
saving the binary form in the memory location indicated. Table Logical
Expression Examples
(p. 175)
explains some logical expressions.
Non-Zero = True (Sometimes)
Any argument other than 0 or -1 will be translated as TRUE in some cases and
FALSE in other cases. While using only -1 as the numerical representation of
TRUE is safe, it may not always be the best programming technique. Consider
the expression
If
Condition(1)
then
...
Since = True is omitted from the expression, Condition(1) is considered true if it
equals any non-zero value.
Binary Conditions of TRUE and FALSE
Condition
CRBasic
Instruction(s) Used
Memory Location of
Binary Result
Time
TimeIntoInterval()
Variable, System
IfTime()
Variable, System
TimeIsBetween()
Variable, System
Control Port Trigger
WaitDigTrig()
System
Communications
VoiceBeg()
System
ComPortIsActive()
Variable
PPPClose()
Variable
Measurement Event
DataEvent()
System
Содержание CR3000 Micrologger
Страница 2: ......
Страница 3: ......
Страница 4: ......
Страница 6: ......
Страница 30: ......
Страница 34: ......
Страница 36: ......
Страница 96: ......
Страница 200: ...Section 7 Installation 200 FIGURE 42 Running Average Frequency Response FIGURE 43 Running Average Signal Attenuation ...
Страница 485: ...Section 8 Operation 485 8 11 2 Data Display FIGURE 110 Keyboard and Display Displaying Data ...
Страница 487: ...Section 8 Operation 487 FIGURE 112 CR1000KD Real Time Custom ...
Страница 488: ...Section 8 Operation 488 8 11 2 3 Final Storage Data FIGURE 113 Keyboard and Display Final Storage Data ...
Страница 489: ...Section 8 Operation 489 8 11 3 Run Stop Program FIGURE 114 Keyboard and Display Run Stop Program ...
Страница 491: ...Section 8 Operation 491 FIGURE 116 Keyboard and Display File Edit ...
Страница 495: ...Section 8 Operation 495 Low power standby whenever possible Low power bus sets bus and modules to low power ...
Страница 496: ......
Страница 502: ......
Страница 564: ...Section 11 Glossary 564 FIGURE 126 Relationships of Accuracy Precision and Resolution ...
Страница 566: ......
Страница 594: ......
Страница 598: ......
Страница 600: ......
Страница 602: ......
Страница 624: ......
Страница 642: ......
Страница 643: ......