Standalone executiable won't work properly

조회 수: 1 (최근 30일)
Maxime Jardonnet
Maxime Jardonnet 2013년 4월 8일
편집: Sam Walder 2019년 2월 18일
Hi all,
I created a program with a GUI, the goal is to output signals to different devices (3) using a NationalInstruments Data acquisition card.
First thing you have to know is that everything works well when i'm using it INSIDE Matlab. but after compiling with mcc -mv main.m -a *, the standalone .exe don't have the same behaviour.
As an example, The first thing the program have to do is to verify if the device is connected (USB) using a try/catch structure. But even if the device is connected, the program throw me the error message in 'catch'.
In my opinion, there's probably an issue whit the compiler because everything is fine inside Matlab but I wonder what the problem could be...
I'm using Matlab R2012b and compiler version 4.18
Thanks in advance.
  댓글 수: 4
Friedrich
Friedrich 2013년 4월 9일
Could you remove that try catch so that we see the actual error message matlab provides?
Maxime Jardonnet
Maxime Jardonnet 2013년 4월 9일
I got this running the .exe (still running well inside matlab) :
Error using find_ni_usb_6008 (line6)
The vendor 'ni' is not known. Use 'daq.getVendors()' for a list of vendors.
daq:general:unknownVendor

댓글을 달려면 로그인하십시오.

답변 (2개)

Image Analyst
Image Analyst 2013년 4월 8일
My guess would be that the drivers for the device aren't installed in your target computer. Have you tried everything in the FAQ yet? http://matlab.wikia.com/wiki/FAQ#My_standalone_executable_won.27t_run_on_the_target_computer._What_can_I_try.3F
  댓글 수: 10
Maxime Jardonnet
Maxime Jardonnet 2013년 4월 9일
https://docs.google.com/file/d/0B3x7iP9t_eeLNnd4N2NiN2dMQTg/edit?usp=sharing
Friedrich
Friedrich 2013년 4월 9일
편집: Friedrich 2013년 4월 9일
So you posted a crash log also. When does it crash exactly? The DWI file shows an interesting installation path of your 64bit MATLAB:
c:\program files (x86)\matlab\r2012b
Normally 64bit applications are installed into
c:\program files\
Not sure if this may cause any troubles. In addition only one NI DLL shows up which is found:
c:\program files\national instruments\shared\mdns responder\NIMDNSNSP.DLL
I can't spot any other NI file which is looked for.
Maybe compile the daqsupport function into a small exe and run it on that machine to figure out what is missing on the target machine.

댓글을 달려면 로그인하십시오.


Sam Walder
Sam Walder 2019년 2월 18일
편집: Sam Walder 2019년 2월 18일
I had the same issue in my application - the DAQ would connect and work in the full Matlab environment, but not in the compiled application. I resolved the issue by making sure to update everything in NI MAX on both the development and deployment machines. I am not sure why this was an issue - but it fixed it for me.
It may be useful to note that there are some similar questions on this topic on the forum:

카테고리

Help CenterFile Exchange에서 Data Acquisition Toolbox Supported Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by