Matlab stop execution without any error while doing a real-time acquisition
Show older comments
Hello everybody,
I have a issue that maybe someone can clear me up. Basically, I built a GUI (graphical user interface) and I am using it to make some analyses while acquiring real-time data from a National Instrument hardware.
The problem is that at some time the Background acquisition stops without returning any error. Does anybody know why this happens or to what it might be related? Is there any way to solve this issue?
Thank you all.
4 Comments
Xavier
on 11 Sep 2020
Are you able to provide more information such as code and the hardware in question?
Mario Malic
on 11 Sep 2020
Edited: Mario Malic
on 11 Sep 2020
The problem is that at some time the Background acquisition stops without returning any error. We see no code and can't help, but guess. Since it's a GUI, maybe you enter some function and/or does calculation so your screen does not refresh after some time (do you have drawnow?). If you save data in a variable during the analysis, assign it to workspace and see values for the time after your data acquisition stops.
Xavier
on 11 Sep 2020
Yes use drawnow to force the GUI to update
Mario Malic
on 11 Sep 2020
Edited: Mario Malic
on 11 Sep 2020
I checked the other thread, maybe this solution might help, it will stop updating GUI once process is closed
while ~daqSession.HasExited
drawnow
pause (0.1) % Updates GUI every 0.1s
end
Answers (0)
Categories
Find more on Simultaneous and Synchronized Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!