Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Linux NI-488.2 Application ibdev EDVR error

Hello All,

 

I'm attempting to compile the example linux 488.2 applications located in the /usr/local/natinst/examples directory (devquery.c and findinstr.c). I've downloaded the latest ni488.2 device drivers (NI4882-15.1.0f0.iso) and installed them on a laptop running the 2.6.32 x86_64 kernel. Both files compile successfully using the provided makefile. I keep getting the runtime errors below. I should mention I'm using the GPIB-ENET/100 interface. I'd prefer to use the GPIB-USB-HS interface but that doesn't work either.

 

ibdev Error

ibsta &H8000 <ERR>

iberr = 0 EDVR <Driver Error>

ibcnt = 3759407141

 

I double checked the primary address, board index, etc. and everything is correct. I can communicate with the test instrument (an Agilent Universal Counter) using the gpibintctrl utility. I don't understand why the gpibintctrl utility works but not the NI example code. I tried compiling both files separately using the "gcc <fname.c> -lni4882" command which also generates the above run time error.

 

Anyone have an idea what the problem is? 

 

Many Thanks,

 

Dave

0 Kudos
Message 1 of 5
(4,540 Views)

Hi Dave,

 

Thanks for posting in the forums to get some help with your 488.2 commands in Linux. I've been able to reproduce the error code on a similar setup, but I wanted to ask a few more questions about your system before I go forward. Does the same error appear when you run the findinstr and devquery applications? I receive the same error code as you for findinstr but a different code (acutally ibcnt 0) when running devquery.

 

I'm also curious if you've installed the NI-VISA driver as well as the 488.2 driver? I need to look into this issue further, but I would recommend installing NI VISA here - http://www.ni.com/download/ni-visa-15.0/5410/en/ . If you could post the other error codes you get, and if anything else changes after installing VISA, that would be helpful!

 

Thanks!

Austin H.
Chief Product Manager
Test Software
0 Kudos
Message 2 of 5
(4,490 Views)

Hello Austin,

 

Thank you for your response. I installed the NI-VISA drivers that came with the NI-488.2 15.1 distriution as you suggested but I still had the same problem so I uinstalled them. I'll try the NI-VISA 15.0 driver version as you suggested. I tried going back to an earlier device driver release (NI-488.2 2.9 - Linux) and this didn't work either. I should mention the installation script for NI-488.2 2.9 complained my kernel was compiled with a different gcc version than was installed on my laptop. I installed the gcc version my kernel was compiled with and the NI driver installation script ran successfully. Unfortunately, this didn't fix my original problem. The gpibintcntrl utility works fine but not the compiled example files. I was careful to follow the instructions on page 4-19 of the user manual (please see attached) . I did notice the gpibintctrl utility was compiled with an earlier gcc version than is installed on my machine. Is the source for the gpibintctrl utility available? Maybe I can try recompiling gpibintctrl with my gcc version and see if I can replicate the problem. It's baffling to me the gpibintctrly utility works great but not the compiled examples. There is something unique to how the gpibintctrl utility was compiled compared to what I'm doing.

 

Thank you,

 

Dave

0 Kudos
Message 3 of 5
(4,474 Views)

Hello Austin,

 

Update. The NI-VISA and NI488.2 sample programs DO work only if I'm root. I get a "Cannot open a session to the device error" if I run the executable as regular user.

 

Dave

0 Kudos
Message 4 of 5
(4,442 Views)

Hi Dave,

 

Good to hear that the gpibintcntrl utility works and that running the examples work if you're the root user. It's not abundantly clear why there would be a difference from one to the other, whether that's a difference in your system's settings, the way the makefile is configured to compile the examples, or how the gpibintcntrl utility is created, but that is probably at the heart of the issue. As long as the proper drivers are installed and you're running things as root, you should be good to go.

 

Have a good day!

 

Charles

0 Kudos
Message 5 of 5
(4,427 Views)