02-20-2009 05:05 AM
Hello, I'm looking to solve a blue screen lockup problem with my measurement application, which I'm developing with C++. The lockup seems to manifest somewhat randomly after a varying amount (500-50,000) of analog voltage measurements. My application needs to do a huge amount of these digitally triggered voltage measurements after a certain delay, and I'm using a single task to do them. The task is stopped and started after a single measurement is done, which is done around 10,000-100,000 times in a second. This is done because I'm doing synchronized data acquisition with the PCI-6251 card and a Ztec oscilloscope card. It seems that the lockup likelihood might be related to the frequency of voltage measurements I perform.
The application itself is multi-threaded, but I'm blocking simultaneous access to the card with locking - all access to the card is behind a single mutex lock, so concurrent access is blocked. In any case all data acquisition access o the card is behind a single thread, which is dedicated for daq operations. I have also done stress-testing with the Ztec scope card, which didn't result in any problems. I also disabled the Ztec card's data acquisition in order to make sure it wasn't the scope card causing the problems - the problem persisted, so this seems to point to the nidaq card's direction. The lockup appeared when I used the original drivers that came with the card. I installed the newest drivers (removed the device from Windows' device manager and your Measurement & Automation application, reinstalled) but the blue screen still pops up.
The blue screen gives me some debug data but it doesn't seem to mention any .dlls or something that would obviously point to a specific (driver) file. I'm attaching at least part of the relevant code snippets.
Solved! Go to Solution.
02-20-2009 05:10 AM
02-20-2009 05:31 AM
02-23-2009 07:12 AM
02-24-2009 01:21 PM
Hi Hohum-hrm,
Would it be possible if you can attach a stripped down version of the project, including the main function, so that I can try running the code on our end to see if we can reproduce the issue? Also, I would appreciate if you can give me some small instructions as to what connections need to be made in order to run the code. Hopefully this will help us find what may be at fault.
Regards,
S_Hong
Applications Engineer
National Instruments
02-25-2009 04:55 AM
02-25-2009 08:03 AM
02-27-2009 07:03 AM
Hello again! I was in contact with a local support person, who suggested that I use DAQmx_Val_FiniteSamps instead of DAQmx_Val_HWTimedSinglePoint. I did no other changes but this (shown below) and the problem went away, so this seems like an acceptable solution, as I see no reason why not do it this way. (Thanks Henry!)
//DAQmxErrChk(DAQmxCfgSampClkTiming(task_reader, NULL,100000.0,DAQmx_Val_Rising,DAQmx_Val_HWTimedSinglePoint, 1));
DAQmxErrChk(DAQmxCfgSampClkTiming(task_reader, NULL,100000.0,DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, 2));