LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about using "viClear" for an IVI instrument driver

(Not sure if this questions belongs in the CVI or the IVI forum, sorry if this was posted to the wrong one)

Many VXIPnP instrument drivers I've used in the past would break out the viClear function into an exported (function panel) instrument driver function, usually named as "InstrPrefix_dcl ()". The viClear is no longer used in new IVI stuff (via the IVI instrument driver wizard) when creating new instrument drivers. I've even looked at some vendor-authored IVI drivers (for GPIB instruents) that have been recently developed, too. Looking at the IVI library in CVI, it seems there is no way to do a "device-clear" without adding code to the IVI wizard's code to do so. Is viClear on its way out now that IVI is o
n the way in, and is there a different "IVI-method" for accomplishing the same thing that I'm not seeing. There doesn't even seem to be an IVI-attribute related to it either...
--
To whom it may concern: My alias is also my nickname, I've had it since I was a (very) skinny basketball-playing teen. OK, so I've got a 38 inch waist now, but my hometown friends haven't shaken that appellation for me. I trust that you will someday be OK with that alias, as I have been with that nickname.
0 Kudos
Message 1 of 2
(3,487 Views)
While providing a DCL function was valuable to basic GPIB-only instrument drivers, IVI drivers do not do so for a couple of reasons. First, IVI drivers use state caching, so they do not provide the user direct access to features that would alter that state. Second, IVI driver APIs are intended to be I/O bus-independent, so providing functionality specific to GPIB does not make sense.

The replacement functionality you need to use depends on your intent. If you wish to clear device errors, then you should call the error_query function. It will query the instrument for errors and clear the error queue. If you wish to reset the instrument to a known state, the preferred methods are the Reset or Reset With Defaults functions.

--Bankim
0 Kudos
Message 2 of 2
(3,487 Views)