Debugging With The Global Status Variables; Debugging With Ibic; Gpib Error Codes - National Instruments NI-488.2M Software Reference Manual

For os/2
Hide thumbs Also See for NI-488.2M:
Table of Contents

Advertisement

Chapter 4
Debugging Your Application

Debugging with the Global Status Variables

After each function call to your NI-488.2M driver, ibsta, iberr, and ibcnt
are updated before the call returns to your application. You should check for an
error after each GPIB call. Refer to Chapter 3, Developing Your Application,
for more information about how to use these variables within your program to
automatically check for errors.
After you determine which GPIB call is failing and note the corresponding
values of the global variables, refer to Appendix A, Status Word Conditions,
and Appendix B, Error Codes and Solutions. These appendixes will help you
interpret the state of the driver.

Debugging with ibic

If your application does not automatically check for and display errors, you can
locate an error by using ibic. Simply issue the same functions or routines,
one at a time, as they appear in your application program. Because ibic
returns the status values and error codes after each call, you should be able to
determine which GPIB call is failing. For more information about ibic, refer
to Chapter 5, ibic—Interface Bus Interactive Control Utility.
After you determine which GPIB call is failing and note the corresponding
values of the global variables, refer to Appendix A, Status Word Conditions,
and Appendix B, Error Codes and Solutions. These appendixes will help you
interpret the state of the driver.

GPIB Error Codes

Table 4-1 lists the GPIB error codes. Remember that the error variable
is meaningful only when the ERR bit in the status variable is set. For a detailed
description of each error and possible solutions, refer to Appendix B, Error
Codes and Solutions.
© National Instruments Corp.
4-3
NI-488.2M SRM for OS/2

Advertisement

Table of Contents
loading

Table of Contents