
Section 7. Creating and Editing Datalogger Programs
7.3.4.7 Example Program
The following program will serve as a programming example in this section to
illustrate the concepts and program structure. This is a program for a CR5000
datalogger. Note that other dataloggers may have slightly different parameters
for some instructions.
Const RevDiff=1
Const Del=0
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,100,mSec,10)
Average (1,RefTemp,FP2,0)
Average (6,TC(),FP2,0)
EndTable
BeginProg
Scan (10,mSec,3,0)
PanelTemp (RefTemp, 250)
TCDiff (TC(),6,mV20C ,1,TypeT,RefTemp,RevDiff,Del,Integ,Mult,Offset)
CallTable Temp
NextScan
EndProg
7.3.4.8 Data Tables
Data storage follows a fixed structure in the datalogger in order to optimize the
time and space required. Data are stored in tables such as:
The user's program determines the values that are output and their sequence.
The datalogger 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
7-44
Comentarios a estos manuales