LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use Matlab2019b generated DLL in LabVIEW2020 32b

Hello,

 

I'm trying to use a .NET assembly DLL generated by MATLAB 2019b (only 64 bit) on LabVIEW 2020 (32-bit). First reason is the end of support of mathscript in future Labview release.

 

I was inspired by the following article https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YGE2CAO&l=fr-CH .

 

But the article doesn't mention the bitness version of labview/matlab/dll... It seems impossible with Labview 32b. However 32 bit Labview is the most used today due to old hardware drivers in 32bits.

 

I make some research on google, but i didn't find a way to create a 32-bit dll from MATLAB (if it's possible).

 

Is anyone of you already encounter this problem, and could share its experience on it ?

 

Thanks,

 

0 Kudos
Message 1 of 5
(654 Views)

Why not do it all in LabVIEW?  [Of course, we have no idea what you are trying to do with the MatLab DLL -- why don't you enlighten us?].

 

Bob Schor

0 Kudos
Message 2 of 5
(624 Views)

The idea was to collect the raw data with Labview, and do the post-processing with Mathscript.

 

The post-processing is developed in Matlab by Matlab engineers. Post-processing includes regression ,matrix inversion, signal filtering, sometimes non-linear fitting. I know that all of these could be done on Labview, but the main advantages to keep it in matlab language is the ability to debug, to test, to plot signals inside the Matlab IDE that is more practical. Moreover, results are not exactly the same between mathscript and matlab, then it could be worst between labview and matlab due to differences between functions.

0 Kudos
Message 3 of 5
(619 Views)

From https://nl.mathworks.com/matlabcentral/answers/513979-what-bitness-matlab-runtime-should-be-used-wit...

 

If the library is compiled with Matlab R2016a or later, then only 64-bit MATLAB Runtime is available and the compiled library can only be used by 64-bit applications.

 

There is no getting around that, no matter how much you try to jump high and low. You either have to use LabVIEW 64-bit too, or get an oooooold Matlab installation before 2016, or start to really get busy. You could write a 64-bit application in LabVIEW that uses the Matlab assembly and use some form of interprocess communication between that and your 32-bit LabVIEW application. Lots of work and possibilities for bugs, but it's a possibility.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 5
(612 Views)

Thank you for information.

 

I decide to test it on the 64-bit Labview version.

 

I'm trying to test the .NET assembly in native and non native (with MXarray.dll, matlab object), but I don't know what is the drawback/advantages of these 2 solutions.

0 Kudos
Message 5 of 5
(594 Views)