Section 7. Installation
7.8.2.2.1 Inserting Comments into Program
Comments are non-executable text placed within the body of a program to
document or clarify program algorithms.
As shown in CRBasic example
Inserting Comments
(p. 126),
comments are inserted
into a program by preceding the comment with a single quote (
'
). Comments can
be entered either as independent lines or following CR1000 code. When the
CR1000 compiler sees a single quote (
'
), it ignores the rest of the line.
CRBasic Example 2.
Inserting Comments
'This program example demonstrates the insertion of comments into a program. Comments are
'placed in two places: to occupy single lines, such as this explanation does, or to be
'placed after a statement.
'Declaration of variables starts here.
Public
Start(6)
'Declare the start time array
BeginProg
EndProg
7.8.2.2.2 Conserving Program Memory
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.
Read More
More information on string variable-memory use and conservation is
available in
String Operations
(p. 282).
7.8.3 Sending CRBasic Programs
The CR1000 requires that a CRBasic program file be sent to its memory to direct
measurement, processing, and data-storage operations. The program file can have
the extension cr1 or .dld and can be compressed using the GZip algorithm before
sending it to the CR1000. Upon receipt of the file, the CR1000 automatically
decompresses the file and uses it just as any other program file. See the appendix
Program and OS Compression
(p. 463)
for more information.
Options for sending a program include the following:
•
Program Send
(p. 524)
command in
datalogger-support software
(p. 95)
•
Program
send command in
Device Configuration Utility
(
DevConfig
(p. 111))
•
Campbell Scientific
mass storage device
(p. 653)
or memory card
126
Содержание CR1000
Страница 2: ......
Страница 4: ......
Страница 6: ......
Страница 32: ......
Страница 36: ......
Страница 38: ......
Страница 40: ......
Страница 60: ...Section 4 System Quickstart Figure 16 PC200W View Line Graph 60 ...
Страница 96: ......
Страница 98: ...98 ...
Страница 302: ......
Страница 350: ...Section 8 Operation Figure 91 Pulse Sensor Output Signal Types Figure 92 Switch Closure Pulse Sensor 350 ...
Страница 453: ...Section 8 Operation Figure 115 Using the Keyboard Display 453 ...
Страница 454: ...Section 8 Operation 8 8 1 Data Display Figure 116 Displaying Data with the Keyboard Display 454 ...
Страница 456: ...Section 8 Operation Figure 118 Real Time Custom 456 ...
Страница 457: ...Section 8 Operation 8 8 1 3 Final Memory Tables Figure 119 Final Memory Tables 457 ...
Страница 458: ...Section 8 Operation 8 8 2 Run Stop Program Figure 120 Run Stop Program 458 ...
Страница 460: ...Section 8 Operation Figure 122 File Edit 460 ...
Страница 461: ...Section 8 Operation 8 8 4 PCCard Memory Card Display Figure 123 PCCard CF Card Display 461 ...
Страница 478: ......
Страница 506: ......
Страница 536: ......
Страница 636: ......
Страница 642: ......
Страница 644: ......
Страница 676: ......
Страница 677: ......