Chapter 5 debugging your application, Ni spy, Global status functions – National Instruments NI-488.2 User Manual
Page 58: Ni-488.2 error codes, Debugging your application

© National Instruments Corporation
5-1
5
Debugging Your Application
This 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,
Global Status Functions
At the end of each NI-488.2 call, the global status functions (
Ibsta
,
Iberr
, and
Ibcnt
) 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
Ibcnt
contains even more error information.
Once you know which NI-488.2 call fails, refer to Appendix B,
understanding why the NI-488.2 call failed. This information is also
available in the NI-488.2 Help. For instructions on accessing the online
help, refer to the
Using the NI-488.2 Documentation
section in
.
NI-488.2 Error Codes
The error function,
Iberr
, is meaningful only when the ERR bit in the
status function,
Ibsta
, is set. For a detailed description of each error and
possible solutions, refer to Appendix C,
.