Poll

Interested/Instrument/Interface

Yes,3458A,GPIB
17 (23.9%)
Yes,3458A,Prologix
10 (14.1%)
Yes,K2001/K2002,GPIB
11 (15.5%)
Yes, post type of instrument and type of interface (GPIB,Prologix,USB,LAN, RS232)
29 (40.8%)
Not interested, why?
4 (5.6%)

Total Members Voted: 44

Voting closed: December 13, 2016, 11:12:53 am

Author Topic: Raspberry Pi2/3 logging platform for Voltnuts  (Read 123686 times)

0 Members and 1 Guest are viewing this topic.

Offline picburner

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: it
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #400 on: December 12, 2020, 05:10:26 pm »
Have you made any upgrades lately?
If you have upgraded the Kernel you have to repeat the Linux-Gpib installation procedure.
 
The following users thanked this post: Irv1n

Offline wiesl

  • Contributor
  • Posts: 21
  • Country: at
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #401 on: March 16, 2021, 02:26:28 pm »
Any new version available?
 

Offline picburner

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: it
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #402 on: March 17, 2021, 07:05:34 am »
The linux-gpib 4.3.4 version has been released from a while, essential if you have updated to raspberrypi-kernel 1.20210303-1.
 

Offline Dwaine

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: ca
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #403 on: April 01, 2021, 05:31:06 pm »
I just installed it too.   Looking at it so I can log some usb devices.  Trying to figure out how it works.
 

Offline nitromethane

  • Contributor
  • Posts: 11
  • Country: si
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #404 on: November 09, 2021, 09:14:08 pm »
Hi, new guy here.

I'm trying to get measurements from my instruments (Keithley 196 and 199) via GPIO based GPIB interface using linux-gpib on a RPi3.
So far I've been able to successfully compile linux-gpib software on the Pi and can send valid commands to instruments using the ibtest program.
Reading measurements from instruments is where I get stuck.

If I try to read using the ibtest program I get timeout error:
Code: [Select]
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
        send group e(x)ecute trigger (device only)
: r
enter maximum number of bytes to read [1024]:
trying to read 1024 bytes from device...
received string: ''
Number of bytes read: 0
gpib status is:
ibsta = 0xc100  < ERR TIMO CMPL >
iberr= 6
EABO 6: Operation aborted

ibcntl = 0

Or if I try to send command bytes, interface clear command, asserting ATN,... I get Bad argument errors
Code: [Select]
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
        send group e(x)ecute trigger (device only)
: i
gpib status is:
ibsta = 0x8100  < ERR CMPL >
iberr= 4
EARG 4: Bad argument

ibcntl = 0
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
        send group e(x)ecute trigger (device only)
: k
Enter '1' to assert ATN synchronously, or '0' for asynchronously [1]: 1
Taking control synchronously...
gpib status is:
ibsta = 0x8100  < ERR CMPL >
iberr= 4
EARG 4: Bad argument

ibcntl = 0

I also tried using Python commands, but with similar results.

The interface circuit I use seems to be working fine as I can send commands to instruments just fine and can read measurements from keithleys using an Arduino running AR488 connected to said circuit.

I think what I need is just a kick in the right direction to get me rolling forward, so if anyone has any good suggestions, please let me know :)
 

Offline miro123

  • Regular Contributor
  • *
  • Posts: 124
  • Country: nl
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #405 on: November 13, 2021, 09:39:07 pm »
does Keithley's work well with AR488?
 

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 591
  • Country: us
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #406 on: November 14, 2021, 06:25:28 pm »
Hi, new guy here.

I'm trying to get measurements from my instruments (Keithley 196 and 199) via GPIO based GPIB interface using linux-gpib on a RPi3.
So far I've been able to successfully compile linux-gpib software on the Pi and can send valid commands to instruments using the ibtest program.
Reading measurements from instruments is where I get stuck.

If I try to read using the ibtest program I get timeout error:
Code: [Select]
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
        send group e(x)ecute trigger (device only)
: r
enter maximum number of bytes to read [1024]:
trying to read 1024 bytes from device...
received string: ''
Number of bytes read: 0
gpib status is:
ibsta = 0xc100  < ERR TIMO CMPL >
iberr= 6
EABO 6: Operation aborted

