beautypg.com

Campbell Scientific CR9000X Measurement and Control System User Manual

Page 189

background image

Section 6. Data Table Declarations and Output Processing Instructions

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

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

'Uncomment to include data while Flag(1)=false in next

Avg

Average(1,RefTemp,IEEE4,0)
Average(5,TC,IEEE4,0)
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 AvgTemp

NextScan

EndProg

DataEvent (PreTrigRecs, StartTrig, StopTrig, PostTrigRecs)

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 9)
is automatically stored in the table between each event if the file is stored on a
PCMCIA card. The Data Table can be parsed out into multiple files based on
the FileMark locations.

For a Single Trigger data event, enter the start trigger condition and simply
enter True for the Stop Trigger. The normal record count for a Single Trigger
Data Event
is the number of pre-trigger records requested + 1 (the start trigger
record) + the number of post-trigger records requested.

For a Dual Trigger data event, both the start trigger condition and the stop
trigger condition logic must be entered. The normal record count for a Dual
Trigger Data Event
is the number of pre-trigger records requested + 1 (the
start trigger record) + the number of records until the Stop trigger evaluates as
true + 1 (the stop trigger record) + the number of post-trigger records requested.

It should be noted that, for a given DataTable, a new event cannot be
Triggered while an event is being captured. Also, if an event occurs before the
requisite number of pre-trigger records have passed since the last trigger, the
logger will still not write the same records to the DataTable twice. This may
result in Events having a smaller number of records than expected (see
examples). The events can be parsed out into separate files through the use of
the Convert Utility, by processing the FileMarks, if the Table is stored to a
PCMCIA Card.

6-5