04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Section 7. Installation<br />

Data Output-Processing Instructions<br />

Final data storage processing instructions (aka "output processing" instructions)<br />

determine what data are stored in a data table. When a data table is called in the<br />

CRBasic program, final data storage processing instructions process variables<br />

holding current inputs or calculations. If trigger conditions are true, for example if<br />

the output interval has expired, processed values are stored, or output, into the<br />

data table. In CRBasic example Definition and Use of a Data Table (p. 127), three<br />

averages are stored.<br />

Consider the Average() instruction as an example of output processing<br />

instructions. Average() stores the average of a variable over the final data storage<br />

output interval. Its parameters are:<br />

• Reps — number of elements in the variable array for which to calculate<br />

averages. Reps is set to 1 to average PTemp, and set to 2 to average 2<br />

thermocouple temperatures, both of which reside in the variable array<br />

"Temp_C".<br />

• Source — variable array to average. Variable arrays PTemp_C (an array of 1)<br />

and Temp_C() (an array of 2) are used.<br />

• DataType — Data type for the stored average (the example uses data type<br />

FP2, which is the <strong>Campbell</strong> <strong>Scientific</strong> two-byte floating point data type).<br />

Read More! See Data Types (p. 118) for more information on available data types.<br />

• DisableVar — controls whether a measurement or value is included in an<br />

output processing function. A measurement or value is not included if<br />

DisableVar is true (≠ 0). For example, if the disable variable in an Average()<br />

instruction is true, the current value will not be included in the average.<br />

CRBasic example Use of the Disable Variable and CRBasic example Using<br />

NAN to Filter Data (p. 431) show how DisableVar can be used to exclude values<br />

from an averaging process. Whether DisableVar is True or False is controlled<br />

by Flag1. When Flag1 is high, or True, DisableVar is True. When it is False,<br />

DisableVar is False. When False is entered as the argument for DisableVar, all<br />

readings are included in the average. The average of variable Oscillator does<br />

not include samples occurring when Flag1 is high (True), which results in an<br />

average of 2; when Flag1 is low or False (all samples used), the average is 1.5.<br />

Read More! TrigVar and DisableVar (p. 222)— Controlling Data Output and<br />

Output Processing (p. 222) and Measurements and NAN (p. 428) discuss the use of<br />

TrigVar and DisableVar in special applications.<br />

Read More! For a complete list of output processing instructions, see section<br />

Final Data Storage (Output) Processing (p. 477).<br />

Numbers of Records<br />

The exact number of records that can be stored in a data table is governed by a<br />

complex set of rules, the summary of which can be found in the appendix<br />

Numbers of Records in Data Tables (p. 414).<br />

131

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!