02-25-2009 05:10 AM
Dear all,
I need to call Matlab from Labview using ActiveX
The "Matlab Script Node" (which use activeX) works, but i need more control
over the connection, so I must use the AcitiveX Vis directly.
Problem: I always get the same error using AutomationOpen vi:
error -2147221164 : Class not registered in Matlab ActiveX Example.vi
I tried to unregister/register the matlab automation server (using /UnRegServer and /RegServer).
As expected, the matlab server (MLApp.DIMLapp) actually disapear/reapear from the Labview "select activeX class"dialog
But at the end I still have the same error -2147221164
The strange thing is that the matlab script node works, meaning that ActiveX link is ok.
But AutomationOpen always fail...
note: I am using Labview 8.5.1 and Matlab 7.6.0.324 (R2008a)
Solved! Go to Solution.
02-25-2009
05:31 AM
- last edited on
02-26-2025
08:03 PM
by
Content Cleaner
Did you ever thought about the Simulation Interface Toolkit ?
You can also try to register the Matlab dll with the command regsrv32 "C:\path_to_shared_lib\shared_lib.dll"
Christian
02-25-2009 05:39 AM
Hi friends
I am Joseph from London newly visited this site. I amappreciate your thought.
Joseph
02-25-2009 06:42 AM
Dear Christian
Thanks for your reply.
I am using Object oriented matlab code (not simulink), so I don't think that the Simulation Interface Toolkit could help me.
I tried to register Matlab using Matlab.exe /RegServer : no improvement
I don't think I can use regsrv32 with matlab.
Anyway matlab bin directory contains more than 500 dll, and I have no idea which one must be registered....
cheers,
julien
02-25-2009 07:14 AM - edited 02-25-2009 07:16 AM
AutomationOpen now works with Matlab !!
But I don't know why...
It may be related to a test I did in Visual basic:
Dim Matlab As MLApp.MLApp
Dim Result As String
Matlab = New MLApp.MLApp
Result = Matlab.Execute("myVariable=0" )
This test worked, and maybe it has somehow "repair" the ActiveX configuration for MLApp ...
03-18-2010 03:26 AM
Hi ,I have seen you question and answers many times ,but i still dont know how the activex works......
i expect you can give me some suggrstions.
05-12-2014 02:42 PM
Hi Julien,
I am having the exact same problem that you did a while back. How did you fix this issue? Which dll's did you register and how?
Thanks