beautypg.com

Line 6 time stamp, Record number – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 84

background image

Section 2. Data Storage and Retrieval

LINE 5

Field Data Type

This header line is only in TOB1 and TOB3 binary formats and identifies
the data type for each of the fields in the data table. Data types include
FP2, IEEE4 (float), Long (ULong), UINT2, Bool4 (Boolean), Bool8,
NSEC, and String.

See "Table 4.2.4 Data Types" located in Section 4.2.4.4.

LINE 6

Time Stamp
This field is the date and time stamp for this record. It indicates the time,
according to the logger clock, that each record was stored. It is actually
stored in the Binary format as the Seconds and Nanoseconds since Jan. 1,
1990.

Record Number
This field is the record number of this record. The number will increase up
to 2

32

and then start over with zero. The record number will also start over

at zero if the table is reset.

Field Data
This is the data for each of the fields in the record.

All of the Data File structure format examples that follow in this section
were created with the program listed in Example Program 2.4-1.

SlotConfigure(9050)
Public TC(4) : Units TC = Deg_F

'Declare Var array for TCs

Public TRef(1) : Units TRef = Deg_C

'Declare Reference Temp

Public Flag(8)

'Declare General Purpose Flags


DataTable(TEMP,True,-1)

'Name, Trigger, auto size

DataInterval(0,10,mSec,100)

'10 mS rate, 100 lapses, autosize

CardOut(0,-1)

'PC card , Ring, Auto-size

Sample (1,TRef(),IEEE4)

'1 Rep, Source,IEEE4

Average(4,TC(),FP2,False)

'4 Reps,Source,FP2,Enabled

EndTable

'End of table TEMP


BeginProg

'Program begins here

Scan(5,mSec,100,0)

'Scan once every 5 mSecs

ModuleTemp(TRef(),1,4,20)

'Make measurements

TCDiff(TC(),4,mV50C,4,1,TypeT,TRef(1),True,40,70,1.8,32)
If Flag(1) Then CallTable TEMP

'Call Data Table Temp

Next Scan

'Loop up for the next scan

EndProg

'Program ends here

Example Program 2.4-1: Data.C9X program file that created all

example data files in this section

2-12