9.4.1 Program does not compile
When a program is compiled, the CRBasic Editor checks the program for syntax errors and other
inconsistencies. The results of the check are displayed in a message window at the bottom of the
main window. If an error can be traced to a specific line in the program, the line number will be
listed before the error. Double-click an error preceded by a line number and that line will be
highlighted in the program editing window. Correct programming errors and recompile the
program.
Occasionally, the CRBasic Editor compiler states that a program compiles OK; however, the
program may not compile in the datalogger itself. This is rare, but reasons may include:
l
The
datalogger
has
a
different
operating
system
than
the
computer
compiler.
Check
the
two
versions
if
in
doubt.
The
computer
compiler
version
is
shown
on
the
first
line
of
the
compile
results.
Update
the
computer
compiler
by
first
downloading
the
executable
OS
file
from
.
When
run,
the
executable
file
updates
the
computer
compiler.
To
update
the
datalogger
operating
system,
see
109).
l
The program has large memory requirements for data tables or variables and the
datalogger does not have adequate memory. This normally is flagged at compile time in
the compile results. If this type of error occurs:
o
Check the CPU drive for copies of old programs. The datalogger keeps copies of all
program files unless they are deleted, the drive is formatted, or a new operating
system is loaded with Device Configuration Utility.
o
Check the USR drive size. If it is too large it may be using memory needed for the
program.
o
Ensure a memory card is available when a program is attempting to access the CRD
drive.
9.4.2 Program compiles but does not run correctly
If the program compiles but does not run correctly, timing discrepancies may be the cause. If a
program is tight on time, look further at the execution times. Check the measurement and
processing times in the Status table (MeasureTime, ProcessTime, MaxProcTime) for all scans, then
try experimenting with the
InstructionTimes()
instruction in the program. Analyzing
InstructionTimes()
results can be difficult due to the multitasking nature of the
datalogger, but it can be a useful tool for fine-tuning a program.
9.5 Resetting the datalogger
A datalogger reset is sometimes referred to as a "memory reset." Backing up the current
datalogger configuration before a reset makes it easy to revert to the old settings. To back up the
9. Tips and troubleshooting
118
Summary of Contents for CR1000X
Page 1: ...Revision 02 21 2019 Copyright 2000 2019 Campbell Scientific ...
Page 2: ......
Page 4: ......
Page 6: ......
Page 8: ......
Page 16: ...Appendix A Glossary 176 Appendix B Index 214 Table of Contents viii ...
Page 192: ......