Automatic Serial Polling Overview
If you want your application to conduct a serial poll automatically when the SRQ line is asserted, you can enable automatic serial polling. You can use automatic serial polling with traditional device-level calls only. The autopolling procedure occurs as follows:
- Autopolling is enabled by default. However, if you want to enable autopolling, use the configuration function, ibconfig, with the IbcAUTOPOLL option, or the GPIB Configuration utility.
- When the SRQ line is asserted, the driver automatically serial polls the open devices.
- Each positive serial poll response (bit 6 or hex 40 is set) is stored in a queue associated with the device that sent it. The RQS bit of the device status word, Ibsta, is set.
- The polling continues until SRQ is unasserted or an error condition is detected.
- To empty the queue, use the ibrsp function. ibrsp returns the first queued response. Other responses are read in first-in-first-out (FIFO) fashion. If the RQS bit of the status word is not set when ibrsp is called, a serial poll is conducted and returns the response received. You should empty the queue as soon as an automatic serial poll occurs.
- If the RQS bit of the status word is still set after ibrsp is called, the response byte queue contains at least one more response byte. If this happens, you should continue to call ibrsp until RQS is cleared.
Related Topics:
AllSpoll
FindRQS
IBRSP
IBRSV
Serial Polling Overview
Serial Polling with Device-Level Traditional NI-488.2 Calls
Serial Polling with Multi-Device NI-488.2 Calls
Service Requests from Devices