BufferOption (Buffer Option)

Determines how data will be buffered during the Scan…NextScan process (this option can be left at 0 if the datalogger is running in sequential mode since measurements and processing are carried out in sequential order rather than concurrently, and no processing tasks are buffered). The options are:

Code Description
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. For CPI networks, beginning with datalogger OS 4, setting the BuffOption to 2 will result in a CPI Frame Sync on every scan. This will force data to be processed immediately upon reception and will allow any control/output to take place immediately.
>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 BufferOption 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 4 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 number of scans in the buffer waiting to be processed can be monitored by looking at the Buff.Depth parameter in the datalogger's status table. If the number of measurements waiting to be processed becomes greater than Buff.Depth can handle, the datalogger will "catch back up" and a Skipped Scan will be recorded.

The SlowSequence instruction does not allow for this buffering scheme even though Scan is used to signify the start of a scan in a slow sequence. In SlowSequence, the measurements are stored in a single buffer. Processing of this buffer is completed before the NextScan measurements are made.

Type: Constant