Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa resource name PXI instrument handle

Solved!
Go to solution

I have different instrument that can be used as DMMs, PXI-4071, Agilent 3458A, Keithley 2000, HP 34401A. I would like to have a piece of code that is as generic as possible that can use any of these DMMs. The PXI-4071 is the odd one out because it isn’t handled by a VISA resource name. Instead it needs an instrument handle. Is there a way to have one reference to any potential DMM? Having two types of instrument reference is going to clutter my block diagram especially as my application gets larger.

0 Kudos
Message 1 of 5
(4,188 Views)
Solution
Accepted by topic author DM83

Read about IVI- drivers.

Message 2 of 5
(4,184 Views)

Since they all have IVI drivers, none of them are 'the odd one out'. You use the IVI class drivers and that's it. I don't usually recomend IVI but this use is why they created in the first place.

Message 3 of 5
(4,183 Views)

I agree with the others, use the IVI drivers.

 

Your other option is to create a class of type DMM and then make a child class of each of your DMMs.  Then you just have to call the parent class and let dynamic dispach handle the rest.  But this whole OOP thing can be a major pain really quick.  So, again, I recommend the IVI drivers.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 5
(4,175 Views)

Thanks, I have successfully used the IVI drivers now; it was difficult to “google” the answer when I understood the concept of what I was looking for without knowing what it is called.

 

I have found that IVI drivers abstract away a lot of the DMM configuration options and run slower than the instrument specific drivers. So I suppose it is a trade-off of development time vs execution time.

0 Kudos
Message 5 of 5
(4,041 Views)