Specifications
Section 6. Data Table Declarations and Output Processing Instructions
DataEvent Example:
In this example, 5 type T thermocouples are measured. The trigger for the start
of an event is when TCTemp(1) exceeds 30 degrees C. The stop trigger is
when TCTemp(1) less than 29 degrees C. The event consists of 20 records
prior to the start trigger and continues to store data until 10 records following
the stop trigger.
Const RevDiff = 1 'Reverse input to cancel offsets
Const Del = 0 'Use default delay
Const Integ = 0 'Use no integration
Public RefTemp 'Declare the variable used for reference temperature
Public TC(5) 'Declare the variable used for thermocouple measurements
Public Flag(8)
Units RefTemp=degC '
Units TC=degC
DataTable (Event,1,1000)
DataInterval(0,00,msec,10) 'Set the sample interval equal to the scan
DataEvent(20,TC(1)>30,TC(1)<29,10) '20 records before TC(1)>30,
'after TC(1)<29 store 10 more records
Sample(1,RefTemp,IEEE4) 'Sample the reference temperature
Sample(5,TC,IEEE4) 'Sample the 5 thermocouple temperatures
EndTable
BeginProg
Scan(500,mSec,0,0)
PanelTemp (RefTemp,250)
TCDiff (TC(),5,mV20C,1,TypeT,RefTemp,RevDiff,Del,Integ,1,0)
CallTable Event
NextScan
EndProg
FillStop
Data Tables are by default ring memory where, once full, the newest data are
written over the oldest. Entering FillStop into a data table declaration makes
the table fill and stop. Once the table is filled, no more data are stored until the
table has been reset. The table can be reset (all data erased) from within the
program by executing the ResetTable instruction.
Example:
DataTable (Temp,1,2000)
DataInterval(0,100,msec,10)
FillStop ' the table will stop collecting data after 2000 records.
Average(1,RefTemp,fp2,0)
Average(6,TC(1),fp2,0)
EndTable
6-5