Data Output-Processing Instructions - Campbell CR300 Series Operator's Manual

Hide thumbs Also See for CR300 Series:
Table of Contents

Advertisement

DataInterval() instructs the CR300 to both write data records at the specified
interval and to recognize when a record has been skipped. The interval is
independent of the
multiple of the Scan() / NextScan interval.
Sometimes timing issues or program logic prevent a record from being written.
If a record is not written, the CR300 recognizes the omission as a "lapse" and
increments the SkippedRecord counter in the Status table. Lapses waste
significant memory in the data table and may cause the data table to fill sooner
than expected. DataInterval() instruction parameter Lapses controls the
CR300 response to a lapse.
B.5.1 Data Output-Processing Instructions
Data-storage processing instructions, also known as output processing
instructions, determine what data are stored in a data table. When a data table is
called in the CRBasic program, data-storage processing instructions process
variables holding current inputs or calculations. If trigger conditions are true,
for example if the data-output interval has expired, processed values are stored
into the data table. In CRBasic Example B-6, Definition and Use of a Data
Table
Consider the Average() instruction as an example data-storage processing
instruction. Average() stores the average of a variable over the data-output
interval. Its parameters are:
Appendix B. Introduction to CRBasic Programming
–1 (True). TrigVar may be a variable, expression, or constant.
TrigVar does not control intermediate data processing. Intermediate
data processing is controlled by the disable variable, DisableVar,
which is a parameter in all output processing instructions.
Size — Table size is the number of records to store in a table before
new data begins overwriting old data. If 10 is entered, 10 records are
stored in the table; the eleventh record will overwrite the first record.
If –1 is entered, memory for the table is allocated automatically at the
time the program compiles. Automatic allocation is preferred in most
applications since the CR300 sizes all tables such that they fill (and
begin overwriting the oldest data) at about the same time.
Scan() / NextScan interval
, three averages are stored.
(p. B-8)
Reps — number of sequential elements in the variable for which
averages are calculated. Reps is set to 1 to average PTemp, and set to
2 to average two thermocouple temperatures, both of which reside in
the variable array Temp_C() (a variable array of 2).
Source — variable to average. Variables PTemp_C and Temp_C() (a
variable array of 2) are used.
DataType — Data type for the stored average (the example uses data
type FP2). Final-data memory data types are listed in TABLE B-3.
DisableVar — controls whether a measurement or value is included in
an output processing function. A measurement or value is not included
if DisableVar is true (≠ 0). For example, if the disable variable in an
Average() instruction is True, the current value will not be included
in the average.CRBasic Example
used to exclude values from an averaging process. In this example,
DisableVar is controlled by Flag1. When Flag1 is true, DisableVar is
; however, it must be a
(p. B-12)
B-7
shows how DisableVar can be
B-9

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr300-rf407Cr300-rf412Cr300-rf422

Table of Contents