Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA "VI_ERROR_BERR" instead of "VI_ERROR_NLISTENERS"

I used to receive "VI_ERROR_NLISTENERS" in response to a ViClear when no instruments were connected to a IEEE bus. On a newer system I receive "VI_ERROR_BERR" under the same circumstances. NI-Spy and a IEEE-488 bus analyzer verify the error is coming from the IEEE software layer. Could this be due to a change in the NI IEEE-488 software?

Here's the specifics:

Reference System: 450 MHz PC, WinNT 4.0/SP6, NI-VISA 2.0.1, NI-IEEE-488 1.5, PCI-GPIB+ card.
New System: 2.4 GHz PC, Win2K Pro, NI-VISA 3.0.1, NI IEEE-488 2.10, PCI-GPIB+ card.

Timing Information:
The NI documentation states that the "no listener" condition is defined when both NRFD and NDAC are unasserted. A bus anlayzer trace on the syste
m that returns "bus error" shows the following:

Entry 1: Time stamp = 50 ns. ATN, REN, NRFD and NDAC all asserted.
Entry 2: Time stamp = 50 ns. NRFD deasserted
Entry 3: Time stamp = 2 us, 450 ns. NDAC deasserted.

Unfortunately the reference system isn't available to get a reference analyzer trace.

Thanks in advance,
Ed Perkins
0 Kudos
Message 1 of 3
(4,893 Views)
Ed:

This is an intended change in the way NI-VISA maps the NI-488 error codes.

NI-488 has always returned EBUS to mean that the driver believes there is some kind of error with the bus itself. This error code can only happen in one of two cases:
1) There is nothing at all connected
2) There is something wrong with the cable

By contrast, NI-488 returns ENOL in the following two cases:
1) There is no listener addressed
2) There are devices on the bus but not at the specified address

In NI-VISA 1.x, we did map EBUS to VI_ERROR_NLISTENER as you noted. As I indicated, this was an intentional change starting in NI-VISA 2.5. We wanted to be able to distinguish between the various NI-488 errors. Note that VI_ERROR_BERR is a documented error co
de for viWrite and viRead, so we felt it was a more natural mapping.

Note that for maximum compatibility across VISA implementations, you would probably want to check for both error codes.

Sorry for any confusion this caused.

Dan Mondrik
National Instruments
Message 2 of 3
(4,893 Views)
A complete and well documented explanation within two hours and an apology to boot. I thought customer service like this died long ago. Thanks Dan and NI.
0 Kudos
Message 3 of 3
(4,893 Views)