Chapter 5 Debugging Your Application
NI-488.2 User Manual 5-2 ni.com
Configuration Errors
Several applications require customized configuration of the NI-488.2
driver. For example, you might want to terminate reads on a special
end-of-string character, or you might require secondary addressing. In
these cases, you can either reconfigure from your application using the
ibconfig function or reconfigure using the GPIB Configuration utility.
Note National Instruments recommends using ibconfig to modify the configuration.
If your application uses ibconfig, it works properly regardless of the
previous configuration. For more information about using ibconfig,
refer to the description of ibconfig 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.
Timing Errors
If your application fails, but the same calls issued interactively in the
Interactive Control utility are successful, your program might be issuing
the NI-488.2 calls too quickly for your device to process and respond to
them. This problem can also result in corrupted or incomplete data. This is
only a problem with noncompliant GPIB devices.
A well-behaved IEEE 488 device does not experience timing errors. If your
device is not well-behaved, you can test for and resolve the timing error by
single-stepping through your program and inserting finite delays between
each NI-488.2 call. One way to do this is to have your device communicate
its status whenever possible. Although this method is not possible with
many devices, it is usually the best option. Your delays are controlled by the
device and your application can adjust itself and work independently on
any platform. Other delay mechanisms can exhibit differing behaviors on
different platforms and thus might not eliminate timing errors.