LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Include Matlab DLL in LabVIEW 7.1

Hello LabVIEW experts,
i want to include a matlab m-file created dll. This dll is build as c-mex s-function and also as stand alone application.
In LabVIEW I used the call libary function with the following configurations: 
Function name: mexFunction
calling conventions: C
Parameter: all inports 8-byte Double
and reentrant.
I have connected all in- and outputs and afterwards I tried to run the programm.
The programm doesn't run and following error message occurred.
 
 
0 Kudos
Message 1 of 4
(3,399 Views)
HI,
 
I have also faced these problems many times. This is what I follow. But this is not a 100% cure.
 
1. Make a new VI
2. Make sure the calling conventions are proper. (for matlab it is definitely C)
3. The Inputs and the Outputs should be properly taken care, because a small mistake can cause a lot problem
 
Finally, kindly check if the matlab code is done correctly. Because many a times, the code seems to be working, but shows these kind of integration problems. Also try to create another dll with some other name.
 
Hopefully this helps you.
I want to know other ways to solve the problem
 
regards
0 Kudos
Message 2 of 4
(3,386 Views)

Thank you for your help.

I will try it and give you a reply.

0 Kudos
Message 3 of 4
(3,382 Views)
Hi,
The problem whit yur DLL is the data type.
 
Matlab handle mxArray data, so, you need make a new static DLL in C++ to call Matlab functions and convert the data types to double or float.
 
In this way tou can execute Matlab functions.
 
Alfredo Espinosa
0 Kudos
Message 4 of 4
(3,284 Views)