Debugging Your Application Chapter 4
NI-488.2 User Manual for Windows 4-6 © National Instruments Corp.
To test the configuration of your hardware, you can use the ibdiag program as
described in your getting started manual.
Timing Errors
If your application fails, but the same calls issued in wibic 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.
A well behaved IEEE 488 device should hold off handshaking and set the appropriate
transfer rate. 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
GPIB 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 will be controlled by the device and your application can adjust
itself and work independently on any platform. Other delay mechanisms will probably
cause varying delay times on different platforms.
Communication Errors

Repeat Addressing

Some devices require GPIB addressing before any GPIB activity. Devices adhering to
the IEEE 488.2 standard should remain in their current state until specific commands are
sent across the GPIB to change their state. You might need to configure your NI-488.2
driver to perform repeat addressing if your device does not remain in its currently
addressed state. Refer to Chapter 8, wibconf–Windows Interface Bus Configuration
Utility, or to the description of ibconfig (option IbcREADDR) in the NI-488.2
Function Reference Manual for DOS/Windows for more information about reconfiguring
your software.

Termination Method

You should be aware of the data termination method that your device uses. By default,
your NI-488.2 software is configured to send EOI on writes and terminate reads on EOI
or a specific byte count. If you send a command string to your device and it does not
respond, it might be because it does not recognize the end of the command. You might
need to send a termination message such as <CR> <LF> after a write command as
follows:
ibwrt(dev,”COMMAND\x0A\x0D”,9);