Checking Global Status Functions to Debug Your Application
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 an NI-488.2 call fails, 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. For more information about the global status functions, refer to the Checking Global Status After Each NI-488.2 Call topic.
You can use NI Spy to determine which NI-488.2 call is failing. Once you know which NI-488.2 call fails, refer to the Ibsta Status Bit Values and the Error Codes and Solutions topics to understand why the NI-488.2 call failed.