Section 9.  Programming 
81 
•  TrigVar-Controls whether or not data records are written to storage. Data 
records are written to storage if TrigVar is true and if other conditions, such 
as DataInterval (), are met. Default setting is -1 (True). TrigVar may be a 
variable, expression, or constant. TrigVar does not control intermediate 
processing. Intermediate processing is controlled by the disable variable, 
DisableVar, which is a parameter in all output processing instructions (see 
Output Processing Instructions (p. 81)). 
Rea
d More! TrigVar and DisableVar - Controlling Data Output and Output 
Processing (p. 125) discusses the use of TrigVar and DisableVar in special 
applications. 
•  Size-Table size is the number of records to store in a table before new data 
begins overwriting old data. If "10" is entered, 10 records are stored in the 
table -- the eleventh record will overwrite the first record. If "-1" is entered, 
memory for the table is automatically allocated at the time the program 
compiles. Auto allocation is preferred in most applications since the 
CR200(X) sizes all tables such that they fill (and begin overwriting the 
oldest data) at about the same time.  Approximately 2K bytes of extra data 
table space is allocated to minimize the possibility of new data over writing 
the oldest data in ring memory when support software collects the oldest 
data at the same time new data are written.  These extra records are not 
reported in the Status Table and are not reported to the support software and 
so are not collected. 
 
CRBASIC EXAMPLE. Definition and Use of a Data Table (p. 79) creates a data 
table named "OneMin", stores data once a minute as defined by DataInterval (), 
and retains the most recent records in SRAM, up to the automatically allocated 
memory limit. DataRecordSize entries in the status table report allocated 
memory in terms of number of records the tables hold. 
 
9.7.1.2  DataInterval () Instruction 
DataInterval () instructs the CR200(X) to write data records at the specified 
interval. The interval is independent of the Scan () / NextScan interval; 
however, it must be a multiple of the Scan () / NextScan interval.  The data 
interval must be at least one minute. 
DataInterval does not override the trigger condition in the DataTable instruction.  
If the trigger is not set always true by entering a constant, it is a condition that 
must be met in addition to the time interval before data will be stored. 
 
9.7.1.3  Output Processing Instructions 
Data storage processing ("output processing") instructions determine what data 
are stored in the data table. When a data table is called in the CRBASIC 
program, data storage processing instructions process variables holding current 
inputs or calculations. If trigger conditions are true, e.g. the required interval has 
expired, processed values are stored ("output") in the data table. In CRBASIC 
EXAMPLE. Definition and Use of a Data Table (p. 79), three averages are 
store
d.