LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview class objects

In my lab we are working with a Photron Fastcam 512PCI. It is attached to a microscope and the image aquisition is run through LV. So far is has produced great results. However, there are some very time critical functions that need to be carried out at certain intervals in the VI. These functions are controlled with software provided by Photron, but we need LV to be able to access these functions. The software comes with an SDK with all the required DLLs. We have been attempting to use Call External Library nodes to access the required functions, but this is not working.

From what I understand, the class definition in the DLL is a CCameraControl class. When the camera connects an object is created containing all of the camera parameters and functions. Using this, its member functions should be accessed by calling the constructor to create a class object for example called obj1. Then a function is called as such: obj1.GetManualTriggerPosition(position). Yet it does not appear that LV has integrated the concept of class. Is there any way to have LV call these functions?
0 Kudos
Message 1 of 4
(2,831 Views)


@abriggs8 wrote:
In my lab we are working with a Photron Fastcam 512PCI. It is attached to a microscope and the image aquisition is run through LV. So far is has produced great results. However, there are some very time critical functions that need to be carried out at certain intervals in the VI. These functions are controlled with software provided by Photron, but we need LV to be able to access these functions. The software comes with an SDK with all the required DLLs. We have been attempting to use Call External Library nodes to access the required functions, but this is not working.

From what I understand, the class definition in the DLL is a CCameraControl class. When the camera connects an object is created containing all of the camera parameters and functions. Using this, its member functions should be accessed by calling the constructor to create a class object for example called obj1. Then a function is called as such: obj1.GetManualTriggerPosition(position). Yet it does not appear that LV has integrated the concept of class. Is there any way to have LV call these functions?




Your best bet is to create an external wrapper DLL which translates the object oriented interface of your C++ DLL into a functional interface accessible by LabVIEWs Call Library Node. The reason LabVIEW doesn't have a direct Call Object Interface Node similar to the Call Library Node is because these interfaces are compiler dependant as far as the binary compatibility is concerned. So a C++ DLL created in Borland C is likely to be troublesome to be used in a Visual C application. In fact it is bascially impossible since the created link libraries are in different object format and can't be linked together anyhow.

Another approach might be if your library exports its object oriented interface through Active X. Active X does among other things also norm the exact binary interface of an object and therefore allows LabVIEW to provide a common interface, which it has implemented since about version 5.1. I'm not a fan of Active X and never would recommend its use but if it is an option in your case you may try it out.

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
Message 2 of 4
(2,805 Views)

Rolf,

I am looking for information on how to build the external interface wrappers to which you refer.  I have a post up called "Object Oriented dll" that summarizes how I think those wrappers might be constructed.

If you get this, can you please take a look at that post and let me know if I am on the right track?

Thanks,

Bill F

0 Kudos
Message 3 of 4
(2,657 Views)

I need 'wrappers' for a Photron camera.  Was anyone successful at developing them?

Gretchen Zimmer

gzimmer@pppl.gov

0 Kudos
Message 4 of 4
(2,355 Views)