Creating data tables in a program

Data is stored in tables as directed by theClosedCRBasicCampbell Scientific's BASIC-like programming language that supports analog and digital measurements, data processing and analysis routines, hardware control, and many communications protocols.program. InClosedShort CutA CRBasic programming wizard suitable for many data logger applications. Knowledge of CRBasic is not required to use Short Cut., data tables are created in theOutputsteps (seeCreating a Short Cut data logger program). Data tables are created within the CRBasic data logger program using theDataTable()/EndTableinstructions. They are placed after variable declarations and before theBeginProginstruction.

Public'Declare Public Variables


DataTable()
'Output Trigger Condition(s)
'Output Processing Instructions

EndTable

'Main Program

BeginProg

BetweenDataTable()andEndTable()are instructions that define what data to store and under what conditions data is stored. A data table must be called by the CRBasic program for data processing and storage to occur. Typically, data tables are called by theCallTable()instruction once each program scan.

See theCRBasicEditorhelp for detailed instruction information and program examples: https://help.campbellsci.com/crbasic/cr300/.

Use theDataTable()instruction to define the number of records, or rows, allocated to a data table. You can set a specific number of records, which is recommended for conditional tables, or allow your data logger to auto-allocate table size. With auto-allocation, the data logger balances the memory so the tables “fill up” (newest data starts to overwrite the oldest data) at about the same time. It is recommended you reserve the use of auto-allocation for data tables that store data based only on time (tables that store data based on theDataInterval()instruction). Event or conditional tables are usually set to a fixed number of records. View data table fill times for your program on theStation Status>Table Fill Times选项卡(参见Checking station statusfor more information). An example of the Table Fill Times tab follows. For information on data table storage seeData memory.


(点击图片/公司扩张llapse display)

For additional information on data logger memory, visit theCampbell Scientificblog article,How to Know when Your Datalogger Memory is Getting Full.