10-01-2010 12:41 PM
Hi guys,
Has anyone had any luck controlling this Zeiss microscope via ActiveX commands? I can see all the properties, but when I try and execute the program, I get Class not registered errors. I know the classes are registered because VBA can call and use the functions just fine.
Cheers,
Shivels
10-04-2010 01:40 PM
Hi Shivels,
I've never used this specifically, but can you give me more details on the error you are getting? What is the error code and is it being returned from the Automation Open function or elsewhere? Also, I've heard that others have used this hardware with serial communication. Perhaps this would be a workaround if you are still having trouble with the ActiveX commands.
10-04-2010 02:03 PM
Hi Daivd,
The error code is returned after an Automation Open function. The error is -2147221164 Class not Registered. I need to use the ActiveX commands because there are functions which perform autofocus and image stitching. We are upgrading the system from VBA to LabVIEW. In VBA we have written code which calls these functions. The VBA code works fine, which leads me to believe the DLLs are registered with windows. Attached is an example of how the VBA calls are structured. I tried following the same logic with the attached vi, but I couldn't get it to work. I'm rather confused as to why it works in VBA, but won't work in LabVIEW.
Cheers,
Shivels
10-05-2010 05:29 PM
This might be a lucky shot in the dark, but I've seen some cases where simply deleting the Automation Open function and replacing it with a new one can clear this error up. Let me know if this simple solution does not work and I'll dig deeper to see if there are any other ideas.
10-06-2010 03:43 PM
Hi Daivd,
I tried deleting the Automation Open, but that didn't work. What confuses me is that some objects in the same typelib will work, while others give error -2147221164 Class not registered. I thought that if a typelib was registered, then every object in the typelib is registered as well. I'll keep trying different commands and see if I can trace this problem down.
Cheers,
Shivels
10-07-2010 03:06 PM
I agree they should all be registered together, but sometime I suppose it does not happen. After some extensive searching on the issue, I learned that most have been resolved by manually registering the ActiveX component. How to do this is documented in the following KnowledgeBase article.
How Do I Manually Register Type Libraries, ActiveX Controls, and ActiveX Servers?
http://digital.ni.com/public.nsf/websearch/4F811A9B23F1D46E862566F700615B7A?OpenDocument
Hopefully this works for you as well.