As many other LabVIEW users, I wanted to include Matlab functions in
LabVIEW by means of a DLL. To achieve this, instead of using a wrapper
DLL as I have seen in this Discussion Forums, I created the DLL with
Mathworks COM Builder, directly from the '.m' files, that builds and
registers the component.

Then I used this DLL in LabVIEW as an ActiveX component, using an
Automation Refnum to select the DLL in the Front Panel, and opening
the reference and invoking the methods that I wanted to use in the
Block Diagram, and after several difficulties (you have to use a 2D
array type to obtain an 1D array output parameter; you are not
permited to work with complex parameters, you have to use real and
imaginary components separately), I was able to have the Matlab
functions doing their job inside LabVIEW without having Matlab running
on my PC.

My problem arises when I rebuild the Matlab DLL. From that moment on,
when I run again my top VI, a message of 'Class not registered'
appears when The Invoke Node is executed. To solve this, I have to
open my DLL VI, and reasign the DLL on the Automation Refnum to the
same DLL. It seems that each time the DLL is recreated, something
related with it changes, and LabVIEW does not recognize the DLL,
despite the fact that the name of the DLL is exactly the same.

Does anyone know why is this happening? Any help?

Thanks and have a good day,

spj

Reply via email to