Section 7. Installation
Rules on table size change if a
CardOut()
instruction or
TableFile()
instruction with
Option 64
are included in the table declaration. These
instructions support writing of data to a memory card. Writing data to a card
requires additional memory be allocated as a data copy buffer. The CR1000
automatically determines the size the buffer needs to be (see
Memory Cards
and Record Numbers
(p. 466)
).
CRBasic example
Definition and Use of a Data Table
(p. 142)
creates a data table
named
OneMin
, stores data once a minute as defined by
DataInterval()
, and
retains the most recent records in SRAM.
DataRecordSize
entries in the
DataTableInformation
table report allocated memory in terms of number of
records the tables hold.
DataInterval() Instruction
DataInterval()
instructs the CR1000 to both write data records at the specified
interval and to recognize when a record has been skipped. The interval is
independent of the
Scan()
/
NextScan
interval; however, it must be a multiple of
the
Scan()
/
NextScan
interval.
Sometimes, usually because of a timing issue, program logic prevents a record
from being written. If a record is not written, the CR1000 recognizes the omission
as a "lapse" and increments the
SkippedRecord
counter in the
Status
table.
Lapses waste significant memory in the data table and may cause the data table to
fill sooner than expected.
DataInterval()
instruction parameter
Lapses
controls
the CR1000 response to a lapse. See table
DataInterval () Lapse Parameter
Options
(p. 145)
for more information.
Note
Program logic that results in lapses includes scan intervals inadequate to the
length of the program (skipped scans), the use of
DataInterval()
in event-driven
data tables, and logic that directs program execution around the
CallTable()
instruction.
A data table consists of successive 1 KB data frames. Each data frame contains a
time stamp, frame number, and one or more records. By default, a time stamp and
record number are not stored with each record. Rather, the datalogger support
software data extraction extraction routine uses the frame time stamp and frame
number to time stamp and number each record as it is stored to computer memory.
This technique saves telecommunication bandwidth and 16 bytes of CR1000
memory per record. However, when a record is skipped, or several records are
skipped contiguously, a lapse occurs, the
SkippedRecords
status entry is
incremented, and a 16-byte sub-header with time stamp and record number is
inserted into the data frame before the next record is written. Consequently,
programs that lapse frequently waste significant memory.
If
Lapses
is set to an argument of
20
, the memory allocated for the data table is
increased by enough memory to accommodate 20 sub-headers (320 bytes). If
more than 20 lapses occur, the actual number of records that are written to the
data table before the oldest is overwritten (ring memory) may be less than what
was specified in the
DataTable()
, or the CF
CardOut()
instruction, or a
TableFile()
instruction with
Option 64
.
If a program is planned to experience multiple lapses, and if telecommunication
bandwidth is not a consideration, the
Lapses
parameter should be set to
0
to
144
Summary of Contents for CR1000
Page 2: ......
Page 4: ......
Page 6: ......
Page 32: ......
Page 36: ......
Page 38: ......
Page 40: ......
Page 60: ...Section 4 System Quickstart Figure 16 PC200W View Line Graph 60 ...
Page 96: ......
Page 98: ...98 ...
Page 302: ......
Page 453: ...Section 8 Operation Figure 115 Using the Keyboard Display 453 ...
Page 456: ...Section 8 Operation Figure 118 Real Time Custom 456 ...
Page 457: ...Section 8 Operation 8 8 1 3 Final Memory Tables Figure 119 Final Memory Tables 457 ...
Page 458: ...Section 8 Operation 8 8 2 Run Stop Program Figure 120 Run Stop Program 458 ...
Page 460: ...Section 8 Operation Figure 122 File Edit 460 ...
Page 461: ...Section 8 Operation 8 8 4 PCCard Memory Card Display Figure 123 PCCard CF Card Display 461 ...
Page 478: ......
Page 506: ......
Page 536: ......
Page 636: ......
Page 642: ......
Page 644: ......
Page 676: ......
Page 677: ......