What I have to do to create a .exe from a .m and .fig in which I acquire and send data from a USB-6002 National Instruments device? My .m and .fig files work perfectly in Matlab, but when I create the .exe the program doesn't recognize the device.

1 vue (au cours des 30 derniers jours)
Hello,
I have created a GUI in which I acquire and send data from the National Instruments USB-6002. When I run the .m and .fig files in Matlab, it works perfectly, recognizing the device properly. Then, I create a .exe with the deploytool and when I execute it the program doesn't recognize the device.
Why can happen this? is there any file that I should add when I build that I am not adding now? I attach the .m as the main file and two pictures and the .fig in the shared resources and helper files.
Please I would appreciate if someone could help me because the program works properly in matlab but I can not supply it to my client because I do not have the .exe.
Thank you very much,
Mhl.

Réponses (2)

Georg Gamauf
Georg Gamauf le 21 Sep 2016
Hello Marina!
I have almost the same problem using a "Pico Technology Picoscope 4824". I cannot answer your question, but i'm sure it would be helpful to get more information about the errors you get. You can get the error messages while running the .exe file outside of matlab by unchecking the "Do not display the Windows Command Shell (console) for execution" during the application compilation process in MatLab - you find it under "Additional Runtime Settings". I guess that some drivers (or anything like that; .dll files for example) are missing.
Best wishes, Georg

Marina Hinojosa
Marina Hinojosa le 22 Sep 2016
Thank you very much for your answer Georg.
I finally found the problem. The problem was with daq.getDevices as it doesn't work from a function in a deployed application but it does work from a script.
The solution is here, it works perfectly:
https://es.mathworks.com/matlabcentral/newsreader/view_thread/325053
I hope you can solve your problem.
Best regards,
Marina.

Community Treasure Hunt

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

Start Hunting!

Translated by