LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LABVIEW MEX FILE-Error

LABVIEW 8.6.1, MATLAB 2009a, Most Recent Math interface Toolkit

 

I can craft MEX files succesfully, but not execute.

 

 

I get the following error attempting to execute 

 

>> ao_based_on_ai_22_matlab(ones(1,100))
Warning: LabVIEW MEX-File Error: Failed to load some MEX-function DLLs installed
by The MathWorks, Inc. MATLAB(R). These DLLs include libmx.dll and libmex.dll.
They should be installed when MATLAB(R) is installed. Make sure they are in the
system's path.

 

Has anyone else used 2009a and received this error?  Is 2009a compatible?  2008a had no such issue.

0 Kudos
Message 1 of 16
(5,143 Views)

Dear Artaxerxes,

 

I hope you are doing fine. Thank you for contacting National Instruments. I am currently looking in to it and will get back to you as soon as possible.

 

Best regards,

Fawad Nisar
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 2 of 16
(5,116 Views)

Thankyou very much for your attention.

 

Here is the vi in question,  MEX'd with default options.

0 Kudos
Message 3 of 16
(5,114 Views)

Dear Artaxerxes,

 

Thank you for the code. I can not see where in your code you are calling any thing which has to do with MATLAB 2009a.

 

Also have you tried reinstalling the MATLAB as the error says "Failed to load some MEX-function DLLs installed by The MathWorks, Inc. MATLAB(R). These DLLs include libmx.dll and libmex.dll. They should be installed when MATLAB(R) is installed"

 

Best regards,

Fawad Nisar
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 4 of 16
(5,096 Views)

The libmx and libmex files are present and on the path. The Error is generated by LabVIEW searching for them, hence my request for confirmation that 2009a does not break the MIT.

 

I enclosed the VI so you could replicate all steps with Labview 8.6.1, the MIT and MATLAB 2009a.  There are as you note, no direct references to MATLAB within the code.

0 Kudos
Message 5 of 16
(5,093 Views)
Oh and thanks for your attention!  Missed the edit window to add it into the above.
0 Kudos
Message 6 of 16
(5,089 Views)

Dear Artaxerxes,

 

The error message you are seeing is the result of mex.dll no longer being supported in MATLAB 2009a despite the presence of the libmex and libmx.dll.

 

The last known working version is MATLAB 2008b. More information can be found in the release notes for MATLAB 2008b for the support of the mex.dll.

 

Best regards,

Fawad Nisar
Applications Engineer
National Instruments UK & Ireland
Message 7 of 16
(5,074 Views)
Aaah - exactly the answer I was looking for - thanks for your patience.
0 Kudos
Message 8 of 16
(5,069 Views)
Hi, I'm trying to run the NI-DAQmx Tools with Matlab R2009b to connect to the USB-6251 BNC analog to digital converter. I also found the same error as artaxerxes. Does that mean that NI-DAQmx Tools are not compatible with Matlab R2009b? The alternative is to purchase Matlab's Data Acquisition Toolbox, but it seems that it's not quite as extensive as NI-DAQmx Tools.
0 Kudos
Message 9 of 16
(4,668 Views)
Your MATLAB licences probably allows for you to regress to 2008 et cetera, phone 'em and ask.  You can install them side by side.
0 Kudos
Message 10 of 16
(4,647 Views)