Section 7.  Creating and Editing Datalogger Programs 
The data table header may also have a row that lists units for the output values.  
The units must be declared for the datalogger to fill this row out (e.g., Units 
RefTemp = degC).  The units are strictly for the user's documentation; the 
datalogger makes no checks on their accuracy. 
The above table is the result of the data table description in the example 
program: 
DataTable (Temp,1,2000) 
 DataInterval(0,10,msec,10) 
 Average(1,RefTemp,fp2,0) 
 Average(6,TC(1),fp2,0) 
EndTable 
All data table descriptions begin with DataTable and end with EndTable.  
Within the description are instructions that tell what to output and the 
conditions under which output occurs.   
DataTable(Name, Trigger, Size) 
DataTable (Temp,1,2000) 
The DataTable instruction has three parameters: a user specified name for the 
table, a trigger condition, and the size to make the table in RAM.  The trigger 
condition may be a variable, expression, or constant.  The trigger is true if it is 
not equal to 0.  Data are output if the trigger is true and there are no other 
conditions to be met.  No output occurs if the trigger is false (=0).  The size is 
the number of records to store in the table.  You can specify a fixed number, or 
enter –1 to have the datalogger auto allocate the number of records.  The 
example creates a table name Temp, outputs any time other conditions are met, 
and retains 2000 records in RAM. 
DataInterval(TintoInt, Interval, Units, Lapses) 
DataInterval(0,10,msec,10) 
DataInterval is an instruction that modifies the conditions under which data are 
stored.  The four parameters are the time into the interval, the interval on which 
data are stored, the units for time, and the number of lapses or gaps in the 
interval to track.  The example outputs at 0 time into (on) the interval relative 
to real time, the interval is 10 milliseconds, and the table will keep track of 10 
lapses. The DataInterval instruction reduces the memory required for the data 
table because the time of each record can be calculated from the interval and 
the time of the most recent record stored. The DataInterval instruction for the 
CR200 does not have lapses. 
Event driven tables should have a fixed size rather than allowing 
them to be allocated automatically.  Event driven tables that are 
automatically allocated are assumed to have one record stored 
per second in calculating the length.  Since the datalogger tries to 
make the tables fill up at the same time, these event driven tables 
will take up most of the memory leaving very little for the other, 
longer interval, automatically allocated data tables.   
NOTE 
7-45