LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

activeX component are missing some property in LV 7.1.1 and Labview 2009 SP1

I started integrating in LV 7.1.1 an ActiveX toolkit that should allow me to control Canon EOS DLSR Camera directly from Labview thanks to LV ActiveX container.

You can download a 60 day evaluation copy of this ActiveX toolkit directly from the Alkenius company site at : http://alkenius.no-ip.org/TCamRemote/index.html .

 

Anyway, first test was ok and the camera was responding to basic commands.

But then I wanted to use more options and I decided to add a new method to my program (as the "Connect_Battery_BatterySource" which is listed and described in the toolkit manual) but I could not find it into the INVOKE NODE-METHOD list.

After some additional test (I even tryed LV 2009 I just bought a few months ago) I figured out that several methods were missing from the Labview list.

I decided to contact the company that make this toolkit but they said that all methods should be in the toolkit as explained in the manual ! I decided to verify trying to use the same ActiveX component in another language; I then created a Visual Basic project in VS2005 and imported the same ActiveX component to see if there was any difference with Labview...

There is ! In fact in Visual Basic all methods are here and accessible !

Anyway I also figured out that the missing ones are all marked as the same type in Visual Basic : "Public Overridable ReadOnly Property" ! While most of the visible methods (visible in Labview) are marked as :"Public Overridable Sub" in Visual Basic.

Is there a limitation in LV or is there some other way to access these methods ?

 

I uploaded a screenshot from VisualBasic to show one of the missing method (missing in Labview only). 

 

Thanks

 

 

0 Kudos
Message 1 of 5
(3,057 Views)

First guess: Probably the methods you can't use via invoke node have parameters that aren't automation compatible.

LabVIEW allows only automation compatible parameters with ActiveX: Automation compatible data types are numeric

types, enum types and strings (BSTR).

 

You can find a list of supported types in the LabVIEW help:

https://www.ni.com/docs/en-US/bundle/labview/page/using-activex-with-labview.html

 

If your method needs other custom types like struct types you can't use it via ActiveX in LabVIEW: As a result, such methods can't be found in the method list of the invoke node. If you want to call such a method you have to create a wrapper for your ActiveX component that translates the unsupported data types into automation compatible types.

 

0 Kudos
Message 2 of 5
(3,046 Views)

Perhaps things are much less complicated: Your VB screenshot shows that the "method" you look for isn't a method but a property. Wire an ActiveX property node instead of an invoke node and look whether you can find it in the property list.

0 Kudos
Message 3 of 5
(3,033 Views)

Unfortunately the methods I'm looking for are not between the property (there are only 4 properties in this toolkit and all of them are visibile in Labview).

Anyway, how can I create a wrapper for my ActiveX component in order to add unsupported methods. Is there any litteratuere or example (I'm not extremely familiar with VC++ or VB but I'm anyway able to write some simple code).

Thanks

0 Kudos
Message 4 of 5
(3,024 Views)

Perhaps you don't need to write code: Try to create a .NET interop assembly using the tlbimp.exe tool from .NET SDK

(A recent VB or VC does them same if you import an ActiveX component). You can find documentation about tlbimp on the MSDN.

 

0 Kudos
Message 5 of 5
(3,017 Views)