LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Code in debug runs ok, but in realease mode fails - uses PCI-6704

This is a weird one.

I've inherited an application that since being installed on a PC with a PCI-6704 card it behaves strangely.

The application performs many tests and measurements, the first set of measurements being voltages. When the tests are run the first time, the measurements make sense, i.e. valid readings of around 1mV. Yet when the tests are run again, the readings are 76V, which is quite a difference. The only way to get the test to work properly again, is to close and re-open the application.

The weirdness doesn't stop there. If run in debug mode, then the tests work fine and can be repeated again and again, without restarting the software. Furthermore, the application displays th
e same behaviour with nothing connected to the DAQ card!

This means I cannot debug the problem too easily.

The application resets the DAQ card to default settings, to no avail (least not in release mode).

More weirdness, the very same application runs fine on a PC with an AT_MIO_16DE-10 card, in both debug and release configuration.

I tried 'excluding' all measurements made after the ones in question, in order to see if some specific test or line of code was responsible. With all subsequent test code excluded, the measurements are OK in release mode. I tried 'un-excluding' code line by line until I found a line that caused the problem. Having found it, I then 'excluded' all lines in the routine containing the found line, to produce a version I new to work OK, and it failed, after having worked an hour earlier! I believe this rules out compiler bugs, as the it produces a build that's OK one minute and fails the next.

The NI_DAQ version is 6.7.0f6 on a NT4 workstation.
I'll try the newer 6.9.2 version from the web.

Failing this, any other suggestions? Are there some peculiarities with the card I need know about?

Has anyone any other suggestions?

Many Thanks (if only for reading this!)

Simon Reeve
0 Kudos
Message 1 of 1
(2,616 Views)