Section 7. Installation
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. 140).
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
Definition and Use of a Data Table
(p. 142).
Units are strictly for
documentation. The CR1000 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. 168).
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
Definition and Use of a Data Table
(p. 142),
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
.
CRBasic Example 10.
Definition and Use of a Data Table
'This program example demonstrates definition 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
DataTable
(Table1,True,-1)
DataInterval
(0,1440,Min,0)
'Optional instruction to trigger table at 24-hour interval
Minimum
(1,Batt_Volt,FP2,False,False)
'Optional instruction to determine minimum Batt_Volt
EndTable
142
Summary of Contents for CR1000
Page 2: ......
Page 4: ......
Page 6: ......
Page 32: ......
Page 36: ......
Page 38: ......
Page 40: ......
Page 60: ...Section 4 System Quickstart Figure 16 PC200W View Line Graph 60 ...
Page 96: ......
Page 98: ...98 ...
Page 302: ......
Page 453: ...Section 8 Operation Figure 115 Using the Keyboard Display 453 ...
Page 456: ...Section 8 Operation Figure 118 Real Time Custom 456 ...
Page 457: ...Section 8 Operation 8 8 1 3 Final Memory Tables Figure 119 Final Memory Tables 457 ...
Page 458: ...Section 8 Operation 8 8 2 Run Stop Program Figure 120 Run Stop Program 458 ...
Page 460: ...Section 8 Operation Figure 122 File Edit 460 ...
Page 461: ...Section 8 Operation 8 8 4 PCCard Memory Card Display Figure 123 PCCard CF Card Display 461 ...
Page 478: ......
Page 506: ......
Page 536: ......
Page 636: ......
Page 642: ......
Page 644: ......
Page 676: ......
Page 677: ......