8-18 HP IBASIC Supplement
Interfacing with External Devices
The IBASIC GPIB Model
The pausing or termination of a program will cause the Program
Running bit in the Device Status register to go low. This can be used to
generate an external SRQ. (For an example, see the DUALCTRL program
in the Example Programs Guide.)
IBASIC as the Active Controller
The IBASIC program is always the active controller on the internal
interface (select code 8). When a program starts running, the GPIB
controller status of the instrument is automatically passed to the
program. For example, if the instrument is set as System Controller, a
program running in the instrument automatically becomes system
controller and active controller on the external bus, and the instrument
relinquishes active control. When the program stops, the instrument
regains active control.
Also, if an instrument set as Talker/Listener is passed control from an
external controller, any program running in the instrument becomes
active controller on the external interface.
Thus, there are two cases where a program running in an instrument
can be the active controller on the external interface:
1. When the host instrument is set as System Controller and the
program has not passed control.
2. When the host instrument is set as Talker/Listener and the
instrument has been passed control from an external controller.