Section 2. internal data storage – Campbell Scientific CR7 Measurement and Control System User Manual

Page 39

Advertising
background image

2-1

SECTION 2. INTERNAL DATA STORAGE

2.1 FINAL STORAGE AREAS, OUTPUT

ARRAYS, AND MEMORY POINTERS

Final Storage is that portion of memory where
final, processed data are stored. Data must be
sent to Final Storage before they can be
transferred to a computer or external storage
peripheral.

The size of Final Storage is expressed in terms
of memory locations or bytes. A low resolution
data point (4 decimal characters) occupies one
memory location (2 bytes), whereas a high
resolution data point (5 decimal characters)
requires two memory locations (4 bytes). Table
1.5-1 shows the default allocation of memory
locations to Input, Intermediate, and Final
Storage. The *A Mode is used to reallocate
memory or erase Final Storage (Section 1.5). A
minimum of 768 memory locations will
ALWAYS be retained in Final Storage.

Final Storage can be represented as ring
memory (Figure 2.1-1) on which the newest
data are written over the oldest data.

FIGURE 2.1-1. Ring Memory Representation

of Final Data Storage

Output Processing Instructions store data into
Final Storage only when the Output Flag is set
high. The string of data stored each time the
Output Flag is set high is called an output
array
. The first data point in the output array is
a 4 digit Output Array ID. This ID number is
set in one of two ways:

1) In the default condition, the ID consists of

the program table number and the
Instruction Location Number of the
instruction which set the Output Flag for

that output array. For example, the ID of
118 in Figure 2.1-2 indicates that the 18th
instruction in Table 1 set the Output Flag
high.

FIGURE 2.1-2. Output Array ID

2) The output array ID can be set by the user

with the second parameter of Instruction 80
(Section 11). The ID can be set to any
positive integer up to 511. Instruction 80
must follow the instruction which set the
Output Flag high. This option allows the
user to make the output array ID
independent of the programming. The
program can be changed (instructions
added or deleted) without changing the
output array ID. This avoids confusion
during data reduction, especially on long
term projects where program changes or
updates are likely.

NOTE: If Instruction 80 is used to
designate Final Storage and parameter 2 is
0, the output array ID is determined by the
position of Instruction 80 or by the position
of the instruction setting the Output Flag,
whichever occurs last.

Data are stored in Final Storage before being
transmitted to an external device. There are
four pointers which are used to keep track of
data transmission. These pointers are:

1.

Data Storage Pointer (DSP)

2.

Display Pointer (DPTR)

3.

Printer Pointer (PPTR)

4.

Telecommunications (Modem) Pointer (MPTR)

Advertising