Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling OpenDev from within IVI device driver

I need to perform a GPIB serial poll from within an IVI device driver (I'm writing in LabWindows/CVI) in order to figure out which one of several possible instruments set the SRQ line. VISA doesn't have a serial poll command, so I have to use the raw GPIB functions from the Library/GPIB menu. The GPIB serial poll command wants the device handle from OpenDev(); OpenDev wants a device descriptor. How do I get the device descriptor from IVI? It's got to be in there somewhere, but I can't find an attribute that carrys it or a function that returns it. I think that I successfully installed the GPIB SRQ handler, at least it seems to work ok.
Paul
0 Kudos
Message 1 of 3
(3,283 Views)
> VISA doesn't have a serial poll command,
 
VISA does have the serial poll function -- viReadSTB().
 
> How do I get the device descriptor from IVI?
 
The NI-488.2 device (or unit) descriptor is isolated from VISA, so there is no way to acquire from your app through the VISA API.
 
0 Kudos
Message 2 of 3
(3,270 Views)
Ah, thanks. I was looking for it to be along with the rest of the GPIB functions.
Paul
0 Kudos
Message 3 of 3
(3,252 Views)