Openinterval – Campbell Scientific CR5000 Measurement and Control Module User Manual

Page 97

Advertising
background image

Section 6. Data Table Declarations and Output Processing Instructions

6-3

Parameter
& Data Type

Enter

TintoInt

Constant

The time into the interval (offset to the interval) at which the table is to be output. The
units for time are the same as for the interval.

Interval

Constant

Enter the time interval on which the data in the table is to be recorded. The interval may
be in µs, ms, s, or minutes, whichever is selected with the Units parameter. Enter 0 to
make the data interval the same as the scan interval.

Units

The units for the time parameters, PowerOff is the only instruction that uses hours or
days.

Constant

Alpha
Code

Numeric
Code

Units

USEC

0

microseconds

MSEC

1

milliseconds

SEC

2

seconds

MIN

3

minutes

Lapses

Constant

As each new record is stored, time is checked to ensure that the interval is correct. The
datalogger keeps track of lapses or discontinuities in the data.

OpenInterval

When the DataInterval instruction is included in a data table, the CR5000 uses
only values from within an interval for time series processing (e.g., average,
maximum, minimum, etc.). When data are output every interval, the output
processing instructions reset each time output occurs. To ensure that data from
previous intervals is not included in a processed output, processing is reset any
time an output interval is skipped. (An interval could be skipped because the
table was not called or another trigger condition was not met.) The CR5000
resets the processing the next time that the table is called after an output
interval is skipped. If this next call to the table is on a scheduled interval, it
will not output. Output will resume on the next interval. (If Sample is the only
output processing instruction in the table, data will be output any time the table
is called on the interval because sampling uses only the current value and
involves no processing.)

OpenInterval is used to modify an interval driven table so that time series
processing in the table will include all values input since the last time the table
output data. Data will be output whenever the table is called on the output
interval (provided the other trigger conditions are met), regardless of whether
or not output occurred on the previous interval.

OpenInterval Example:

In the following example, 5 thermocouples are measured every 500
milliseconds. Every 10 seconds, while Flag(1) is true, the averages of the
reference and thermocouple temperatures are output. The user can toggle
Flag(1) to enable or disable the output. Without the OpenInterval Instruction,
the first averages output after Flag(1) is set high would include only the
measurements within the previous 10 second interval. This is the default and is
what most users desire. With the Open interval in the program (remove the
initial single quote (‘) to uncomment the instruction) all the measurements
made while the flag was low will be included in the first averages output after
the flag is set high.

Advertising