Waiting For Gpib Conditions; Asynchronous Event Notification In Win32 Ni-488.2 Applications; Calling The Ibnotify Function - National Instruments NI-488.2 User Manual

National instruments user manual ni-488.2
Hide thumbs Also See for NI-488.2:
Table of Contents

Advertisement

Chapter 7
NI-488.2 Programming Techniques

Waiting for GPIB Conditions

Asynchronous Event Notification in Win32
NI-488.2 Applications

Calling the ibnotify Function

NI-488.2 User Manual for Windows
You can use the
ibwait
suspend your application until a specified condition occurs on the GPIB. If
you use
with a parameter of zero, it immediately updates
ibwait
and returns. If you want to use
occur, pass a wait mask to the function. The wait mask should always
include the TIMO event; otherwise, your application is suspended
indefinitely until one of the wait mask events occurs.
Win32 NI-488.2 applications can asynchronously receive event
notifications using the
want your application to be notified asynchronously about the occurrence
of one or more GPIB events. For example, you might choose to use
if your application only needs to interact with your GPIB device
ibnotify
when it is requesting service. After calling
does not need to check the status of your GPIB device. Then, when your
GPIB device requests service, the NI-488.2 driver automatically notifies
your application that the event has occurred by invoking a callback
function. The callback function is registered with the NI-488.2 driver when
the
call is made.
ibnotify
has the following function prototype:
ibnotify
ibnotify (
int ud,// unit descriptor
int mask,// bit mask of GPIB events
GpibNotifyCallback_t Callback,
// callback function
void * RefData// user-defined reference data
)
Both board-level and device-level
NI-488.2 driver. If you are using device-level calls, you call
with a device handle for
you are using board-level calls, you call
and a
of any values except RQS or ERR. The
ud
mask
are identical to the
ibwait
function to obtain the current
to wait for one or more events to
ibwait
function. This function is useful if you
ibnotify
ibnotify
ibnotify
and a
of RQS, CMPL, END, or TIMO. If
ud
mask
ibnotify
mask bits. In the example of waiting for your
7-4
value or to
ibsta
ibsta
, your application
calls are supported by the
ibnotify
with a board handle for
mask bits
ibnotify
www.natinst.com

Advertisement

Table of Contents
loading

Table of Contents