Avoiding Time Skew; Crbasic Program Errors - Campbell CR300 Series Product Manual

Compact datalogger
Hide thumbs Also See for CR300 Series:
Table of Contents

Advertisement

22.3.3 Avoiding time skew

Time skew between consecutive measurements is a function of settling and integration times,
ADC, and the number entered into the Reps parameter of CRBasic instructions. A close
approximation is:
time skew = reps * (settling time + integration time + ADC time) + instruction setup
time
where ADC time equals 170 µs, and instruction setup time is 15 µs.
If reps (repetitions) > 1 (multiple measurements by a single instruction), no setup time
is required. If reps = 1 for consecutive voltage instructions, include the setup time for
each instruction.
Time-stamp skew is not a problem with most applications because:
 
Program execution times are usually short; so, time-stamp skew is only a few milliseconds.
l
Most measurement requirements allow for a few milliseconds of skew.
 
Data processed into averages, maxima, minima, and so forth are composites of several
l
measurements. Associated time stamps only reflect the time of the scan when processing
calculations were completed; so, the significance of the exact time a specific sample was
measured diminishes.
Applications measuring and storing sample data wherein exact time stamps are required can be
adversely affected by time-stamp skew. Skew can be avoided by:
 
Making measurements in the scan before time-consuming code.
l
 
Programming the data logger such that the time stamp reflects the system time rather than
l
the scan time using the
instruction information and program examples:
https://help.campbellsci.com/crbasic/cr300/

22.4 CRBasic program errors

Analyze data soon after deployment to ensure the data logger is measuring and storing data as
intended. Most measurement and data-storage problems are a result of one or more CRBasic
program bugs. Watch a video:
in the CRBasic programming language
DataTime()
instruction. See the CRBasic Editor help for detailed
CRBasic > Common Errors - Identifying and fixing common errors
.
.
22. Tips and troubleshooting     174

Advertisement

Table of Contents
loading

Table of Contents