Timeout error with NI-6731 and NI-MIO-16XE-10

2 ビュー (過去 30 日間)
Joachim
Joachim 2011 年 8 月 10 日
Hi guys,
I'm using Matlab with NI-6731 and NI-MIO-16XE-10 to simultaneously output and read analog data on multiple channels. (I have to switch between different channel (ch) configurations quite often, and stop(ch), delete(ch), clear(ch) for this purpose, then reinitialize the channels.)
My problem is, that my program crashes regularly after like 2-8 hours, and I cannot find the reason. When the problem occurs, I get an error message when trying to start the task (what worked ~500 times before in that session). I have 3 tasks, analog output on NI-6731, analog output on NI-MIO-16XE-10, and analog input on NI-MIO-16XE-10. It is strange, that not always the same task is not responding, but from time to time it is a different one, or even multiple ones, also on different cards.
If this happens, a plane error text message, no link, printed in black is output (while the main program continues running):
Error event occurred at 09:16:12 for the object: nidaqmxDev1-AI.
A time-out occurred while trying to start the task.
At this point of the code I then check, if the tasks are actually running and starting was successful. If not, I wait for some seconds, check again. If not, I try to use "daqreset" to reset the DAQ-enginge. This sometimes brings the plane message:
Warning: Internal STOP error: Timeout waiting for OBJ to stop.
Stop has been forced.
So, I cannot find a way to start the task then from my running program.
These Messages don't look like standard Matlab errors. Can they be directly from the Nationial Instruments Driver?! (sorry if that question is dump, I'm not familiar with the exact driver structures used in DA Toolbox).
Even if I interrupt the program and restart it starting with
clear all
close all
instrreset
daqreset
it doesn't work...
However, if I close Matlab, and restart it again, things work, again only for say 3-8 hours.
Is there something more to reset during a matlab session, to get closer to a restarted matlab? Perhaps unregister and reregister 'nidaq'?!
I use Matlab 2011a + current Data Acquisition Toolbox, Windows 7 32 Bit, 3GB RAM, Intel Core 2 Quad Q8400, National Instruments NI-DAQmx 9.4. Unfortunately the code is way to large to put it here.
I'm desperately waiting for some comments or speculations.
Best regards,
Joachim

回答 (4 件)

Daniel Shub
Daniel Shub 2011 年 8 月 10 日
The errors you are getting, despite there odd formatting, are MATLAB errors. I have an open service request that Mathworks has called a bug in an email to me, but is not in their bug report system, so it seems they are treating it as an enhancement request. Basically, when MEexception objects are thrown by a callback, MATLAB gets all confused. You can tell something is happening since the formatting is all screwed up. If you can figure out the callback that is causing the error, you can wrap it in a try-catch and get a little more info to debug it on.
I have little experience with NI and the DAQ toolbox, so I cannot help you there.
  1 件のコメント
Joachim
Joachim 2011 年 8 月 10 日
Thank you for the answer. I had so far not thought about a callback being responsible.
The errors are coming from a 'start(ao_laser)' command within a regular function, not within a callback. However, there are 2 timers running all the time and their callbacks are also reading from ao_laser... I'll try to find out if one of them is responsible.

サインインしてコメントする。


Joachim
Joachim 2011 年 8 月 16 日
Unfortunately my timers' recalls don't seem to be responsible for the above behavior... I removed all timers and nothing changed. Any further suggestions?

Ke Feng
Ke Feng 2013 年 5 月 20 日
Is there any progress on this? I am using 2013a and 2011b, both having the same problem. My problem happens about every 30 hours, which is a big frustration. Did you find a work around?

Joachim
Joachim 2013 年 5 月 20 日
Hi! I turned to the session-based interface, which did in the beginning not support my hardware, but does this now.
So far, the session-based interface works nearly free of errors, for me.
The only thing that doesn't work for me, is a so-to-say "semi-continuous" output mode, such that the analog output is running and you are continuing to queue data to the running task. When I stop queueing data, the session produces an error before all data is output...
Besides this particular occasion, I have no problems with the session based interface.
Best regards, Joachim

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by