Timeout error with NI-6731 and NI-MIO-16XE-10
1 view (last 30 days)
Show older comments
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
0 Comments
Answers (4)
Daniel Shub
on 10 Aug 2011
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.
As for resetting MATLAB it is pretty hard: http://www.mathworks.com/matlabcentral/answers/1093-how-do-i-reset-matlab-to-its-launched-state
I have little experience with NI and the DAQ toolbox, so I cannot help you there.
Ke Feng
on 20 May 2013
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?
0 Comments
See Also
Categories
Find more on National Instruments Frame Grabbers in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!