GPIB/GPIB-488.2 Library Chapter 4
LabWindows/CVI Standard Libraries 4-18 © National Instruments Corporation
Only one callback function can apply for each board or device. Each call to this function for the
same board or device supersedes the previous call.
To disable callbacks for a board or device, pass 0 for the eventMask parameter.
Parameters
Input boardOrDevice integer A board index, or a board or device
descriptor returned by OpenDev,
ibfind, or ibdev.
eventMask integer Specifies the events upon which the
callback function is called. Pass 0 to
disable callbacks. See discussion below.
callbackFunction GpibNotifyCallback_t The name of the user function that is
called when the specified events occur.
See discussion below.
callbackData void pointer A pointer to a user-defined four-byte
value that is passed to the callback
function.
Return Value
status integer The same value as the ibsta status
variable. Refer to your NI-488.2M user
manual for a description of the values of
ibsta status variable.
eventMask
The conditions upon which to invoke the callback function are specified as bits in the
eventMask parameter. The bits corresponds to the bits of the ibsta status word. This value
reflects a sum of one or more events. If any one of the conditions occur, the callback is called.
If, when you install the callback, one of the bits you have set in the mask is already TRUE, the
callback is called immediately. For example, if you pass CMPL as the eventMask, and the
ibwait function would currently return a status word with CMPL set, the callback is called
immediately.
At the board level, you can specify any of the status word bits that can be specified in the
waitMask parameter to the ibwait function for a board, other than ERR. This includes SRQI,
END, CMPL, TIMO, CIC, and others.
At the device level, you can specify any of the status word bits that can be specified in the
waitMask parameter to the ibwait function for a device, other than ERR. This includes RQS,
END, CMPL, and TIMO.