
BASICA/QuickBASIC GPIB-PC Function Calls Section Four A
GPIB-PC User Manual 4A-68 ©National Instruments Corp.
BASICA/QuickBASIC BASICA/QuickBASIC
IBRSP IBRSP
Purpose: Return serial poll byte
Format: CALL IBRSP (BD%,SPR%)
Remarks: BD% specifies a device. SPR% is the variable in which the
poll response is stored.
The IBRSP function is used to serially poll one device and
obtain its status byte or to obtain a previously stored status
byte. If bit 6 (the &H40 bit) of the response is set, the
status response is positive, i.e., the device is requesting
service. On exit, all devices are unaddressed.
When automatic serial polling is enabled, the specified
device may have been polled previously. If it has been
polled and a positive response was obtained, the RQS bit of
that device's status word is set, and in this case a call to
IBRSP returns the previously acquired status byte. If the
RQS bit of the status word is not set when IBRSP is called,
the device is serially polled.
When a poll is actually conducted, the specific sequence
of events is as follows:
1. IBCMD sends the following commands:
• Unlisten (UNL);
• Talk address of the device;
• Secondary address of the device, if applicable;
• Listen address of the access board;
• Secondary address of the access board, if applicable; and
• Serial Poll Enable (SPE).
Other command bytes may be sent as necessary.
2. IBRD reads one response from the device and stores it
in SPR%.