Author Topic: Easiest way to log DMM data over GPIB  (Read 4121 times)

0 Members and 1 Guest are viewing this topic.

Offline rx8pilotTopic starter

  • Super Contributor
  • ***
  • Posts: 3644
  • Country: us
  • If you want more money, be more valuable.
Easiest way to log DMM data over GPIB
« on: March 03, 2017, 08:04:33 pm »
I have taken the time to get all my instrument connected to my network but have yet to make any practical use of the possibilities. The first automation task I really need is fairly straightforward voltage logging for a battery discharge tests. Ideally, I would be able to control the DC load, log current, temp, and whatever else - but for now just the voltage from the DMM is a great step forward.

I have LabView, but have not learned how to use it in any effective way. I also have been able to connect and confirm the instruments - scope, Keithley 2700 DMM, Agilent PSU's, and Chroma 8 channel electronic load. The part that I am trying to do quickly is simple polling of the DMM about 1hz and logging the data into an excel sheet (or CSV, whatever)

There was nothing obvious in my searches, but maybe I am searching for the wrong thing. Is this something that can be done directly in Excel? Is there a cheap and cheerful utility that can do a simple GPIB read command at 1hz (or so)? It would be a bonus if it can terminate the test by sending a command to the DC Load at a specified voltage so the battery is not damaged - but I can live without that.

LabView seems awesome but only if I take a lot of time to dig in and figure it out.
Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 7238
  • Country: hr
Re: Easiest way to log DMM data over GPIB
« Reply #1 on: March 03, 2017, 08:08:37 pm »
 

Offline rx8pilotTopic starter

  • Super Contributor
  • ***
  • Posts: 3644
  • Country: us
  • If you want more money, be more valuable.
Re: Easiest way to log DMM data over GPIB
« Reply #2 on: March 03, 2017, 08:22:15 pm »
I saw that in a search, but it was not clear what it does. I followed your link and downloaded it and saw that there is a PDF manual.

It could totally do what I am looking for after a brief lesson in PASCAL. Last time I used that language was the late 80's in a computer class, never expected to see it again. My guess is that the learning curve will be much quicker than LabView for simple things like this. Thanks.
Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline Fgrir

  • Regular Contributor
  • *
  • Posts: 164
  • Country: us
Re: Easiest way to log DMM data over GPIB
« Reply #3 on: March 03, 2017, 08:35:10 pm »
It's been 15+ years since I've used it, but I don't remember LabView being particularly hard to learn, in fact more the opposite.  It can get a little mind-bending to do more advanced programming stuff, but for something simple like you've described I'd wager you'll be up and running within an hour or two if you put your mind to it.  If you've already shelled out the cash for it you might as well be able to use it...
 
The following users thanked this post: rx8pilot

Offline rx8pilotTopic starter

  • Super Contributor
  • ***
  • Posts: 3644
  • Country: us
  • If you want more money, be more valuable.
Re: Easiest way to log DMM data over GPIB
« Reply #4 on: March 03, 2017, 11:10:37 pm »
It's been 15+ years since I've used it, but I don't remember LabView being particularly hard to learn, in fact more the opposite.  It can get a little mind-bending to do more advanced programming stuff, but for something simple like you've described I'd wager you'll be up and running within an hour or two if you put your mind to it.  If you've already shelled out the cash for it you might as well be able to use it...

You may be right. So far, it has been a daunting experience. That could of course just be the sting of the initial setup. I spent about a day installing and getting everything to communicate. My test project was to essentially remote control a power supply. It took quite a long time to make it work and when it did, it was slow and appeared to be blasting the same commands over and over. I have yet to take the time to figure out since then, but obviously really want it to work. At the moment, I am hoping for the solution to be a few hours away, and my gut feeling is that LabView maybe measured in days. I wish I had the time/money to take a LabView class.
Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline djnz

  • Regular Contributor
  • *
  • Posts: 179
  • Country: 00
Re: Easiest way to log DMM data over GPIB
« Reply #5 on: March 04, 2017, 12:52:33 pm »
A python script should do the trick, no?
 

Offline rx8pilotTopic starter

  • Super Contributor
  • ***
  • Posts: 3644
  • Country: us
  • If you want more money, be more valuable.
Re: Easiest way to log DMM data over GPIB
« Reply #6 on: March 04, 2017, 09:16:59 pm »
I have seen some people do it. My Python skills are limited to taking a class a year ago, but have not really coded much beyond class practice. I am solid in C/C++ and Python looked incredibly easy compared to that.  Isn't there a library for GPIB that will keep my code pretty simple?

Sent from my horrible mobile....

Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline rx8pilotTopic starter

  • Super Contributor
  • ***
  • Posts: 3644
  • Country: us
  • If you want more money, be more valuable.
Re: Easiest way to log DMM data over GPIB
« Reply #7 on: March 05, 2017, 01:38:09 am »
A python script should do the trick, no?

This looks totally promising......Python will get the job done, minimum learning curve, maximum chance of being useful in the future.

https://youtu.be/a0VKY9klUjQ
Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline djnz

  • Regular Contributor
  • *
  • Posts: 179
  • Country: 00
Re: Easiest way to log DMM data over GPIB
« Reply #8 on: March 05, 2017, 06:54:44 am »
Also see pyVISA and pyVISA-py (slightly confusing naming scheme, but those two are different things)

https://pyvisa.readthedocs.io/en/stable/#
https://github.com/hgrecco/pyvisa-py
https://python-in-the-lab.blogspot.com/2014/10/communicating-with-instruments-using.html

If you want to try out things interactively, I'd recommend iPython (without any other fancy gui like jupyter). iPython adds convenience features like tab-completion which are quite handy.

Python + numpy + matplotlib is a very useful combination I think.
« Last Edit: March 05, 2017, 07:04:53 am by djnz »
 

Offline TiN

  • Super Contributor
  • ***
  • Posts: 4543
  • Country: ua
    • xDevs.com
Re: Easiest way to log DMM data over GPIB
« Reply #9 on: March 05, 2017, 08:39:10 am »
You don't need pyVISA or any VISA stuff to talk with GPIB instruments. I used LV before too for logging, but it needs computer, have horrible clunky interface, like to give cryptic errors and overall not the easiest thing if all you need to send and receive couple bytes.

Ended up having Raspberry Pi or DE1-SoC boards with running linux + linux-gpib + python to talk with my instruments and run experiments (which sometimes take weeks of nonstop logging). I cooked few guides with examples before:
DE1-SoC + linux-gpib (Linaro linux)
RPI + NI GPIB-USB-HS + linux-gpib
RPI + Agilent 83257B (and fakes) + linux-gpib

linux-gpib has bindings and libs for either Python or C, so you can even use C if you like  :)
YouTube | Metrology IRC Chat room | Let's share T&M documentation? Upload! No upload limits for firmwares, photos, files.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf