LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a parent class for all instr. drivers

Hi,
I'm trying to build a general application that will serve our lab in various different experiments and experimental setups. The thought is to use OOP and define a generic instrument class,an experimental setup consisting of a few instruments and then an experiment which uses the "set" and "get" functions of the instrumentation available in the setup [the most simple experiment will be a simple scan and plot in 1d (e.g. a simple IV curve)]. OOP is perfect for this since there is no conseptual difference in scanning a magnetic field, for example, or an electric current. One would obviously want to change as little code as possible if an Agilent meter is replaced by a Keithley. We thought of somehow embedding the existing Labview drivers as child classes of a generic instrument class. Is there some easy way to do this?
 
Thanks,
Yehonathan
0 Kudos
Message 1 of 5
(3,294 Views)
Almost all of the existing LabVIEW drivers are written in the "old-style" format. Some have been converted to projects. I haven't run across any that are class-based. At least of the pure LabVIEW variety. IVI-based drivers are essentially based on IVI classes. You can, of course, create wrapper classes around the drivers, but that would be something you need to do yourself.
0 Kudos
Message 2 of 5
(3,292 Views)
Looking into IVI drivers would be a good starting point. A list of instrument classes as well as general IVI info is available here.

If your instruments are not typical or custom, you could consider defining your own LVOOP classes. There is a thread on the LAVA forums from last year where people discussed this idea...
0 Kudos
Message 3 of 5
(3,283 Views)

I thought a generic class of instrumentation as a class having a list of set and get functions, initilaize, close etc., with all the methods abstract. An instance of the class (e.g. a DMM, a scope, etc.) would then just list all the set and get functions (e.g. 1= get AC voltage, 2= set range etc.).  This way one could define experiments independent of the measuring instrument type.

The DMM child class of this abstract class would then bind somehow to the available instrument driver, i.e. correlate between the drivers initialize.vi with the initialize method, between the conf.vi and the set range method etc. Do you have any idea how this binding can be done without rewriting the driver?

0 Kudos
Message 4 of 5
(3,262 Views)
0 Kudos
Message 5 of 5
(3,250 Views)