Campbell Scientific CR6 CR6 Measurement and Control System - Page 477
Program Does Not Compile, 5.3 Program Compiles / Does Not Run Correctly
View all Campbell Scientific CR6 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 477 highlights
Section 10. Troubleshooting For example, if COM1 is the source of the watchdog, knowing exactly what is connected to the port and at what baud rate and frequency (how often) the port is communicating are valuable pieces of information. 10.5.1.9 Calibration Errors Calibration errors are usually caused by an analog input that exceeds the input limits (p. 311) of the CR6. • Check all analog inputs to make sure they are not greater than ±5 Vdc by measuring the voltage between the input and a G terminal. Do this with a multimeter (p. 501). • Check for condensation, which can sometimes cause leakage from a 12 Vdc source terminal into other places. • Check for a lose ground wire on a sensor powered from a 12V or SW12 terminal. 10.5.2 Program Does Not Compile Although the CRBasic Editor compiler states that a program compiles OK, the program may not run or even compile in the CR6. Reasons may include: • The CR6 has a different (usually older) operating system that is not fully compatible with the PC compiler. Check the two versions if in doubt. The PC version is shown on the first line of the compile results. • The program has large memory requirements for data tables or variables and the CR6 does not have adequate memory. This normally is flagged at compile time, in the compile results. If this type of error occurs, check: o for copies of old programs on the CPU: drive. The CR6 keeps copies of all program files unless they are deleted, the drive is formatted, or a new operating system is loaded with DevConfig (p. 116). o that the USR: drive, if created, is not too large. The USR: drive may be using memory needed for the program. 10.5.3 Program Compiles / Does Not Run Correctly If the program compiles but does not run correctly, timing discrepancies are often the cause. Neither CRBasic Editor nor the CR6 compiler attempt to check whether the CR6 is fast enough to do all that the program specifies in the time allocated. 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 logger, but it can be a useful tool for fine tuning a program. 10.5.4 NAN and ±INF NAN (not-a-number) and ±INF (infinite) are data words indicating an exceptional occurrence in datalogger function or processing. NAN is a constant that can be used in expressions as shown in the following code snip that sets a CRBasic control feature (a flag) if the wind direction is NAN: If WindDir = NAN Then 477