Campbell CR5000 Operator's Manual page 99

Measurement and control system
Table of Contents

Advertisement

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
Const
Del 0
Const
Integ 0
Public
RefTemp
Public
TC(5)
Public
Flag(8)
Units
RefTemp=degC
Units
TC=degC
DataTable
(Event,1,1000)
DataInterval(0,00,msec,10)
DataEvent(20,TC(1)>30,TC(1)<29,10)
Sample(1,RefTemp,IEEE4)
Sample(5,TC,IEEE4)
EndTable
BeginProg
Scan(500,mSec,0,0)
PanelTemp
TCDiff
CallTable
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
Average(1,RefTemp,fp2,0)
Average(6,TC(1),fp2,0)
EndTable
'Reverse input to cancel offsets
'Use default delay
'Use no integration
'Declare the variable used for reference temperature
'Declare the variable used for thermocouple measurements
'
'Set the sample interval equal to the scan
'20 records before TC(1)>30,
'after TC(1)<29 store 10 more records
'Sample the reference temperature
'Sample the 5 thermocouple temperatures
(RefTemp,250)
(TC(),5,mV50C,1,TypeT,RefTemp,RevDiff,Del,Integ,1,0)
Event
' the table will stop collecting data after 2000 records.
6-5

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CR5000 and is the answer not in the manual?

Table of Contents