Manual

P
ART
O
NE
:
ABOUT
REMOTE
CONTROL
24
ISSUED: February 2005
WM-RCM-E Rev D
TAKE A SERIAL POLL
Serial polling takes place once the SRQ interrupt line has been asserted, and is only advantageous when you are
using several oscilloscopes at once. The controller finds which oscilloscope has generated the interrupt by
inspecting the SRQ bit in the STB register of each. Because the service request is based on an interrupt
mechanism, serial polling offers a reasonable compromise in terms of servicing speed in multiple-device
configurations.
In the following example, the command INE 1 enables the event “new signal acquired” to be reported in the
INR to the INB bit of the status byte STB. The command *SRE 1 enables the INB of the status byte to
generate an SRQ whenever it is set. The function call IBWAIT instructs the computer to wait until one of
three conditions occurs: &H8000 in the mask (MASK%) corresponds to a GPIB error, &H4000 to a timeout
error, and &H0800 to the detection of RQS (ReQuest for Service) generated by the SRQ bit.
Whenever IBWAIT detects RQS, it automatically performs a serial poll to find out which oscilloscope
generated the interrupt. It will only exit if there was a timeout or if the oscilloscope (SCOPE%) generated
SRQ. The additional function call IBRSP fetches the value of the status byte, which may be further interpreted.
For this to work properly, the value of “Disable Auto Serial Polling” must be set to “off ” in the GPIB handler
(use IBCONF.EXE to check).
CMD$ = “*CLS ; INE 1;*SRE 1”
CALL IBWRT (SCOPE%, CMD$)
MASK% = &HC800
CALL IBWAIT (SCOPE%, MASK%)
IF (IBSTA% AND &HC000) <> 0 THEN PRINT “GPIB or Timeout Error” : STOP
CALL IBRSP (SCOPE%, SPR%)
PRINT “Status Byte =.”, SPR%
Board-level function calls can deal simultaneously with several oscilloscopes attached to the same interface
board. Refer to the National Instruments manual.
NOTE: After the serial poll is completed, the RQS bit in the STB status register is cleared. Note that
the other STB register bits remain set until they are cleared by means of a “*CLS” command or the
oscilloscope is reset. If these bits are not cleared, they cannot generate another interrupt
.
DO A PARALLEL POLL
Like serial polling, this is only useful when several oscilloscopes are connected. The controller simultaneously
reads the Individual STatus bit (IST) of all oscilloscopes to determine which one needs service. This method
allows up to eight different oscilloscopes to be polled at the same time.
When a parallel poll is initiated, each oscilloscope returns a status bit over one of the DIO data lines. Devices
may respond either individually, using a separate DIO line, or collectively on a single data line. Data-line
assignments are made by the controller using a Parallel Poll Configure (PPC) sequence.