Section 6. Data Table Declarations and Output Processing Instructions
6-5
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 default integration
Public RefTemp
'Declare the variable used for reference temperature
Public TC(5)
'Declare the variable used for thermocouple measurements
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)
ModuleTemp(RefTemp,1,5,30)
TCDiff(TC(),5,mV50C,5,9,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 from within the program by
executing the ResetTable instruction. Tables can also be reset from PC9000
real time windows or the collect data window.
Example:
DataTable (Temp,1,2000)
DataInterval(0,10,msec,10)
FillStop
' the table will stop collecting
data after 2000 records.
Average(1,RefTemp,fp2,0)
Average(6,TC(1),fp2,0)
EndTable
Содержание CR9000
Страница 6: ...CR9000 Table of Contents iv This is a blank page ...
Страница 22: ...CR9000 Overview OV 16 This is a blank page ...
Страница 26: ...Section 1 Installation 1 4 CR9000 FIGURE 1 1 3 CR9000 Battery Pack ...
Страница 72: ...Section 3 CR9000 Measurement Details 3 28 This is a blank page ...
Страница 88: ...Section 5 Program Declarations 5 6 This is a blank page ...
Страница 217: ...This is a blank page ...