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 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,mV50C,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 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
Содержание CR5000
Страница 39: ...Section 1 Installation and Maintenance 1 15 S A N Y O FIGURE 1 11 6 Removal of band clamp and battery ...
Страница 40: ...Section 1 Installation and Maintenance 1 16 This is a blank page ...
Страница 54: ...Section 2 Data Storage and Retrieval 2 14 This is a blank page ...
Страница 88: ...Section 4 CRBasic Native Language Programming 4 12 This is a blank page ...
Страница 94: ...Section 5 Program Declarations 5 6 This is a blank page ...
Страница 172: ...Section 7 Measurement Instructions 7 46 This is a blank page ...
Страница 206: ......
Страница 236: ...Index Index 4 This is a blank page ...
Страница 237: ...This is a blank page ...