ibcntl = 0

Or if I try to send command bytes, interface clear command, asserting ATN,... I get Bad argument errors
Code: [Select]
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
        send group e(x)ecute trigger (device only)
: i
gpib status is:
ibsta = 0x8100  < ERR CMPL >
iberr= 4
EARG 4: Bad argument

ibcntl = 0
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
        send group e(x)ecute trigger (device only)
: k
Enter '1' to assert ATN synchronously, or '0' for asynchronously [1]: 1
Taking control synchronously...
gpib status is:
ibsta = 0x8100  < ERR CMPL >
iberr= 4
EARG 4: Bad argument

ibcntl = 0

I also tried using Python commands, but with similar results.

The interface circuit I use seems to be working fine as I can send commands to instruments just fine and can read measurements from keithleys using an Arduino running AR488 connected to said circuit.

I think what I need is just a kick in the right direction to get me rolling forward, so if anyone has any good suggestions, please let me know :)

     Perhaps I misunderstand, but above looks like the problem is with the communication between linux-gpib <-> GPIO based GPIB adaptor and unrelated to the instrument, doesn't it?  Is that a self-made adaptor?  Perhaps worth testing with a more common interface (if a PC is available, then an old ISA or PCI based adaptor would be best; on the Pi that's not an option -- there a pricey Agilent or NI USB adaptor might be best) might help locate the problem.
 

Offline nitromethane

  • Contributor
  • Posts: 11
  • Country: si
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #407 on: November 15, 2021, 09:18:15 pm »
Basically I'm able to transmit commands, but not receive data back.

I'm using a self made GPIB adapter with SN7516x bus drivers wired according to pin definitions in "gpib_bitbang.c" file of the kernel module source (https://sourceforge.net/p/linux-gpib/code/HEAD/tree/trunk/linux-gpib-kernel/drivers/gpib/gpio/gpib_bitbang.c).
As a next step I'm going to try bypassing the SN7516x drivers and wiring the GPIB bus directly to RPi's GPIO pins, but haven't found time yet to do so.

The same circuit seems to work just fine when connected to an Arduino Micro running AR488 firmware, I'm able to transmit commands and receive data just fine.
That rules out problems with instruments, wires and adapter circuit I guess.

AR488 firmware seems to work just fine with my Keithley 196 and 199 and the adapter board I made fro the Raspi.

At the moment I don't have access to any other working GPIB adapters, but I'm starting to think I should get my self an old PIC adapter from fleabay. Any reliable suggestions?
 

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 591
  • Country: us
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #408 on: November 16, 2021, 05:28:01 pm »
[..]
As a next step I'm going to try bypassing the SN7516x drivers and wiring the GPIB bus directly to RPi's GPIO pins, but haven't found time yet to do so.
      Perhaps I'm interpreting the 'directly' too literally, but keep in mind that the RPi's bus, unlike AVR based Arduinos, is not 5V tolerant.

 

Offline nitromethane

  • Contributor
  • Posts: 11
  • Country: si
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #409 on: November 16, 2021, 09:24:35 pm »
According to "Tutorial Description of the Hewlett-Packard Interface Bus", this implementation https://github.com/elektronomikon/raspizero_gpib_shield, and poking at the GPIB port with a DMM, I should (??) be safe to wire the RPi directly to the bus.

So any way, I deleted the driver ICs wired the GPIB bus to RPi via some 100ohm resistors, and hid behind a brick wall.
The good news: RPi is still alive and is able to read data from instruments.  :-+
The bad news: My circuit sucks for some reason and it's already the 1st revision of the PCB I had made |O

Code: [Select]
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
        send group e(x)ecute trigger (device only)
: r
enter maximum number of bytes to read [1024]:
trying to read 1024 bytes from device...
received string: 'NDCV+03.38573E+0
'
Number of bytes read: 18
gpib status is:
ibsta = 0x2100  < END CMPL >
iberr= 0

ibcntl = 18

I'm attaching the GPIB part of my circuit. The left side connects directly to the RPi GPIO

Right, back to debugging my circuit...

 

