beautypg.com

1 data table declaration – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 185

background image

Section 6. Data Table Declarations and
Output Processing Instructions

6.1 Data Table Declaration


DataTable(Name, TrigVar, Size)

output trigger modifier (optional)
export data destinations (optional)
output processing instructions

EndTable

The DataTable instruction marks the beginning of a block of instructions
which specify and control the outputs for the given table. It has three
parameters: a user specified name for the table, a trigger condition, and the size
to make the table in SDRAM. EndTable is used to mark the end of a data table
declaration.

All Data Tables must be defined in the declaration's portion of the program
(prior to BeginProg).

Parameter
& Data Type

Enter

DATATABLE PARAMETERS

Name

The name for the data table. The table name is limited to eight characters.

TrigVar

The name of the variable to test for the trigger. If True (non-zero), new data will be written to the Table
as long as any other Trigger Modifiers are true. If False (zero), then when the Table is called, the current
values for the variables, based on the Data Processing Instructions, will be processed but a new data
record will not be stored to the Table. Trigger modifiers add additional conditions.

Constant

Value Result

Variable, or

0

Do not trigger

Expression

≠ 0

Trigger

Size

Constant

The size to make the data table. The number of data sets (records) to allocate memory for in static
RAM. Each time a variable or interval trigger occurs, a line (or row) of data is output with the number
of values determined by the output Instructions within the table. This data is called a record. The total
number of records stored equals the size..

Note

Enter a negative number and all remaining memory (after creating fixed size data tables) will
be allocated to the table or partitioned between all tables with a negative value for size. The
partitioning algorithm attempts to have the tables fill at the same time.

Output trigger modifiers (e.g., DataInterval, DataEvent) can be used within
the DataTable declaration. The most commonly used trigger modifier
instruction is the DataInterval instruction, which is used to set a fixed time
interval for data storage. The DataEvent instruction is used to conditionally
start and stop storing data to a DataTable based on some logical condition.
See Section 6.2.

Export instructions (e.g., CardOut, DSP4) are used to store data in or direct
data to other hardware. See Section 6.3.

Output processing instructions (e.g. Sample, Average ) determine the data set
stored to the table. See Section 6.4.

See Section 4.2.8 Data Tables for further reading.

6-1