beautypg.com

A.15 data-table access and management – Campbell Scientific CR1000 Measurement and Control System User Manual

Page 517

background image

Appendix A. CRBasic Programming Instructions

517

 

NewFile 
Determines if a file stored on the datalogger has been updated since the 
instruction was last run. Typically used with image files. 

Syntax 

NewFile(NewFileVar, "FileName")

RunProgram 
Runs a datalogger program file from the active program file. 

Syntax 

RunProgram("Device:FileName", Attrib)

A.15 Data-Table Access and Management

Commands to access and manage data stored in data tables, including Public and
Status tables.

FileMark 
Inserts a filemark into a data table. 

Syntax 

FileMark(TableName)

GetRecord 
Retrieves one record from a data table and stores the results in an array. May be 
used with SecsSince1990()

Syntax 

GetRecord(Dest, TableName, RecsBack)

ResetTable 
Used to reset a data table under program control. 

Syntax 

ResetTable(TableName)

SetStatus 
Changes the value for a setting in the datalogger Status table. 

Syntax 

SetStatus("FieldName", Value)

TableName.EventCount 
Returns the number of data storage events that have occurred for an event‐
driven data table. 

Syntax 

TableName.EventCount(1,1)

TableName.FieldName 
Accesses a specific field from a record in a table 

Syntax 

TableName.FieldName(FieldNameIndex, RecordsBack)