Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading data with Matlab cause system dump

I am having trouble with the DAQCArd-AI-16XE-50 on a Windows XP Pentium4 PC.

I am trying collect analog data from the card within the Matlab 12.1 environment. After I create the object and begin collecting data, the system crashes to blue screen with:

something about
DRIVER_IRQL_NOT_LESS_OR_EQUAL
and something about the
Nidaq32k.sys

Oddly, I am still able to collect 1 round of data, start, getdata, stop --- if I first go to the Device Manager and look at the device or a list of all IRQs on the computer. Although, if I try and collect a second set of data after this first one, the computer crashes to blue screen.

The card appears to be working fine within the Measurement and Automation Test area, though after I
collect the first set of data, within that area I get a:
Last Error -10845 Fatal Error

Any help would be greatly appreciated.

Thanks,
Danny
0 Kudos
Message 1 of 5
(3,098 Views)
Danny,

Let's remove software (Matlab) from the picture and just concentrate on getting your hardware working properly from within MAX. MAX, as a configuration and diagnostic utility, is what we can use to verify that your hardware and driver are installed properly.

If you open MAX, right-click on your device, choose properties, and click the "Test Resources" button, does your device pass the test? Yes, then it looks like we have a good install of the hardware and driver. Now right-click on your device and choose "Test Panels." Choose the "Analog Input" tab and select the DAQCard channel from which you want to view data. Ensure that the Data Mode is Strip Chart and the Y Scale is Full Range. Now, do you still get the -10845 error? If you not see th
is error, then your hardware and driver are working properly.

At this point the problem must be due to software. Unfortunately, I will not be the best person to contact regarding operation of Matlab with dlls or device drivers. I'm affraid that The Mathworks Technical Support would be the best group to contact with regards to this area.

Please let me know if you are still receiving an error from MAX.

Regards,
Justin Britten

Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,098 Views)
Justin,

Thanks, but I'm still not getting anywhere. I followed your instructions.

I opened MAX, ran the Test Resources and Test Panel --- everything looks fine. But, if I run the code I have in Matlab to collect data, I crash the entire computer to blue screen immediately. I contacted Mathworks about it and received the following:

---------------------------------------------------

Case ID: 1139778

Hello Daniel,

I am writing in response to your e-mail of April 29, 2003 in which you asked:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I am trying use a DAQCard-AI-16XE-50, NI 6012E with Matlab to collect
analog data.

I continue to get a blue screen when using the following code:

aichan = 0:5;
chnames = {'Fx','Fy','Fz','Mx','My','Mz'};
...

If the sample size and number of samples are reduced, I found it possible
to record a single recording, such as 1 channel, 100Hz, 100samples. But
even following such a sample with another caused the system to crash.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Our development staff has investigated this issue and have determined that
this blue screen you are receiving can be generated without the use of our
Data Acquisition Toolbox and MATLAB. The problem seems to lie in the
DAQCard hardware driver itself. We have notified National Instruments
about this and they are working with us to resolve this problem. There is
nothing we can do at this time until NI fixes their hardware driver for
their DAQCard boards (other boards are displaying similar behavior, mainly
PCMCIA).

Note that we do not support the NI-6012E board. I am assuming you listed
two boards in your e-mail.

Sincerely,

Peter Osburnsen
Application Support Engineer
================================
The Mathworks, Inc.
E-mail: posburns@mathworks.com
WWW: http://www.mathworks.com
FTP: ftp://ftp.mathworks.com
Phone: (508) 647-7000
Fax: (508) 647-7201
================================

-----------------------------------------------

So, it seems that I'm running in circles. Perhaps this is not a viable solution to my application at this time. Also, I cannot repeat the 10845 error. And I have the DAQCard-AI-16XE-50.

Thank you for your help.

-Danny
0 Kudos
Message 3 of 5
(3,098 Views)
Danny,

As I stated previously, if you test your board and driver in MAX, then the problem must exist in software. Certainly, there are calls you can make from software into the driver that will cause the problems you are seeing. For instance, the mysterious 10845 you have been unable to reproduce. This error is a hardware (FIFO) buffer overflow error. It is caused when the NI-DAQ driver cannot read data from the DAQ device's FIFO buffer fast enough to keep up with the acquired data as it flows to the buffer. This is usually a result of the combination of a small buffer, a high scan rate, and infrequent read calls to gather data from the onboard FIFO to PC memory. As you can tell, all three of these variables are set in software. I'm
certainly not blaming Matlab or saying our products are incompatible, because they are compatible. I am just saying that there are functions that could be made into the driver, from any language, that could cause erroneous results, crashes, etc.

One perk of LabVIEW is that it is tightly integrated into our hardware drivers. Development time is reduced and made much easier. Not to mention support for both software and hardware can come from the same company and there's no chance of a customer becomming the monkey in the middle. While I'm sure you would benefit from LabVIEW, I am currently just your Applications Engineer trying to get your measurement system running to your satisfaction and not going to try and sell you more products. Go ahead and attach to this post the smallest portion of Matlab code that will effectively reproduce the crash you are seeing. I will not be able to run your code since The Mathworks has banned NI from buying any of their software; however, I can
certainly run it by the eyes of some of our previous Matlab users and possibly something may stand out. I can't make any promises, but it's better than getting the corporate run-around.

Regards,
Justin
0 Kudos
Message 4 of 5
(3,098 Views)
Danny,
We have recently issued a patch to the NI-DAQ 6.9.3 driver that is causing blue screens. This may help solve your problem. If you have already upgraded to NI-DAQ 7.0 (and don't want to uninstall and revert to 6.9.3) this issue will be fixed in the next release of NI-DAQ. Here's the link to the KB that talks about the bluescreen and a link to the patch: http://digital.ni.com/public.nsf/websearch/04EE47946D3C4F6A86256D87006887EC?OpenDocument.
Hope this helps!
0 Kudos
Message 5 of 5
(3,098 Views)