HP IBASIC Supplement 8-21
Interfacing with External Devices
Interfacing with an External Controller
Interfacing with an External Controller
So far, we have discussed the ability to interface IBASIC programs with
a network of external devices using the GPIB. The idea of including an
external controller in that network, and interfacing an IBASIC program
with a program running in that computer, presents some new
possibilities.
External controller programs can interface with IBASIC programs
(referred to as “internal programs”) over GPIB in two basic ways:
First, the two programs can pass data back and forth using simple
OUTPUT and ENTER statements. This requires coordination of both the
internal and external programs and also requires that the internal
program be the active controller during the interaction. To get an
internal program and an external program to work together successfully,
you should have a good understanding of the GPIB model, presented
earlier in this chapter.
Second, the external program can make use of the extensive set of
analyzer GPIB commands that interface with IBASIC programs. These
mnemonics fall under the subsystem PROGram and allow the external
controller to remotely perform many of the IBASIC front panel activities.
This includes the ability to run, stop, pause, continue and delete an
internal program. You can also remotely query or set the values of
numeric and string variables.
Also included in the analyzer GPIB command set are commands that
allow you to transfer programs and program data to and from the
instrument. Programs can be transferred (uploaded and downloaded)
between an external controller and the program buffer in the
instrument, and data can be transferred between an external program
and a non-running internal program by setting and querying internal
program variables. These SCPI mnemonics are described in the
Programmer's Guide.
Also, refer to example programs included on the IBASIC Example
Programs Disk: DUALCTRL, TRICTRL, UPLOAD and DOWNLOAD. These
programs demonstrate using IBASIC with an external controller.