Creating Downloadable Programs

computer is not in control of the HP-IB. (Only one controller can control HP-IB at any time.) For this reason, ENTER and OUTPUT commands are incorporated into user-de￿ned functions that are executed by the OSA with user-de￿ned keys. This is accomplished by either physically disconnecting the computer from the bus, or by executing the HP-IB system-level commands that release the computer from HP-IB. The HP-BASIC command sequence that does this is shown below.

10LOCAL 7

20ABORT 7

The release HP-IB command (RELHPIB) must be included at the end of any user-de￿ned functions containing ENTER or OUTPUT commands. This ensures that the OSA surrenders control of HP-IB after all ENTER and OUTPUT commands have been executed.

To control instruments over HP-IB

￿Disconnect any computer from the bus.

￿Use the OUTPUT command to send data to an instrument.

￿Use the ENTER command to receive data from an instrument.

6-20