Ibrpp, Ibrpp -39 – Measurement Computing GPIB-488 User Manual
Page 52

Chapter 3
GPIB 488.1 Library Reference
GPIB-488
3-39
IBRPP
Initiates a parallel poll.
Syntax
C
ibrpp (int boarddev, char *command)
Parameters
boarddev
is an integer containing the device or board handle.
Returns
command
will contain the response to the parallel poll.
ibsta
will contain a 16-bit status word as described in Appendix B,
.
iberr
will contain an error code, if an error occurred.
Usage Notes
If this routine is called specifying a GPIB Interface Board, the board parallel polls all
previously configured devices. If the routine is called specifying a device, the GPIB Interface
board associated with the device conducts the parallel poll. Note that if the GPIB Interface
Board to conduct the parallel poll is not the Controller-In-Charge, an ECIC error is generated.
Before executing a parallel poll, the
ibppc
function should configure the connected devices
with
ibppc
to specify how they should respond to the poll.
Example
This program configures two devices for a parallel poll. It then conducts the poll. It is assumed
that voltmeter and scope have already been set by opening the devices with an
ibfind
and
board has been set by opening the board with an
ibfind
.
Both devices indicate that they want service by setting their first bit to 1. The first
ibppc
specifies that the first device (
voltmeter
) should drive the DIO1 line high when its first line
goes high. The second
ibppc
specifies that the second device (
scope
) should drive the DIO2
line high when its first bit goes high. The
ibrpp
conducts the poll and checks DIO1 and DIO2
to see if either device is requesting service.
C
int voltmeter, scope, board, pollbyte;
ibppc (voltmeter, 0x68)
ibppc (scope, 0x69)
ibrpp (board, &pollbyte)
if (pollbyte & 1)
printf "Volt meter is requesting service"
if (pollbyte & 2)
printf "Oscilloscope is requesting service"