Section 7. Installation
255
can use the
BOOL8
data type. A BOOL8 is a one-byte value that holds eight bits
of information (eight states with one bit per state). To store the same information
using a 32 bit
BOOLEAN
data type, 256 bits are required (8 states * 32 bits per
state).
When programming with BOOL8 data type, repetitions in the output processing
DataTable()
instruction must be divisible by two, since an odd number of bytes
cannot be stored. Also note that when the CR6 converts a LONG or FLOAT data
type to BOOL8, only the least significant eight bits of the binary equivalent are
used, i.e., only the binary representation of the decimal integer
modulo divide
(p.
256 is used.
Example:
Given: LONG integer 5435
Find: BOOL8 representation of 5435
Solution:
5435 / 256 = 21.2304687
0.2304687 * 256 = 59
Binary representation of 59 = 00111011 (CR6 stores these bits
in reverse order)
When
datalogger support software
(p. 97)
retrieves the BOOL8 value, it splits it
apart into eight fields of
-1
or
0
when storing to an ASCII file. Consequently,
more memory is required for the ASCII file, but CR6 memory is conserved. The
compact
BOOL8
data type also uses less comms band width when transmitted.
CRBasic example
Bool8 and Bit Shift Operators
(p. 257)
programs the CR6 to
monitor the state of 32 "alarms" as a tutorial exercise. The alarms are toggled by
manually entering zero or non-zero (e.g., 0 or 1) in each public variable
representing an alarm as shown in figure
Alarms Toggled in Bit Shift Example
(p.
Samples of the four public variables
FlagsBool8(1)
,
FlagsBool8(2)
,
FlagsBool8(3)
, and
FlagsBool8(4)
are stored in data table
Bool8Data
as four
one-byte values. However, as shown in figure
Bool8 Data from Bit Shift
Example (Numeric Monitor)
(p. 256),
when viewing the data table in a
numeric
monitor
(p. 592),
data are conveniently translated into 32 values of
True
or
False
.
In addition, as shown in figure
Bool8 Data from Bit Shift Example (PC Data File)
(p. 257),
when
datalogger support software
(p. 97)
stores the data in an ASCII file, it is
stored as 32 columns of either
-1
or
0
, each column representing the state of an
alarm. You can use variable
aliasing
(p. 199)
in the CRBasic program to make the
data more understandable.
Содержание CR6 Series
Страница 2: ......
Страница 4: ......
Страница 6: ......
Страница 32: ......
Страница 36: ......
Страница 38: ......
Страница 76: ...Section 5 Overview 76 FIGURE 20 Half Bridge Wiring Example Wind Vane Potentiometer ...
Страница 80: ...Section 5 Overview 80 FIGURE 23 Pulse Input Wiring Example Anemometer ...
Страница 136: ......
Страница 251: ...Section 7 Installation 251 FIGURE 46 Running Average Frequency Response FIGURE 47 Running Average Signal Attenuation ...
Страница 454: ...Section 8 Operation 454 FIGURE 104 Narrow Sweep High Noise ...
Страница 459: ...Section 8 Operation 459 FIGURE 106 Vibrating Wire Sensor Calibration Report ...
Страница 535: ...Section 8 Operation 535 8 11 2 Data Display FIGURE 121 CR1000KD Displaying Data ...
Страница 537: ...Section 8 Operation 537 FIGURE 123 CR1000KD Real Time Custom ...
Страница 538: ...Section 8 Operation 538 8 11 2 3 Final Storage Data FIGURE 124 CR1000KD Final Storage Data ...
Страница 539: ...Section 8 Operation 539 8 11 3 Run Stop Program FIGURE 125 CR1000KD Run Stop Program ...
Страница 541: ...Section 8 Operation 541 FIGURE 127 CR1000KD File Edit ...
Страница 542: ...Section 8 Operation 542 8 11 5 PCCard Memory Card Management FIGURE 128 CR1000KD PCCard Memory Card Management ...
Страница 546: ......
Страница 549: ...Section 9 Maintenance Details 549 FIGURE 133 Separate Back Shell from Module FIGURE 134 Disconnect Battery Connector ...
Страница 552: ......
Страница 610: ...Section 11 Glossary 610 FIGURE 137 Relationships of Accuracy Precision and Resolution ...
Страница 612: ......
Страница 648: ......
Страница 650: ......
Страница 688: ......
Страница 689: ......