beautypg.com

2 memory conservation – Campbell Scientific CR3000 Micrologger User Manual

Page 344

background image

Section 8. Operation

344 

 

 

will be represented by four field names: “values(1,1)”, “values(1,2)”, 
“values(2,1)”, and “values(2,2)”.  Scalar (non‐array) variables will not 
have subscripts. 

Line 3 – Data Units

Includes the units associated with each field in the record.  If no units 
are programmed in the CR3000 CRBasic program, an empty string is 
entered for that field. 

Line 4 – Data-Processing Descriptors

Entries describe what type of processing was performed in the CR3000 
to produce corresponding data, e.g., Smp indicates samples, Min 
indicates minima.  If there is no recognized processing for a field, it is 
assigned an empty string.  There will be one descriptor for each field 
name given on Header Line 2. 

Record Element 1 – Timestamp

Data without timestamps are usually meaningless.  Nevertheless, the 
TableFile() instruction optionally includes timestamps in some formats. 

Record Element 2 – Record Number

Record numbers are optionally provided in some formats as a means to 
ensure data integrity and provide an up‐count data field for graphing 
operations.  The maximum record number is &hffffffff (a 32‐bit 
number), then the record number sequence restarts at zero.  The 
CR3000 reports back to the datalogger support software 31 bits, or a 
maximum of &h7fffffff, then it restarts at 0.  If the record number 
increments once a second, restart at zero will occur about once every 
68 years. 

8.3.2 Memory Conservation

One or more of the following memory-saving techniques can be used on the rare
occasions when a program reaches memory limits:

• Declare variables as DIM instead of Public. DIM variables do not require

buffer memory for data retrieval.

• Reduce arrays to the minimum size needed. Arrays save memory over the

use of scalars as there is less "meta-data" required per value. However, as a
rough approximation, 192000 (4-kB memory) or 87000 (2-kB memory)
variables will fill available memory.

• Use variable arrays with aliases instead of individual variables with unique

names. Aliases consume less memory than unique variable names.

• Confine string concatenation to DIM variables.
• Dimension string variables only to the size required.