9.4 Data logger programming
Short Cut is the best source for up-to-date data logger programming code. Programming code is
needed when:
l
Creating a program for a new data logger installation
l
Adding sensors to an existing data logger program
If your data acquisition requirements are simple, you can likely create and maintain a data logger
program exclusively with Short Cut. If your data acquisition needs are more complex, the files
that Short Cut creates are a great source for programming code to start a new program or add to
an existing custom program.
NOTE:
Short Cut cannot edit programs after they are imported and edited in CRBasic Editor.
See
Programming quickstart using Short Cut
(p. 6) for a Short Cut tutorial. If you wish to import
Short Cut code into CRBasic Editor to create or add to a customized program, follow the
procedure in
Importing Short Cut code into CRBasic Editor
(p. 41). Complete program examples
can be found in:
9.4.1 Scan buffers
When VOLT 100 series instructions are included in a program, Campbell Scientific recommends
setting the
BufferOption
of the
Scan()
instruction to a value greater than or equal to two
seconds’ worth of scans. For example, if the scan rate is 50 ms (.05 s), set the
BufferOption
to
40 (2 s ÷ .05 s = 40). At a minimum, the
BufferOption
should be set to 3.
The data logger processes the data from the VOLT 100 series in batches according to frame syncs
received from the VOLT 100 series. Upon receiving a batch of data, the data logger puts it into a
processing queue. Processing the data may take more time than is available in a single scan. The
BufferOption
allows the data logger to balance its task load by processing the data from the
VOLT 100 series during subsequent scans while maintaining correct data time stamps. If a
BufferOption
is not set, the data logger will attempt to process all of the data during the
scan it is received, which can result in skipped scans. Scan buffers are only used when the data
logger is running in pipeline mode.
9.4.2 GRANITE Measurement Module instructions
For the most current information on data logger instructions, refer to the CRBasic Editor Help.
The first two parameters for each CDM instruction are the
CDMType
and
CPI_Addr
.
CDMType
refers to the GRANITE Measurement Model used. Valid entries are VOLT108 and VOLT116.
CPI_
VOLT 100 series
25