© National Instruments Corporation 5-1 NI-488.2 User Manual
5
Debugging Your ApplicationThis chapter describes several ways to debug your application.
NI Spy
The NI Spy utility monitors NI-488.2 API calls made by NI-488.2
applications. If an application does not have built-in error detection
handling, you can use NI Spy to determine which NI-488.2 call is failing.
For more information about using NI Spy, select Help»Help Topics
in NI Spy or refer to Chapter 6, NI Spy Utility.
Global Status Variables
At the end of each NI-488.2 call, the global status variables (ibsta,
iberr, ibcnt, and ibcntl) are updated. If you are developing an
NI-488.2 application, you should check for errors after each NI-488.2 call.
If a NI-488.2 call failed, the high bit of ibsta (the ERR bit) is set. For a
failed NI-488.2 call, iberr contains a value that defines the error. In some
error cases, the value in ibcntl contains even more error information.
Once you know which NI-488.2 call fails, refer to Appendix B, Status
Word Conditions, and Appendix C, Error Codes and Solutions, for help
understanding why the NI-488.2 call failed. This information is also
available in the NI-488.2 online help. For instructions on accessing the
online help, refer to the Using the NI-488.2 Documentation section in
About This Manual.
NI-488.2 Error Codes
The error variable, iberr, is meaningful only when the ERR bit in the
status variable, ibsta, is set. For a detailed description of each error and
possible solutions, refer to Appendix C, Error Codes and Solutions.