08-19-2013 02:03 PM
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.
Solved! Go to Solution.
08-19-2013 02:22 PM
Read about IVI- drivers.
08-19-2013 02:23 PM
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.
08-19-2013 03:56 PM
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.
11-29-2013 10:06 AM
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.