Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get instrument status from an IVI COM Class Compliant drivers?

I'm writing an interface through a IVI COM driver to a DMM. I need to get an 'operation complete' flag through a driver method call but I can't seem to find any status function calls in the IVIDMM Instrument Class Compliant Driver. The DMM 'Instrument Specific' driver has a 'WaitForOperationComplete' call under the 'System' interface, and also has a 'Status' Interface I can use, but these are missing in the Class Compliant driver. Am I missing something? Where do I get 'Status' info for the Class Compliant instrument drivers??
0 Kudos
Message 1 of 3
(3,603 Views)

The IviDmm class interfaces do not provide "Wait For Operation Complete" functions.  Instead, a separate approach for a measurement (initiate and fetch) is provided by the Initiate() and Fetch() methods on the IIviDmmMeasurement interface.  The Fetch() method takes a timeout value, so it can also be used for waiting for OPC, though the actual command sent to the instrument may be different (FETC?, *OPC, or any other for non-SCPI models).

If you want to directly handle the Operation Complete events by using *OPC command, you can access "pass through" functions that allow you to direct-call to VISA.  Of course it is okay to use "specific interface" for a driver if any appropriate methods are provided.  However either approach will break class-based interfacing.

Message 2 of 3
(3,591 Views)

Thanks for the reply Makoto,

I'm suprised that the IVI class compliant drivers don't have instrument status info available, I wonder what the reason for this is. I would think they would have a class complient SCPI status model interface that the instrument driver could map into. Are there any IVI Foundation members out there that could explain the lack of a 'Status' model?

Not to have a 'operation complete' method available doesn't make much sense when you have Initiate() and Fetch() methods. You can use the Timeout parameter as you suggest, but you have to make this a worse case condition, and sometimes you don't know how long the operation will take.

So I guess I'll use the *OPC?  command in a method call to wait for operation complete. The VISA-COM IFormattedIO48 interface is available through the DMM instrument specific 'System.IO' interface, or I can reference the 'VISA COM 1.0 Type Library' directly. Most instruments respond to the SCPI commands, so I'll still be able to interface with a wide class of DMM's if I use the 'VISA COM' library. Still, a Status model in the Class Compliant COM driver is needed.

0 Kudos
Message 3 of 3
(3,570 Views)