LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use MATLAB functions straight from CVI?

I was wondering whether anyone has attempted to use MATLAB functions straight from CVI, persumably by transforming them in C (using the MATALAB C compiler), and then integrating to a dll, which can be used through CVI.

I suppose there are two other alternatives:

1. To use MATLAB functions from CVI by means of MATLAB ActiveX Automation server (requires to open MATLAB though).

2. Compile everything (CVI UI, C routines used in CVI) using MSVC++, and also compile in MSVC the required MATLAB functions using the MATLAB C compiler (however this compiler doesn't supports all MATLAB functions).

Thank you.
0 Kudos
Message 1 of 2
(2,748 Views)
Hello

I guess if you are concerned about speed issues, activex might be a bit slower than using a dll.
You could integrate just the Matlab functions into a C dll, and then just use the dll from CVI itself. If you are using Visual C++ to do it, make sure you specify extern "C" linkage, since CVI cannot handle name mangling.

Just a suggestion

I hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 2
(2,748 Views)