Specifications

Section 9. Program Control Instructions
9-13
Scan … NextScan
Used to establish the program scan rate.
Syntax
Scan(Interval, Units, BufferOption, Count)
...
...[Exit Scan]
...
Next Scan
The measurements, processing, and calls to output tables bracketed by the
Scan…NextScan instructions determine the sequence and timing of the
datalogger program.
The Scan instruction determines how frequently the measurements within the
Scan…NextScan structure are made, controls the buffering capabilities, and
sets the number of times to loop through the scan.
Parameter
& Data Type
Enter
Interval
Constant
Enter the time interval at which the scan is to be executed. The interval may
be in ms, s, or minutes, whichever is selected with the Units parameter. The
minimum scan interval is 10 milliseconds. The maximum scan interval is 30
minutes.
Units
The units for the time parameters.
Constant
Alpha Code Units
MSEC milliseconds
SEC seconds
MIN minutes
BufferOption
Constant
Determines how data will be buffered during the Scan…NextScan process.
The options are:
Option Result
0, 1, or 2 The datalogger uses two buffers when processing
measurements. When a measurement begins on a scan,
the values of the previous scan are loaded into a buffer.
This allows processing to finish on the previous scan
during measurement of the current scan.
>3 The datalogger uses three or more buffers when
processing measurements, based on the number of scans
defined by this Constant.
Larger buffers can be used for a Scan that has occasional large processing
requirements such as FFTs or Histograms, and/or when processing may be
interrupted by communications. If a value of 1000 is inserted into the
BufferSize argument of a scan having 10 thermocouple measurements,
40,000 bytes of SRAM will be allocated for the buffer [(4 bytes) /
(measurement) x (10 measurements)/(buffered scan) x 1000 buffered
scans)]. The buffer size plus the size of any Output Tables stored in SRAM
should not exceed 2 megabytes.
If the processing ever lags behind by more than the buffer allocated, the
datalogger will discard the buffered values and synchronize back up to the
current measurement
The SlowSequence instruction does not allow for this buffering scheme even