
Section 7. Installation
203
identifies the array index. For example, a variable named
Values
, which is
declared as a two-by-two array in the datalogger program, will be represented by
four field names:
Values(1,1)
,
Values(1,2)
,
Values(2,1)
, and
Values(2,2)
. Scalar
variables will not have array subscripts. There will be one value on this line for
each scalar value defined by the table. Default field names are a combination of
the variable names (or alias) from which data are derived and a three-letter suffix.
The suffix is an abbreviation of the data process that outputs the data to storage.
For example,
Avg
is the abbreviation for the data process called by the
Average()
instruction. If the default field names are not acceptable to the programmer,
FieldNames()
instruction can be used to customize the names.
TIMESTAMP
,
RECORD
,
Batt_Volt_Avg
,
PTemp_C_Avg
,
TempC_Avg(1)
, and
TempC_Avg(2)
are the default field names in the table
Typical Data Table
(p. 201).
The third-header line identifies engineering units for that field of data. These
units are declared at the beginning of a CRBasic program, as shown in CRBasic
example
Declaration and Use of a Data Table
(p. 203).
Units are strictly for
documentation. The CR6 does not make use of declared units, nor does it check
their accuracy.
The fourth line of the header reports abbreviations of the data process used to
produce the field of data. See the table
Data Process Abbreviations
(p. 229).
Subsequent lines are observed data and associated record keeping. The first field
being a time stamp, and the second being the record (data line) number.
As shown in CRBasic example
Declaration and Use of a Data Table
(p. 203),
data
table declaration begins with the
DataTable()
instruction and ends with the
EndTable()
instruction. Between
DataTable()
and
EndTable()
are instructions
that define what data to store and under what conditions data are stored. A data
table must be called by the CRBasic program for data storage processing to occur.
Typically, data tables are called by the
CallTable()
instruction once each
Scan
.
Declaration and Use of a Data Table
'This program example demonstrates declaration and use of data tables.
'Declare Variables
Public
Batt_Volt
Public
PTemp_C
Public
Temp_C(2)
'Define Units
Units
Batt_Volt=Volts
Units
PTemp_C=Deg_C
Units
Temp_C()=Deg_C
'Define Data Tables
DataTable
(OneMin,True,-1)
'Required beginning of data table declaration
DataInterval
(0,1,Min,10)
'Optional instruction to trigger table at one-minute interval
Average
(1,Batt_Volt,FP2,False)
'Optional instruction to average variable Batt_Volt
Average
(1,PTemp_C,FP2,False)
'Optional instruction to average variable PTemp_C
Average
(2,Temp_C(),FP2,False)
'Optional instruction to average variable Temp_C
EndTable
'Required end of data table declaration
Содержание 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: ......