National Instruments 320682C Musical Toy Instrument User Manual


 
GPIB/GPIB-488.2 Library Chapter 4
LabWindows/CVI Standard Libraries 4-12 © National Instruments Corporation
Notification of SRQ and Other GPIB Events
Synchronous Callbacks
Under Windows 3.1, you can use ibInstallCallback to specify a function to be called
when an SRQ is asserted on the GPIB or when an asynchronous I/O operation has completed. It
is a board-level function only.
The same functionality exists on Windows 95 when you are using the compatibility driver.
If you are using Windows NT or the native 32-bit driver for Windows 95, you can use
ibInstallCallback to specify functions to be invoked on the occurrence of any board-level
or device-level condition on which you can wait using the ibwait function.
Callback functions installed with ibInstallCallback are synchronous callbacks, that is,
they are invoked only when LabWindows/CVI is processing events. (LabWindows/CVI
processes events when you call ProcessSystemEvents or GetUserEvent, or when
RunUserInterface is active and you are not in a callback function.) Consequently, the
latency between the occurrence of the GPIB event and the invocation of the callback can be
large. On the other hand, you are not restricted in what you can do in the callback function.
Asynchronous Callbacks
You have the ability to install asynchronous callbacks on Windows NT and on Windows 95 with
the native 32-bit driver. Asynchronous callbacks are installed with the ibnotify function and
can be called at any time with respect to the rest of your program. Consequently, the latency
between the occurrence of the GPIB event and the invocation of the callback is smaller than with
synchronous callbacks, but you are restricted in what you can do in the callback function. See the
documentation of the ibnotify function later in this chapter for more details.
Driver Version Requirements
If you are using Windows NT, you must have version 1.2 or later of the GPIB driver to use the
ibInstallCallback and ibnotify functions.
If you are using the native 32-bit GPIB driver on Windows 95, you must have version 1.1 or later
to use the ibInstallCallback and ibnotify functions.
If you are using the Windows 3.1 compatibility driver on Windows 95, you can use the limited
version of ibInstallCallback, but you cannot use ibnotify.