National Instruments GPIB-PC Network Card User Manual


 
IBIC Section Six
GPIB-PC User Manual 6-2 ©National Instruments Corp.
In many cases, use of the applications monitor allows you to omit
explicit error-checking code from the application. If a program is
expected to run without errors, trapping on errors will cause the monitor
to be invoked only if an error occurs during a GPIB call. You may then
take the action necessary to fix the problem.
Currently, the applications monitor is only supported by the Revision
C.5.1 and later versions of the GPIB Rev. C handler.
Installing the Applications Monitor
The applications monitor is included on the distribution diskette as the
file APPMON.COM. To install it, type the following command in
response to the DOS prompt:
APPMON
If the GPIB handler is not present or the monitor has been previously
installed, it will not load and an error message will be printed.
Once run, the monitor will remain resident in memory until you reboot
the system. Should you later desire that you no longer wish to devote
memory to the resident applications monitor, simply reboot your system;
the monitor will no longer be loaded.
IBTRAP
The applications monitor provides the capability to trap on GPIB
handler calls which have particular bits set in the GPIB status word.
The trap options are set by the special GPIB handler call, IBTRAP.
This call can be made either from the application program, or from the
special utility program called IBTRAP.EXE.
Both the function call and the DOS utility allow you to select a mask,
which determines those functions which will be trapped, and a monitor
mode, which selects what is to be displayed when a call is trapped.
The exact syntax of the function call is dependent on the language you
are using. See the description of IBTRAP in your language section for
details on including IBTRAP calls in your application.
The utility program IBTRAP may be used to set the trap mode from
DOS. Simply type IBTRAP in response to the DOS prompt, specifying