Easiest way to log DMM data over GPIB - Page 1
Forum section: electronics / testgear

author: rx8pilot
author_rank: Super Contributor
timestamp: March 03, 2017, 08:04:33 pm
content: 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.

author: 2N3055
author_rank: Super Contributor
timestamp: March 03, 2017, 08:08:37 pm
content: Did you take a look at EZGPIB ?http://www.ulrich-bangert.de/html/downloads.html

author: rx8pilot
author_rank: Super Contributor
timestamp: March 03, 2017, 08:22:15 pm
content: 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.

author: Fgrir
author_rank: Regular Contributor
timestamp: March 03, 2017, 08:35:10 pm
content: 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...

author: rx8pilot
author_rank: Super Contributor
timestamp: March 03, 2017, 11:10:37 pm
content: Quote from: Fgrir on March 03, 2017, 08:35:10 pmYou 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.

author: djnz
author_rank: Regular Contributor
timestamp: March 04, 2017, 12:52:33 pm
content: A python script should do the trick, no?

author: rx8pilot
author_rank: Super Contributor
timestamp: March 04, 2017, 09:16:59 pm
content: 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....

author: rx8pilot
author_rank: Super Contributor
timestamp: March 05, 2017, 01:38:09 am
content: Quote from: djnz on March 04, 2017, 12:52:33 pmThis looks totally promising......Python will get the job done, minimum learning curve, maximum chance of being useful in the future.https://youtu.be/a0VKY9klUjQ

author: djnz
author_rank: Regular Contributor
timestamp: March 05, 2017, 06:54:44 am
content: 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-pyhttps://python-in-the-lab.blogspot.com/2014/10/communicating-with-instruments-using.htmlIf 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.

author: TiN
author_rank: Super Contributor
timestamp: March 05, 2017, 08:39:10 am
content: 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-gpibRPI + Agilent 83257B (and fakes) + linux-gpiblinux-gpib has bindings and libs for either Python or C, so you can even use C if you like