From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

IBWAIT in multithreaded NT C++ code

I am writing a multithreaded instrument control program in Visual C++ on Win
NT 4.
I have one thread that handles a service request (SRQ) by using IBWAIT
to wait for an SRQ from the device. While IBWAIT has the thread suspended,
I can not do any GPIB operations from other threads (i.e. IBDEV). All other
GPIB calls hang until the IBWAIT in another thread returns. Does IBWAIT
suspend driver operations? Should I be handling SRQ in a different manner
such as IBNOTIFY or simply doing a serial poll periodically?

Thanks
Don
0 Kudos
Message 1 of 2
(5,223 Views)
The ibwait will asyncronously do the work and not tie up the thread if you
do ibwait(0), So that it doesn't tie up the thread waiting for a status
to equal the mask.


"Donald Canfield" wrote:
>>I am writing a multithreaded instrument control program in Visual C++ on
Win>NT 4. >I have one thread that handles a service request (SRQ) by using
IBWAIT>to wait for an SRQ from the device. While IBWAIT has the thread suspended,>I
can not do any GPIB operations from other threads (i.e. IBDEV). All other>GPIB
calls hang until the IBWAIT in another thread returns. Does IBWAIT>suspend
driver operations? Should I be handling SRQ in a different manner>such as
IBNOTIFY or simply doing a serial poll periodically?> >Thanks>Don
0 Kudos
Message 2 of 2
(5,223 Views)