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 145265 times)

0 Members and 1 Guest are viewing this topic.

Offline BFX

  • Frequent Contributor
  • **
  • Posts: 376
  • Country: sk
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #175 on: December 31, 2016, 07:57:34 am »
Not enough place :D (RPi 2 B+,7" LCD, Agilent 82357B, Bluetooth kbrd and mouse )
It's not working for now with Agilent 82357B, but it's only few minutes from start. (tuning is in progress) :)
Funny moment's with this keyboard (it is shit) :D (how to put the #? ou yes ctrl + alt + u and 23 )

That message seems more like one or both of these:

1: gpib_config has not been run, after the adapter initialization.
2: User has no access to /dev/gpib0  - Do a : sudo chmod 666 /dev/gpib*

What does a lsusb say ?

What does a uname -a say ?

/Bingo

thx for hints :-+
there is no gpib in dev

 

Offline plesaTopic starter

  • Frequent Contributor
  • **
  • Posts: 965
  • Country: se
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #176 on: December 31, 2016, 09:14:13 am »
Not enough place :D (RPi 2 B+,7" LCD, Agilent 82357B, Bluetooth kbrd and mouse )
It's not working for now with Agilent 82357B, but it's only few minutes from start. (tuning is in progress) :)
Funny moment's with this keyboard (it is shit) :D (how to put the #? ou yes ctrl + alt + u and 23 )

That message seems more like one or both of these:

1: gpib_config has not been run, after the adapter initialization.
2: User has no access to /dev/gpib0  - Do a : sudo chmod 666 /dev/gpib*

What does a lsusb say ?

What does a uname -a say ?

/Bingo

thx for hints :-+
there is no gpib in dev

You do not have firmware in device loaded. With loaded FW PID will be not 518 but 718. But anyway, this interface is not currently working. You needs to use USBTMC, VXI
 or another proven adapters like NI GPIB USB HS, NI GPIB USB B, E5810 A/B.
« Last Edit: December 31, 2016, 09:19:27 am by plesa »
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1987
  • Country: dk
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #177 on: December 31, 2016, 10:50:54 am »

thx for hints :-+
there is no gpib in dev

As Plesa says , you need to load the firmware twice.

And have you loaded the kernel module module ?

You should see this

Quote
If "lsmod |grep agilent" shows these two lines:
pi@pi3:~ $ lsmod |grep agilent
agilent_82357a         18039  0
gpib_common            31540  1 agilent_82357a

If not , what does : sudo modprobe agilent_82357a           say ?

Does the lsmod show the module loaded after this ??

/Bingo
 

Offline BFX

  • Frequent Contributor
  • **
  • Posts: 376
  • Country: sk
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #178 on: December 31, 2016, 12:25:19 pm »
Thank you guys  8)
@plesa : are you sure that this doesn't work at all? I have original one.

After loading firmware twice I got gpib0-15 in dev.
And on the adapter Access and Ready lights to green, but also Fail led is on (red). See pictures.

Code: [Select]
pi@raspberrypi:~ $ lsmod |grep agilent
agilent_82357a         18039  0
gpib_common            31540  1 agilent_82357a

result of lsmod



« Last Edit: December 31, 2016, 12:27:29 pm by BFX »
 

Offline TiN

  • Super Contributor
  • ***
  • Posts: 4543
  • Country: ua
    • xDevs.com
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #179 on: December 31, 2016, 12:27:18 pm »
What lsusb and modprobe results? :)
YouTube | Metrology IRC Chat room | Let's share T&M documentation? Upload! No upload limits for firmwares, photos, files.
 

Offline BFX

  • Frequent Contributor
  • **
  • Posts: 376
  • Country: sk
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #180 on: December 31, 2016, 12:28:28 pm »
pi@raspberrypi:~ $ lsmod |grep agilent
agilent_82357a         18039  0
gpib_common            31540  1 agilent_82357a

Code: [Select]
pi@raspberrypi:~ $ modprobe agilent_82357a
pi@raspberrypi:~ $ lsmod
Module                  Size  Used by
agilent_82357a         18039  0
gpib_common            31540  1 agilent_82357a
bnep                   10340  2
8192cu                560049  0
cfg80211              427855  1 8192cu
btusb                  27628  0
btrtl                   3667  1 btusb
btintel                 6167  1 btusb
btbcm                   5929  1 btusb
bluetooth             326105  24 bnep,btbcm,btrtl,btusb,btintel
rfkill                 16037  4 cfg80211,bluetooth
evdev                  11396  2
joydev                  9024  0
snd_bcm2835            20447  1
snd_pcm                75762  1 snd_bcm2835
snd_timer              19288  1 snd_pcm
snd                    51908  5 snd_bcm2835,snd_timer,snd_pcm
bcm2835_gpiomem         3040  0
i2c_bcm2708             4834  0
bcm2835_wdt             3225  0
rpi_ft5406              3986  0
rpi_backlight           2064  0
uio_pdrv_genirq         3164  0
uio                     8000  1 uio_pdrv_genirq
i2c_dev                 5859  0
fuse                   84037  3
ipv6                  347594  56
pi@raspberrypi:~ $

