LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX called by name.

Hello,

 

I try to access a new camera with Labeled. The problem is there are no proprietary drivers. The work around I found so far is using the ASCOM driver, which are a COM layer to the device driver.

Here what I can do so far:

 

Talk to the cam with JScript

var T = new ActiveXObject("ASCOM.IMG0HLX.Camera")

works perfectly fine.

 

Use Simulated ASCOM cam drivers in Labview. works too.

 

 

My problem is that the real camera does not apear in the ActiveX type Library of the refnum.

And i dont know how to add it. The Simulated Cameras Are in the Library.

 

is there any way to acces the Camera, force it into the library (without having the right dlls).

 

I have hope as the camera is Accesible with JScript so easyly. is there any way that i can talk to the cam with only the deviceID "ASCOM.IMG0HLX.Camera".

 

furthermore i found a ASCOM driver in the ActiveX type library but whenever i want to use it i couldnt as it is no "creatyble" object. anyways this driver posses all the right properties and methods. can i combine this driver with the DeviceID given?

 

 

Thank you

0 Kudos
Message 1 of 8
(4,293 Views)

Hi,

 

is that issue still current?

 

In my oppinion you should implement the JScript code ("var T = new ActiveXObject("ASCOM.IMG0HLX.Camera")") in LabVIEW.

As you mentioned that the driver in the ActiveX type library ist from ASCOM it wuld be interesting whether ASCOM has LabVIEW Support or not. I think they should know excactly how to implement their driver.

 

Best regards.

0 Kudos
Message 2 of 8
(4,105 Views)
thank you, i solved the problem.. kinda.
first i did it as you suggested, using jscript in labview. it worked fine, i just didnt like it.
but than i found out that the Library i tried to access was written as .net 2.0. thus i now use the call .net Library Funktion.

but my Cam now only gives me about 2 Frames. i dont know y jet. whether jscript or .net makes no difference. i have to admit i didnt Out a Lot of Time into that occurence yet. Could ist be that whenever i call a new Methode that the VM?? causes a delay? or is that only the very first time the .dll is called?

0 Kudos
Message 3 of 8
(4,097 Views)

Hello

How is the problem going?

I met similar problem when I want to use ASCOM to control QHY camera in Labview. 

 I used Active Automation to connect the camera with the ASCOM camera interface named ICAMERAV2, but there was no creatable objects for this interface. I am not sure whether is the problem that some files missed or not. Will someone help me?

Thanks,

Qi

 

Liu_Qi_0-1626774111727.png

 

0 Kudos
Message 4 of 8
(2,626 Views)

Interfaces can not be created (instantiated). They are only an interface description that you need to implement. But you can’t implement classes in LabVIEW that inherit from ActiveX or .Net classes or implement given interfaces.

 

An interface is simply a declaration in a library how an object class needs to be implemented in order to be passed to other classes in that library. It seems to me that this ASCOM library isn’t a universal camera interface that already supports every thinkable camera. That’s anyhow an impossibility!

Instead it is a framework for an universal camera interface but one needs to implement the camera specific driver by implementing that interface. LabVIEW can’t do that, you need an ASCOM compatible driver for your specific camera!

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 8
(2,609 Views)

Thanks for your quick reply.
I understand it now and I will check it with the technician of the QHY camera.

0 Kudos
Message 6 of 8
(2,592 Views)

I would like to bump this topic again since I do not believe the OP's original question has been fully addressed. @rolfk mentioned that Labview needs to have access to specific drivers that support the various ASCOM interfaces. I agree, but, this is the central question. The OP mentions the "ASCOM.IMG0HLX.Camera" class, which is a specific implementation of the ASCOM Camera interface. The problem is that these specific classes are not showing up in the Type Library list that is shown when selecting the ActiveX class to use for Automation Open, for example. In my case, I can see specific classes exposed in the registry, so I know that the system knows about them, but how are we to access these classes in Labview if they are not showing on the list?

 

I think the basic question is: What is the Labview equivalent of:

 

T = new ActiveXObject("Some driver ID")??

 

I have not found a way that I can supply Labview with a string ID to create a specific instance of the class I want if I cannot find it in the Type Library list. Indeed, ASCOM includes a "Chooser" object that brings up all the drivers on a system that implement a particular interface and it returns that string ID. This works in Labview, but I don't know what to do with the returned ID string. If the OP says they can make this work in JScript, then the system obviously knows about the driver in question. Does Labview not have an equivalent approach?

 

Another way to ask the question is Labview seems to require the class be known at compile time in order for the VI to run (so the Property and Invoke nodes are filled out properly), but in the JScript example given by the OP (and the examples given on ASCOM's sites), the ActiveXObject may presumably be created from a class ID implementing any number of interfaces without the type being explicitly known at compile time. Is this possible in Labview's ActiveX client implementation?  

0 Kudos
Message 7 of 8
(1,783 Views)

An update:

 

The following code works for ASCOM drivers:

 

LV-ASCOM.PNG

 

This is exactly what I think the OP was looking for, the ID returned from "Choose" is of the form "ASCOM.Class.Interface", but I had to use .NET calls to access this driver dynamically at runtime. Can this not be done using only ActiveX calls? Or is this perhaps a specific issue with the ASCOM platform interface? I am not extensively familiar with using ActiveX from Labview, so I would just like to know what is possible and what is not. Thanks!

0 Kudos
Message 8 of 8
(1,780 Views)