2 trigger modifiers, Datainterval (tintoint, interval, units, lapses) – Campbell Scientific CR5000 Measurement and Control Module User Manual

Page 96

Advertising
background image

Section 6. Data Table Declarations and Output Processing Instructions

6-2

6.2 Trigger Modifiers

DataInterval (TintoInt, Interval, Units, Lapses)

Used to set the time interval for an output table. DataInterval is inserted into a
data table declaration following the DataTable instruction to establish a fixed
interval table. The fixed interval table requires less memory than a conditional
table because time is not stored with each record. The time of each record is
calculated by knowing the time of the most recent output and the interval of
the data. DataInterval does not override the Trigger in the DataTable
instruction. If the trigger is not set always true by entering a constant, it is a
condition that must be met in addition to the time interval before data will be
stored.

The Interval determines how frequently data are stored to the table. The
interval is synchronized with the real time clock. Time is kept internally as the
elapsed time since the start of 1990 (01-01-1990 00:00:00). When the interval
divides evenly into this elapsed time it is time to output (elapsed time MOD
interval = 0). Entering 0 for the Interval sets it equal to the scan Interval.

TintoInt allows the user to set the time into the Interval, or offset relative to
real time, at which the output occurs([elapsed time + TintoInt] MOD interval =
0). For example, 360 (TintoInt) minutes into a 720 (Interval) minute (Units)
interval specifies that output should occur at 6:00 (6 AM, 360 minutes from
midnight) and 18:00 (6 PM, 360 minutes from noon) where the 720 minute (12
hour) interval is set relative to midnight 00:00. Enter 0 to keep output on the
even interval.

Interval driven data allows a more efficient use of memory because it is not
necessary to store time with each record. The CR5000 still stores time but on a
fixed spacing, only about once per 1 K of memory used for the table. 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. If a lapse has
occurred, the CR5000 inserts a time stamp into the data. When the data are
retrieved a time stamp can be calculated and stored with each record.

This lapse time stamp takes up some memory that would otherwise be used for
data. While the CR5000 allocates some extra memory for the table, if there are
a lot of lapses, it is not possible to store as many records as requested in the
DataTable declaration. The Lapses parameter allows the programmer to
allocate additional space for the number of lapses entered. This is used in
particular when the program is written in a way that will create lapses. For
example, if the data output is controlled by a trigger (e.g., a user flag) in the
DataTable instruction in addition to the DataInterval, lapses would occur each
time the trigger was false for a period of time longer than the interval.

To take advantage of the more efficient memory use, always enter 1 or greater
for the lapses parameter even if no lapses are expected. Entering 0 causes
every record to be time stamped.

Entering a negative number tells the CR5000 not to keep track of lapses. Only
the periodic time stamps (approximately once per K of data) are inserted.

Advertising