« Last Edit: December 31, 2016, 12:32:19 pm by BFX »
 

Offline TiN

  • Super Contributor
  • ***
  • Posts: 4543
  • Country: ua
    • xDevs.com
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #181 on: December 31, 2016, 12:32:30 pm »
:) I meant separately :)

Did you run gpib_config? Show us your /etc/gpib.conf, make us not guess :)
YouTube | Metrology IRC Chat room | Let's share T&M documentation? Upload! No upload limits for firmwares, photos, files.
 

Offline plesaTopic starter

  • Frequent Contributor
  • **
  • Posts: 965
  • Country: se
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #182 on: December 31, 2016, 12:35:20 pm »
pi@raspberrypi:~ $ lsmod |grep agilent
agilent_82357a         18039  0
gpib_common            31540  1 agilent_82357a
Once again, this adapter is not working with Linux-GPIB and recent kernels 4.4 -4.9.Does not matter if it is clone or genuine ( I have Keysight genuine version and clone)
When solution will be ready Bingo600 or me will inform in this thread.
Maybe you can be successful with Arduino adapter.
« Last Edit: December 31, 2016, 12:37:20 pm by plesa »
 

Offline BFX

  • Frequent Contributor
  • **
  • Posts: 376
  • Country: sk
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #183 on: December 31, 2016, 12:41:43 pm »
:) I meant separately :)

Did you run gpib_config? Show us your /etc/gpib.conf, make us not guess :)
No :) but there is no section for agilent_82357a
Have you an example?
 

Offline TiN

  • Super Contributor
  • ***
  • Posts: 4543
  • Country: ua
    • xDevs.com
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #184 on: December 31, 2016, 12:46:09 pm »
I heard these guys at xDevs have a guide. But listed procedure there works only on Pi with kernels 3.8.xx
YouTube | Metrology IRC Chat room | Let's share T&M documentation? Upload! No upload limits for firmwares, photos, files.
 
The following users thanked this post: CalMachine

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1987
  • Country: dk
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #185 on: December 31, 2016, 12:50:51 pm »
I heard these guys at xDevs have a guide. But listed procedure there works only on Pi with kernels 3.8.xx
@TiN
 ;) Promoting


Re Error:
If the read light are on , you either missed some of the firmware stuff , or you haven't run gpib_config after loading the fw.
Or maybe have an invalid (unadapted) /etc/gpib.conf file.
See
https://www.eevblog.com/forum/reviews/using-a-raspberry-pi-with-linux-gpib-and-a-beiming-or-agilent-usb-gpib-adapter/msg964579/#msg964579


My guess - gpib_config or gpib.conf  related.

Do you have the /dev/gpib* devices now ??
Make sure to chmod 666 them , or as a test run as root


/Bingo
« Last Edit: December 31, 2016, 12:57:20 pm by bingo600 »
 
The following users thanked this post: CalMachine

Offline BFX

  • Frequent Contributor
  • **
  • Posts: 376
  • Country: sk
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #186 on: December 31, 2016, 12:56:29 pm »
Ok I update gpib.conf and run and red light is gone  8)

Code: [Select]
pi@raspberrypi:~ $ sudo nano /etc/gpib.conf
pi@raspberrypi:~ $ sudo gpib_config
pi@raspberrypi:~ $


Now only ready is green  :-+

