
DOS Drivers
Types of Drivers
The Agilent 82335A and National Instruments GPIB are two popular DOS drivers. Each is briefly described here. See the software documentation supplied with the driver for more details.
Agilent 82335A Driver. For
SETUP.BAS starts at program line 5 and can run up to line 999. Your application programs must begin at line 1000. SETUP.BAS has
National Instruments
Your application program will not include the power supply symbolic name and GPIB address. These must be specified during configuration (when you run IBCONF.EXE). Note that the primary address range is from 0 to 30 but any secondary address must be specified in the address range of 96 to 126. The power supply expects a message termination on EOI or line feed, so set EOI w/last byte of Write. It is also recommended that you set Disable Auto Serial Polling.
All function calls return the status word IBSTA%, which contains a bit (ERR) that is set if the call results in an error. When ERR is set, an appropriate code is placed in variable IBERR%. Be sure to check IBSTA% after every function call. If it is not equal to zero, branch to an error handler that reads IBERR% to extract the specific error.
Error Handling
If there is no
Important Use error detection after every call to a subroutine.
Agilent BASIC Controllers
The Agilent BASIC Programming Language provides access to GPIB functions at the operating system level. This makes it unnecessary to have the header files required in front of DOS applications programs. Also, you do not have to be concerned about controller "hangups" as long as your program includes a timeout statement. Because the power supply can be programmed to generate SRQ on errors, your program can use an SRQ service routine for decoding detected errors. The detectable errors are listed in Table
Sample Program Code
The following programs are intended only to show how some of the same power supply functions can be programmed to each of the three previously mentioned GPIB interfaces. The first two are for the DOS interfaces and the third for the Agilent BASIC interface.
Remote Programming 57