Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

matlab vision dll

Let's tri to be simple.

 

I'm used to Matlab DLL, but it's the first time I use it in a Vision .vi. I'm not able to initialize or open a reference of the matlab dll with a simple vi. I always get «-2147221164 "Class unregistered"» when in my main project. Don't worry, I did register/Unregister/Reregister with RegSvr32 Successfully...

 

When not in my main project, every thing works fine. Hum???? Why? there is no pre-loaded Ni Vision dll.  So, if I open Laview 2014 from sctrach, open and run the vi that call the dll reference whit no error. Then, Open my main project with Ni-Vision and THEN open ma sub-vi that contain the call to the matlab dlll. It open normally. But I always have to pre-open succeffuly the reference once to make it work. The other way, I alwas get the «Class unregitered» error

 

-Labview 2014

-Matlab dll is in R2009

 

So, is there anyone who have had the same or similar issue and what was the miraculus solution???

0 Kudos
Message 1 of 4
(4,999 Views)

Hi vw89cITX,


I have some questions to get a better idea of the situation.
Is this the case in any other LabVIEW project or is this specific to any projects that specifically contain the NI Vision VIs?
Does this behavior occur if the two are in the same VI?
Does this only happen with the project or also if you just have the subVI within the main Vi with no project open?
If you put the code into your main code with no subVI around it, does it work then?
What happens when you try inlining the subVI into your main code?
Have you tried any other dll calls and what is the behavior of this?

Paolo F.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(4,971 Views)

Hi FuManWho,

 

I'll try to anwser to my best

 

Q - Is this the case in any other LabVIEW project or is this specific to any projects that specifically contain the NI Vision VIs?

A - It is specific to project that contain NI-Vision. Even if I separate them in 2 distinct project, as soon as there's NI Vision loaded.

 

Q -Does this behavior occur if the two are in the same VI?

A - It happend as soon as there NI Vision component in memory. They don't have to be in the same project or in the same vi.

 

 

Q - Does this only happen with the project or also if you just have the subVI within the main Vi with no project open?

A - At fisrt, I thought that the project might be corrupted. So I started a new prject including all the material in it. It didn't work.

    So, I Started another project including modules at pieces, each time trying to initialize the dll. And when I've had included the one containing NI Vision, it didn't initialize.


Q - If you put the code into your main code with no subVI around it, does it work then?

A - I dont even have to run any .vi containg Vision. Just the fact to have loaded in memory when I open the project, make it fail.


Q -What happens when you try inlining the subVI into your main code?

A- I've not tryed


Q - Have you tried any other dll calls and what is the behavior of this?

A - Yes. I've tryed with Microsoft Excel 14.0 Object library (Excel._Application) and it work fine

0 Kudos
Message 3 of 4
(4,950 Views)

It's look like this append only when IMAQ vision is loaded into memory, then oepn an ActiveX matlab DLL reference. Someting like that happend couple years ago, with Matlab and Vision again.

 

http://forums.ni.com/t5/LabVIEW/Upgrade-LV2009-to-LV2010-issue-with-ActiveX-dll/td-p/1215159

 

 

 

0 Kudos
Message 4 of 4
(4,923 Views)