Specifications

Section 4. CRBasic - Native Language Programming
4-4
4.3 Example Program
Const RevDiff=1
Const Del=0 'default
Const Integ=250
Const Mult=1
Const Offset=0
Public RefTemp
Public TC(6)
Units RefTemp=degC
Units TC=DegC
DataTable (Temp,1,2000)
DataInterval (0,10,min,10)
Average (1,RefTemp,FP2,0)
Average (6,TC(),FP2,0)
EndTable
BeginProg
Scan (1,Sec,3,0)
PanelTemp (RefTemp, 250)
TCDiff (TC(),6,mV20C ,1,TypeT,RefTemp,RevDiff,Del,Integ,Mult,Offset)
CallTable Temp
NextScan
EndProg
4.3.1 Data Tables
Data storage follows a fixed structure in the CR3000 in order to optimize the
time and space required. Data are stored in tables such as:
TOA5 Fritz CR3000 1079 CR3000.Std.1.0 CPU:TCTemp.CR3 51399 Temp
TIMESTAMP RECORD RefT_Avg TC_Avg(1) TC_Avg(2) TC_Avg(3) TC_Avg(4) TC_Avg(5) TC_Avg(6)
TS RN degC DegC DegC DegC DegC DegC DegC
Avg Avg Avg Avg Avg Avg Avg
10/28/2004 12:10 119 23.52 23.49 23.49 23.5 23.49 23.5 23.5
10/28/2004 12:20 120 23.55 23.51 23.51 23.51 23.51 23.51 23.52
10/28/2004 12:30 121 23.58 23.52 23.53 23.53 23.53 23.53 23.53
10/28/2004 12:40 122 23.58 23.53 23.54 23.54 23.54 23.54 23.54
The user's program determines the values that are output and their sequence.
The CR3000 automatically assigns names to each field in the data table. In the
above table, TIMESTAMP, RECORD, RefTemp_Avg, and TC_Avg(1) are
fieldnames. The fieldnames are a combination of the variable name (or alias if
one exists) and a three letter mnemonic for the processing instruction that
outputs the data. Alternatively, the FieldNames instruction can be used to
override the default names.
Declare public variables,
dimension array, and
declare units.
Declare constants
Define Data Table
Declarations
Scan loop
Measure
Call Data Table