Manual

C
HAPTER
T
WO
:
Control by GPIB
WM-RCM-E Rev D ISSUED: February 2005
25
In the following example, the command INE 1 enables the event “new signal acquired” in the INR to be
reported to the INB bit of the status byte STB. The PaRallel poll Enable register (PRE) determines which
events will be summarized in the IST status bit. The command *PRE 1 enables the INB bit to set the IST bit
whenever it is itself set. Once parallel polling has been established, the parallel-poll status is examined until a
change on data bus line DIO2 takes place.
Stage 1
1. Enable the INE and PRE registers
2. Configure the controller for parallel poll
3. Instruct the X-Stream DSO to respond on data line 2 (DIO2) with these commands:
CMD1$ = DSOListenPCTalk$ ‘ As defined earlier
CALL IBCMD (BRD0%, CMD1$)
CMD$ = “INE 1;*PRE 1”
CALL IBWRT (BRD0%, CMD$)
PPE$ = Chr$ (&H5) ‘ GPIB Parallel Poll Enable
MSA9$ = Chr$ (&H69) ‘ GPIB Secondary Address 9
CMD4$ = PPE$ + MSA9$ + UnListen$
CALL IBCMD (BRD0%, CMD4$)
Stage 2
4. Parallel poll the oscilloscope until DIO2 is set with these commands:
Do
CALL IBRPP (BRD0%, PPR%)
Loop Until (PPR% AND &H2) = 2
Stage 3
5. Disable parallel polling (hex 15) and clear the parallel poll register with these commands:
PPU$ = Chr$ (&H15) ‘ GPIB Parallel Poll
Unconfigure
CALL IBCMD (BRD0%, PPU$)
CALL IBCMD (BRD0%, CMD1$) ‘ As defined earlier
CMD$ = “*PRE 0” : CALL IBWRT(BRD0%,CMD$):
In the above example, board-level GPIB function calls are used. It is assumed that the controller (board) and
the X-Stream DSO (device) are located at addresses 0 and 4, respectively.