Offline picburner

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: it
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #410 on: November 18, 2021, 08:22:21 am »
Linux-gpib is only compatible with this supported hardware.
If your hardware isn't on the list it most likely won't work.
 

Offline e61_phil

  • Frequent Contributor
  • **
  • Posts: 961
  • Country: de
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #411 on: November 18, 2021, 08:31:16 am »
For an own GPIB Apdapter I would recommend building something with an Vxi11 interface. Implementing read and write is sufficient for almost everything and you can then even use pyvisa on top of that.
 

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 591
  • Country: us
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #412 on: November 18, 2021, 06:44:01 pm »
Linux-gpib is only compatible with this supported hardware.
If your hardware isn't on the list it most likely won't work.
     I think nitromethane is shooting for compatibility to the "GPIO bitbang adapter".   Seems to be new-ish (started in 2016, most recent modifications spring 2021).  I think that's very interesting and would like to see it work :)
     IMHO, for a cheap adapter at the tail of a USB cable and directly connecting to a GPBI interface of a single instrument (like e.g. AR488), leaving the bus driver out as a cost-reduction measure seems sensible.  When connecting multiple, even old, devices via potentially quite long cables, this seems much more questionable.
« Last Edit: November 20, 2021, 12:57:38 am by guenthert »
 

Offline nitromethane

  • Contributor
  • Posts: 11
  • Country: si
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #413 on: November 18, 2021, 07:21:48 pm »
Just to be clear, yes I'm trying to get the Linux-gpib GPIO bitbang driver working with a self made interface circuit with a few extra bits along side the GPIB bus drives.

I found the problem with my circuit. DAV, NRFD and NDAC lines on the raspberry side need pull-up resistors.
When testing with an Arduino this wasn't an issue since the pull-ups seem to be taken care of inside the MCU, but I was naive in thinking that pull-ups were also taken care inside of the SoC.
Now with 10k resistors pulling to 3,3V, my interface circuit finally seems work properly.

I'll do a new revision of the circuit (hopefully the last one) and if I'm happy with it, I was thinking of open sourcing the design.
 

Offline e61_phil

  • Frequent Contributor
  • **
  • Posts: 961
  • Country: de
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #414 on: November 19, 2021, 06:56:54 am »
Just to be clear, yes I'm trying to get the Linux-gpib GPIO bitbang driver working with a self made interface circuit with a few extra bits along side the GPIB bus drives.

Why not writing an own userlevel "driver"? Linux-GPIB is really a pain and in your case it would be simple to avoid it.
 

Offline nitromethane

  • Contributor
  • Posts: 11
  • Country: si
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #415 on: November 19, 2021, 09:53:40 pm »
I was already considering writing my own GPIB bitbang library in python until I got the thing working, which considering this is my first time doing anything GPIB or computer controlled measuring equipment in general would be a big project to say the least.

Now I'm almost afraid to ask, but why is linux-gpib a pain?
Aside from needing recompiling every time the kernel gets updated the linux-gpib GPIO driver seems to work fine, if the interface circuit is correctly implemented.
 

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 591
  • Country: us
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #416 on: November 20, 2021, 01:00:28 am »
[..]
Why not writing an own userlevel "driver"? Linux-GPIB is really a pain and in your case it would be simple to avoid it.
     ???  Seems to compile and install still (even though it's old) just fine.  Where's the pain?
And there's some value in partly reusing already tested code instead of inventing the wheel once again and not quite round.
 

Offline perdrix

  • Frequent Contributor
  • **
  • Posts: 528
  • Country: gb
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #417 on: November 23, 2021, 12:17:40 pm »
Will this do the drift measurement for a 3458A as per service note 18A?

How do I connect it to GPIB bus?  I have NI USB-GPIB-HS/HS+ adapters

Thanks
David
 

Offline nitromethane

  • Contributor
  • Posts: 11
  • Country: si
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #418 on: December 30, 2021, 05:56:13 pm »
I finally got my GPIB interface circuit for Raspberry Pi properly working and open sourced the design.
forum topic: https://www.eevblog.com/forum/projects/graspib-gpib-interface-for-raspberry-pi/
 
The following users thanked this post: ramon



Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 



Advertise on the EEVblog Forum