Program Does Not Compile; Program Compiles But Does Not Run Correctly - Campbell CR300 Series Product Manual

Compact datalogger
Hide thumbs Also See for CR300 Series:
Table of Contents

Advertisement

17.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 data logger itself. This is rare, but reasons may include:
The data logger has a different operating system than the computer compiler. Check the
l
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 www.campbellsci.com. When run, the executable file updates the computer compiler.
To update the data logger operating system, see
The program has large memory requirements for data tables or variables and the data
l
logger does not have adequate memory. This normally is flagged at compile time in the
compile results. If this type of error occurs: 
Check the CPU drive for copies of old programs. The data logger keeps copies of all
o
program files unless they are deleted, the drive is formatted, or a new operating
system is loaded with Device Configuration Utility.

17.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()
logger, but it can be a useful tool for fine-tuning a program. For more information, see
Information tables and settings (advanced)
InstructionTimes()
results can be difficult due to the multitasking nature of the data
(p. 150).
Updating the operating system
instruction in the program. Analyzing
17. Tips and troubleshooting
(p. 113).
124

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr300Cr310

Table of Contents