08-08-2011 09:09 AM - edited 08-08-2011 09:10 AM
I modified the example VI "Configuring an NI 9401 for Bidirectional DI/O By Nibble with DAQmx" so as to be able to execute a finite sample generation/acquisition controlled by the Onboard Clock. The setup is a NI cDAQ-9174 chassis with a NI 9401 module.
when running this VI, my PC suddenly shutdowns and restarts ...
Is it possible to acquire and generate signals at a definite rate with the onboard clock with that setup (I have done this previously with cards from the serie M or S successfully)?
Thanks for any hints because the shutdown of the PC makes the debugging slightly cumbersome.
Laurent
Solved! Go to Solution.
08-08-2011 11:14 AM
Unfortunately it seems like interactions between your application and our driver have caused your PC to crash.
May you tell me what kind of operating system are you running? Windows XP? Windows Vista? Windows 7? May you also tell me what version of the DAQmx driver are you using?
To provide a little more information, you can configure your PC to save a crash dump when this happens again. You can take a look at following links to see how to do it:
http://digital.ni.com/public.nsf/websearch/190A57D2D4E6B187862570BD00831ABF?OpenDocument
http://digital.ni.com/public.nsf/allkb/581127525C80606A862570BE0003111D
08-08-2011 11:26 AM
I ran your VI using DAQmx 9.4 and it errored (-200462, generation cannot be started because the right buffer is empty). I suspect there was a bug in older versions of DAQmx that was recently fixed. If you post the version of DAQmx you are using I can confirm that.
Once you install a version of DAQmx that doesn't crash for you, you will still need to modify your VI to fix the -200462 error. When doing hardware timed digital output, you must call Write before starting the task. If DAQmx allowed you to start and then write data, the task would most likely immediately underflow because you would generate a sample clock before data could be transferred to the device.
08-08-2011 12:10 PM
I found a issue similiar to your situation in the buglist for an older version of DAQmx, and it has been fixed in the latest release of DAQmx version 9.4. It is listed in fixed issues of the readme.html for DAQmx 9.4 as "CAR 301517 Reserving Digital Output Task on NI 9401 Before Writing or Configuring Timing Causes Blue Screen". (http://ftp.ni.com/support/softlib/multifunction_daq/nidaqmx/9.4/readme.html)
To resolve this issue, you can updgrade to DAQmx 9.4 or try this workaround: in your VI, put DAQmx Reserve Task VI after DAQmx timing VI. I have reproduced your crash on my own PC with an older version of DAQmx, and trying this workaround prevents the crash. And of course, after implementing the workaround, you still have to do what MarkGrot has suggested to pre-write to your buffer before the generation starts for your application to proceed without error.
I attached a modified VI with the workaround and addition of pre-writing to the buffer to this post.
Please try it out and let us know if this resolves your issue. Sorry for the troubles.
08-09-2011 06:08 AM
Dear MarkGrot and Notorious JZ
Thank you very much for your explanations, tests and advices.
As you wrote, once I upgraded to DAQmx 9.4 (the previous version was 9.1.5) the PC did not crash anymore and the error -200462 occured; after having corrected the VI following your instructions, there was no problem anymore.
Thanks once again
Laurent