Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Program GPIB

Hi!

 

I am using the PCI GPIB board from National Instruments and I need to program a Qt console Application using the libgpib.so. The connection to my Laser Diode Controller can't be done by the NI driver because I'm using ubuntu but Linux distributes a good driver for GPIB boards. When I use the program ibtest, I can use my laser controller with no problem. The next step is to program the QT console application but I keep getting error while writing strings to the device. I will post my code as attachment but I'm using the same code that comes with the Linux GPIB driver and that works. The library is the libgpib.so.0.1.7 and when I opened it with Eclipse looked the right one to use. 

 

Error message:

 


You can:
    w(a)it for an event
    write (c)ommand bytes to bus (system controller only)
    send (d)evice clear (device only)
    change remote (e)nable line (system controller only)
    (g)o to standby (release ATN line, system controller only)
    send (i)nterface clear (system controller only)
    ta(k)e control (assert ATN line, system controller only)
    get bus (l)ine status (board only)
    go to local (m)ode
    change end (o)f transmission configuration
    (q)uit
    (r)ead string
    perform (s)erial poll (device only)
    change (t)imeout on io operations
    request ser(v)ice (board only)
    (w)rite data string
: w
enter a string to send to your device: *IDN?
sending string: *IDN?

libgpib: invalid descriptor
libgpib: invalid descriptor

 

 

Please give me some advice.

 

Thanks

0 Kudos
Message 1 of 2
(4,155 Views)

Hi Ruben

 

Do I see that in the correct coherency: you are not using NI software, neither our GPIB driver only a GPIB board from NI and you are asking in the NI forum for assistance ?

 

That is a little bit strange imho. OK, the device is correct recognized on your computer ? Can you communicate over a testpanel with the device ?

 

For most GPIB errors have a look at this link

 

GPIB Error Codes and Common Solutions 

https://www.ni.com/en/support/documentation/supplemental/22/gpib-error-codes-and-common-solutions.ht...

 

 

Kind regards

 

Pixar

0 Kudos
Message 2 of 2
(4,088 Views)