Campbell Scientific CR5000 Measurement and Control Module User Manual

Page 98

Advertising
background image

Section 6. Data Table Declarations and Output Processing Instructions

6-4

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

(AvgTemp,Flag(1),1000)

'Output when Flag(1)=true

DataInterval

(0,10,sec,10)

'Output every 10 seconds(while Flag(1)=true)

'OpenInterval 'When Not Commented, include data while Flag(1)=false in next average

Average

(1,RefTemp,IEEE4,0)

Average

(5,TC,IEEE4,0)

EndTable

BeginProg

Scan

(500,mSec,0,0)

PanelTemp

(RefTemp,250)

TCDiff

(TC(),5,mV50C,9,TypeT,RefTemp,RevDiff,Del,Integ,1,0)

CallTable

AvgTemp

NextScan

EndProg

DataEvent (RecsBefore, StartTrig, StopTrig, RecsAfter)

Used to set a trigger to start storing records and another trigger to stop storing
records within a table. The number of records before the start trigger and the
number of records after the stop trigger can also be set. A filemark (Section 8) is
automatically stored in the table between each event.

Parameter
& Data Type

Enter

RecsBefore
Constant

The number of records to store before the Start Trigger.

StartTrig

The variable or expression test to Trigger copying the pre trigger records into the
data table and start storing each new record..

Variable, or

Value

Result

Expression

0

Do not trigger

0

Trigger

StopTrig
Variable,
Expression or
Constant

The variable, expression or constant to test to stop storing to the data table. The
CR5000 does not start checking for the stop trigger until after the Start Trigger
occurs. A non-zero (true) constant may be used to store a fixed number of
records when the start trigger occurs (total number of records = PreTrigRecs+ 1
record for the trigger +PostTrigRecs.). Zero (false) could be entered if it was
desired to continuously store data once the start trigger occurred.

Value

Result

0

Do not trigger

0

Trigger

RecsAfter

Constant

The number of records to store after the Stop Trigger occurs.

Advertising