I tried to run some test but  failed :(
Code: [Select]
Traceback (most recent call last):
  File "/pub/python/Test_GPIB.py", line 5, in <module>
    instr.write("*IDN?")
  File "/usr/local/lib/python2.7/dist-packages/Gpib.py", line 49, in write
    gpib.write(self.id, str)
GpibError: write() failed: An attempt to write command bytes to the bus has timed out.

Should be that my 34401A is not configured properly?
Address is OK. And after test 34401 is frozen only some underscores are in place of digits.


« Last Edit: December 31, 2016, 01:12:03 pm by BFX »
 

Offline TiN

  • Super Contributor
  • ***
  • Posts: 4543
  • Country: ua
    • xDevs.com
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #187 on: December 31, 2016, 01:41:13 pm »
Everything is OK with your 34401, it's just you end up in same state as everyone else here are :)
Meter is "frozen" because it's in remote mode. Press local button to warm it back to normal.
YouTube | Metrology IRC Chat room | Let's share T&M documentation? Upload! No upload limits for firmwares, photos, files.
 

Offline BFX

  • Frequent Contributor
  • **
  • Posts: 376
  • Country: sk
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #188 on: December 31, 2016, 01:54:52 pm »
Everything is OK with your 34401, it's just you end up in same state as everyone else here are :)
Meter is "frozen" because it's in remote mode. Press local button to warm it back to normal.

Thank you for words of encouragement :D
Do you know roughly where is the problem? Is it only for 34401 or it's common problem of 82357a?

 

Offline TiN

  • Super Contributor
  • ***
  • Posts: 4543
  • Country: ua
    • xDevs.com
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #189 on: December 31, 2016, 01:57:44 pm »
Common problem with 82357A/Bs + linux-gpib + kernels 4.x.x series.
Something in linux kernel headers or kernel itself got change from 3.8->4.x which caused these agilent pods (real ones and fakes) to timeout on any gpib operation.
YouTube | Metrology IRC Chat room | Let's share T&M documentation? Upload! No upload limits for firmwares, photos, files.
 

Offline BFX

  • Frequent Contributor
  • **
  • Posts: 376
  • Country: sk
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #190 on: December 31, 2016, 02:21:20 pm »
Common problem with 82357A/Bs + linux-gpib + kernels 4.x.x series.
Something in linux kernel headers or kernel itself got change from 3.8->4.x which caused these agilent pods (real ones and fakes) to timeout on any gpib operation.

Thx for explanation. It means at 3.8 it's working fine, sure?
I'm not familiar with linux too much, but maybe compare the changes 3.8->4.x would do the business :)
Well I think It's time to try 3.8 for my solution, till here some experts solve this problem  :box:
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1987
  • Country: dk
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #191 on: December 31, 2016, 02:47:45 pm »
Common problem with 82357A/Bs + linux-gpib + kernels 4.x.x series.
Something in linux kernel headers or kernel itself got change from 3.8->4.x which caused these agilent pods (real ones and fakes) to timeout on any gpib operation.

Thx for explanation. It means at 3.8 it's working fine, sure?
I'm not familiar with linux too much, but maybe compare the changes 3.8->4.x would do the business :)
Well I think It's time to try 3.8 for my solution, till here some experts solve this problem  :box:

Note that kernel 3.8 (Wheezy) won't work on a RasPI v3 , you need a v1 or v2

We're  working with the linux-gpib maintainer to find the problem on the 4.x.x kernels (Jessie)

/Bingo
 

Offline CalMachine

  • Frequent Contributor
  • **
  • Posts: 477
  • Country: us
  • Metrology Nut
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #192 on: December 31, 2016, 06:01:03 pm »
I received my RPi earlier this week!  I was able do successfully install the V2 of the rpi lognut image and booted up.  RPi and Linux is brand new to me, so it's a bit overwhelming :palm:.  I figured having experience with Arduino and PICs that RPi would come somewhat easily.... well I was wrong.  :scared:

I've yet to test any GPIB instrument connections.  I've got a genuine HP 82357B and NI GPIB-USB-HS to use... although it seems like the HP 82357B is having issues with the current iteration the RPi kernel?
« Last Edit: December 31, 2016, 06:15:06 pm by CalMachine »
All your volts are belong to me
 

Offline plesaTopic starter

  • Frequent Contributor
  • **
  • Posts: 965
  • Country: se
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #193 on: December 31, 2016, 06:54:50 pm »
I received my RPi earlier this week!  I was able do successfully install the V2 of the rpi lognut image and booted up.  RPi and Linux is brand new to me, so it's a bit overwhelming :palm:.  I figured having experience with Arduino and PICs that RPi would come somewhat easily.... well I was wrong.  :scared:

I've yet to test any GPIB instrument connections.  I've got a genuine HP 82357B and NI GPIB-USB-HS to use... although it seems like the HP 82357B is having issues with the current iteration the RPi kernel?

It is easy. 82357B is not working and image is set for NI GPIB HS. On image is /pub directory shared over samba (you can connect as network drive from another machine and edit webpage and scripts).
There is running webserver, so just check in you browser ( webserver use the /pub/www directory ). There are few basic scripts for test and also for logging (3458A,K2001,3441xA, 34401A and for enviromet BME_log.py).
All these scripts  log are plotted on website.
 

Offline TheSteve

  • Supporter
  • ****
  • Posts: 3748
  • Country: ca
  • Living the Dream
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #194 on: December 31, 2016, 07:00:50 pm »
Kernel 4.x still works with the 82357x but only if you're using an original raspberry pi.
With kernel "Linux gpib 4.4.0-1-rpi #1 Debian 4.4.6-1+rpi14 (2016-05-05) armv6l GNU/Linux" and an original model B pi I've never lost communication with my 3458A using an original 82357B.
I set this up using TiN's howto on xdevs. The image that does graphing and has a web server would be a lot more fun though.
VE7FM
 

Offline CalMachine

  • Frequent Contributor
  • **
  • Posts: 477
  • Country: us
  • Metrology Nut
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #195 on: December 31, 2016, 10:41:49 pm »
I'm trying to run the 3458A Log script in python.  There were a few nonsensical syntax errors that I needed to fix, but after that, it's just stating

ImportError:  No module named 'Gpib'.

I've checked my lsub and it shows my NI usb-gpib.
All your volts are belong to me
 

Offline VintageNut

  • Frequent Contributor
  • **
  • Posts: 534
  • Country: 00
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #196 on: December 31, 2016, 11:32:50 pm »
I'm trying to run the 3458A Log script in python.  There were a few nonsensical syntax errors that I needed to fix, but after that, it's just stating

ImportError:  No module named 'Gpib'.

I've checked my lsub and it shows my NI usb-gpib.

You can type in python commands from the command prompt one at a time when you are trying something for the first time. That allows you to see which statement is throwing the error.

Does your Gpib module have a .py extension?
working instruments :Keithley 260,261,2750,7708, 2000 (calibrated), 2015, 236, 237, 238, 147, 220,  Rigol DG1032  PAR Model 128 Lock-In amplifier, Fluke 332A, Gen Res 4107 KVD, 4107D KVD, Fluke 731B X2 (calibrated), Fluke 5450A (calibrated)
 

Offline plesaTopic starter

  • Frequent Contributor
  • **
  • Posts: 965
  • Country: se
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #197 on: December 31, 2016, 11:36:28 pm »
I'm trying to run the 3458A Log script in python.  There were a few nonsensical syntax errors that I needed to fix, but after that, it's just stating

ImportError:  No module named 'Gpib'.

I've checked my lsub and it shows my NI usb-gpib.
Run sudo gpib_config and after that execute scripts.
 

Offline CalMachine

  • Frequent Contributor
  • **
  • Posts: 477
  • Country: us
  • Metrology Nut
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #198 on: January 01, 2017, 12:06:44 am »
I'm trying to run the 3458A Log script in python.  There were a few nonsensical syntax errors that I needed to fix, but after that, it's just stating

ImportError:  No module named 'Gpib'.

I've checked my lsub and it shows my NI usb-gpib.
Run sudo gpib_config and after that execute scripts.

Was finally able to execute the scripts in the IDLE and I don't think that is what I was looking for.  Moving on.. lol.  So, I just accessed the webserver and am looking at the real time data log tests.  This data I'm looking at can't be mine right?  I haven't initiated any logs yet.


I'm trying to run the 3458A Log script in python.  There were a few nonsensical syntax errors that I needed to fix, but after that, it's just stating

ImportError:  No module named 'Gpib'.

I've checked my lsub and it shows my NI usb-gpib.

You can type in python commands from the command prompt one at a time when you are trying something for the first time. That allows you to see which statement is throwing the error.

Does your Gpib module have a .py extension?

I am not sure.  I was just trying to run the provided script in the Python IDLE.




*Edit   Alright sorry for the hassle.  I Think I've figured it out and kind of wrapped my head around how to go about interfacing RPi remotely.  I've been able to connect with putty and control it with my laptop and started logging!  Atleast I think I did.  Can't do much in the command prompt after I executed the script... but my 3458A went into remote mode.
« Last Edit: January 01, 2017, 12:34:00 am by CalMachine »
All your volts are belong to me
 

Offline TheSteve

  • Supporter
  • ****
  • Posts: 3748
  • Country: ca
  • Living the Dream
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #199 on: January 01, 2017, 01:06:37 am »
*Edit   Alright sorry for the hassle.  I Think I've figured it out and kind of wrapped my head around how to go about interfacing RPi remotely.  I've been able to connect with putty and control it with my laptop and started logging!  Atleast I think I did.  Can't do much in the command prompt after I executed the script... but my 3458A went into remote mode.

When you run something from a shell(command prompt) it will typically "hold on to" the window. You can add an & after the command to have it run in the background. Right now if you loose your ssh/telnet connection to the pi the program/logging will also stop, if you add the & it will keep going.
VE7FM
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf