Remote Programming 57
DOS Drivers
Types of Drivers
The Keysight 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.
Keysight 82335A Driver
.
For GW-BASIC programming, the GPIB library is implemented as a series of subroutine
calls. To access these subroutines, your application program must include the header file SETUP.BAS, which is part of the
DOS driver software.
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 built-in error checking routines that provide a method to check for GPIB errors during program execution.
You can use the error-trapping code in these routines or write your own code using the same variables as used by
SETUP.BAS.
National Instruments GP-IB Driver
.
Your program must include the National Instruments header file DECL.BAS.
This contains the initialization code for the interface. Prior to running any applications programs, you must set up the
interface with the configuration program (IBCONF.EXE).
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 error-handling code in your program, undetected errors can cause unpredictable results. This includes
"hanging up" the controller and forcing you to reset the system. Both of the above DOS drivers have routines for detecting
program execution errors.
Important
Use error detection after every call to a subroutine.
Keysight BASIC Controllers
The Keysight 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 D-1 in Appendix D.
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
Keysight BASIC interface.
Содержание E4356A
Страница 1: ...Operating and Programming Guide Keysight Model E4356A Telecommunications DC Power Supply ...
Страница 2: ......
Страница 6: ...5 Declaration Page ...
Страница 13: ......
Страница 109: ......
Страница 113: ......
Страница 119: ......