Need advice on what software to use to control T&M equipment in the home lab - Page 1
Forum section: electronics / testgear

author: Swake
author_rank: Frequent Contributor
timestamp: February 06, 2023, 10:25:11 am
content: I've always used all my equipment in stand-alone mode, and now is the time to evolve and let it talk together so that more advanced or even automated things can be achieved with it.This probably sounds similar for many of us enthusiasts that have collected power supplies, electronic loads, function generators, scopes, multimeters all equipped with GPIB/LAN-LXI/RS-232/ etc.Connecting these to a computer is not that difficult ones you discover AR488 and the like. Connecting over the LAN is a bit more challenging, but there are some initiatives such as YAUGI that, I hope, will land soon. OK, that is the hardware layer.What software are you using to make all this talk together? There are a million things out there, and that's the issue: I'm lost now, waaay too many possibilities, cant identify the good choices...

author: alm
author_rank: Super Contributor
timestamp: February 06, 2023, 10:50:28 am
content: In terms of hardware, almost all of my equipment is old enough that GPIB is the only interface, and I connect to it using GPIB-to-Ethernet interfaces like HP/Agilent E5810A and E2050A, which support VXI-11. I think this is by far the simplest solution from software support point of view. No USB drivers necessary. I found USB-GPIB interfaces a pain to use in terms of stability and updating drivers with OS upgrades. But this was with a NI GPIB-USB-B interface, I can't speak about the Arduino solution.Most instruments I control were not supported by any pre-existing solutions when I started, and do not support SCPI (a sort of standard protocol supported by many more modern test instruments). And I sometimes need extra logic in the instrument driver to easily control it. For example maybe an instrument needs to go through an adjustment procedure before a particular measurement. Then I want to be able to implement that logic in the instrument driver. So I have been usingpython-iviand been writing pretty muchall of my own drivers. Python-ivi will usepython-vxi11,python-usbtmc,PyVISAand a number of other libraries to actually talk to the hardware. To then use it looks something like this:Code:dmm = ivi.keithley.keithley2000("TCPIP::gpib1::gpib,17::INSTR",id_query=True)dmm.measurement_function = 'four_wire_resistance'dmm.range = 10e3with open('output.csv', 'a', newline='') as csv_file:csvw = csv.DictWriter(csv_file, fieldnames=['datetime', 'value'])while True:row = {}row['datetime'] = datetime.datetime.utcnow().isoformat()row['value'] = dmm.measurement.fetch(1)csvw.writerow(row)The advantage is that this is based on an industry standard, however imperfect, which means different instrument drivers for the same type of instrument, like multiple DMMs or multiple scopes, will behave pretty similar, so if you have a program that uses a function generator and a scope to do a measurement, you could swap out a different brand, higher bandwidth function generator and scope without much of any changes to the program. For the metrology-type work I do this is quite helpful. Changing the Keithley 2000 I used in the above script to an Agilent 34401A DMM would just require changing the first line.A problem with python-ivi is that it's not being maintained, so instrument drivers are spread out over different Github repositories (including mine). The best suggestion I have is trying to find a fork that has the drivers you need.

author: Berni
author_rank: Super Contributor
timestamp: February 06, 2023, 11:43:43 am
content: Yeah the problem is that there are many solutions out there but none of them is really good.So far i end up just writing my own quick and dirty little single purpose programs that run the measurement setup by directly firing off SCPI strings into the VISA API. It is not the best setup as it takes a fair bit of time to create what i need, but at least it is infinitely flexible to do anything.At least a nice thing about VISA is that it doesn't care how the instrument is connected. Be it USB, RS232, Ethernet, GPIB..etc it all just shows up as a VISA instrument that can be talked to. That way my program doesn't have to worry about it.

author: little.tesla
author_rank: Regular Contributor
timestamp: February 06, 2023, 12:37:33 pm
content: I use the HP/Agilent E5810A to interface my devices over ethernet to GPIB. As a "control" software I usehttps://github.com/pymeasure/pymeasurewhich is easy and fast to write simple GUIs, where you see a live plot of your measured data or you can change settings of a device for the next run. I added as well some drivers for my more older and exotic devices, which is not too difficult. I shall create a pull request at one point.

author: RoGeorge
author_rank: Super Contributor
timestamp: February 06, 2023, 01:13:37 pm
content: For what instruments exactly?Big brands usually have their own graphical tools/environments/libs.Most instruments are talking SCPI over various physical layer (LAN, Serial, GPIB, etc), others can talk MODBUS (rare, e.g. the optical link for Metrix MTX3283 DMM).I am usually writing my own scripts using Python and PyVISA (or alike SCPI libraries). Most nowadays instruments are LXI ready (LXI == SCPI over LAN), so just plug the LAN cable and write a python script.Since each instruments has its own set of SCPI commands, there is nothing that works across all brands and all instruments. There is an attempt to make all instruments interchangeable, this is called IVI (Interchangable Virtual Instruments). IVI is yet another software layer on top of already existing SCPI and VISA, so it will make all instruments appear the same, by category (for example all lab power supplies have will respond to the same commands, all generators, etc.https://www.ivifoundation.org/specifications/)Again, you need to be specific what brand of instrument you have, what models, and what exactly do you want to automate. There is no silver bullet.

author: HKJ
author_rank: Super Contributor
timestamp: February 06, 2023, 02:17:52 pm
content: TestController can handle multiple brands and multiple devices simultaneous using LAN and/or serial, it works on Windows, Mac and Linux. It support about 500 devices and more can be added by users.Thread:https://www.eevblog.com/forum/testgear/program-that-can-log-from-many-multimeters/Download:https://lygte-info.dk/project/TestControllerIntro%20UK.html(Bottom of page).

author: Swake
author_rank: Frequent Contributor
timestamp: February 06, 2023, 08:09:04 pm
content: Those HP/Agilent GPIB to Ethernet interfaces come at a steep cost, not very hobby friendly even second handThat python based stuff seems promising, although programming is not my strongest point. I understand that to automate something you have to scripts it somehow.Got an heterogeneous set of gear with HP; Fluke, Philips, Toellner, Rigol and some other stuff. Communication wise it has a little bit of everything GPIB; ETH-LXI; RS-232; USB; Analog.My 'needs' are that of an experimenter playing with low frequency stuff. One day I'd like to characterize some opamps for example and will build a test-setup for this and the other day I perform consumption measurement on low power devices.TestController looks like a very good starting point. Hope it can somehow be scripted with conditions/actions based on some measurement/input. If this then that style.

author: HKJ
author_rank: Super Contributor
timestamp: February 06, 2023, 08:28:36 pm
content: Quote from: Swake on February 06, 2023, 08:09:04 pmTestController support scripting, where both TC itself and connected devices can be controlled.It also has some build in test functions:https://lygte-info.dk/project/TestControllerPopupLogEvent%20UK.htmlhttp://lygte-info.dk/project/TestControllerPopupParamSweeper%20UK.htmlFor GPIB look at AR488, it is cheap (Arduino+GPIB connector) and works with TestController.For lan it supports both socket and LXI connections.Virtual USB serial ports is the same as regular serial ports, but USB HID is only support on WIndows for Brymen.It is also easy to make your own devices, there are some Arduino examples on the website.

author: mendip_discovery
author_rank: Super Contributor
timestamp: February 06, 2023, 08:34:10 pm
content: Worth having a look athttps://github.com/PhilippCo/meas_rpiThere is a thread around here about it. I have yet to get it working with a meter but I just need a roundtoit.From what I have learnt it's best to log using Python then take that data and try to break it down using Jypiter labs. I was working on this but then a 3d printer turned up. Easily distracted, naa oooh look shiny.

author: RoGeorge
author_rank: Super Contributor
timestamp: February 06, 2023, 08:35:57 pm
content: Only Rigol here, and connected by LAN. If of any use, I have some logger scripts for the DS1054 oscilloscope and for the DP832 power supply:https://github.com/RoGeorge/DS1054Z_data_loggerhttps://github.com/RoGeorge/DP832_charger_loggerAnother one for the DP832 supply, to draw I-V plots (for a MOSFET):https://www.eevblog.com/forum/testgear/rigol-dp832-power-supply-as-automated-curve-tracer/

author: nctnico
author_rank: Super Contributor
timestamp: February 06, 2023, 08:44:18 pm
content: Quote from: Swake on February 06, 2023, 10:25:11 amIMHO you should start with what kind of task you want to perform. Is it just data collection or plotting? During the past couple of years I have been using Python + Pyvisa (with the integrated Visa driver) to control various instruments. Typically for collecting screendumps. Don't be alarmed with having to learn another programming language. I've been writing software for decades but my Python skills are extremely basic. Yet through the use of Google I manage to get reasonable results. I'm using Matplotlib to put graphs together as well.

author: alm
author_rank: Super Contributor
timestamp: February 06, 2023, 08:58:52 pm
content: Quote from: Swake on February 06, 2023, 08:09:04 pmDeals can still be had if you're patient. A E5810A sold for $100 not too long ago. But prices have gone up unfortunately, like almost all test equipment on the used market.Quote from: Swake on February 06, 2023, 08:09:04 pmAn important factor in your decision of platform will probably what exactly you want to do with it. If you want to measure a parameter over time, or want to do a ramp, then a solution like TestController will probably work well. Especially if your main goal is producing a graph. If it involves more, like characterizing something over multiple voltage and current ranges, generating multiple output files, and doing more complicated analysis on the results, you'll probably be happier with a real programming language like Python.Quote from: Swake on February 06, 2023, 08:09:04 pmIn general hardware interfaces aren't a very big deal, although obviously anything with analog inputs / outputs will need some sort of ADC or DAC in between to translate it to something a computer understands, unless you want to use the sound card.

author: dobsonr741
author_rank: Frequent Contributor
timestamp: February 06, 2023, 09:03:39 pm
content: I recommend VISA, even for Macs. Gives you a solid foundation and device support. I use either USB or RS232. Writing my automation code in Python, in Jupyter notebooks. The glue to VISA is pyvisa, and I use the ivi backend. A nice starter library is testgear (https://github.com/PhilippCo/testgear/) from the author of meas_rpi already quoted.Very productive environment. Datasets and visualization is a piece of cake with pandas and plotlib. Less tha 50 lines of code will give you a live updating histogram, for example.

author: tautech
author_rank: Super Contributor
timestamp: February 06, 2023, 09:09:55 pm
content: Quote from: Swake on February 06, 2023, 10:25:11 amYou have omitted disclosing which PC OS you are using.

author: Bud
author_rank: Super Contributor
timestamp: February 06, 2023, 10:10:50 pm
content: Can be done in MS Excel, an example here:https://www.eevblog.com/forum/metrology/data-logger-for-legacy-hp-instruments/msg1138738/#msg1138738

author: orenthalcaleb
author_rank: Newbie
timestamp: February 23, 2023, 03:54:43 pm
content: The company I work forLabJack.comhas a page of 3rd party Test, Measurement and Automation software companies that have been good for our customers. We have a wide variety of companies here from the major ones most people know like LabVIEW and MATLAB but also the tiny teams of few developers who are working hard to offer a great product at a fair price like DAQFactory, JEDI One and MatDeck.https://labjack.com/pages/support/?doc=/software-driver/3rd-party-applications/

author: orenthalcaleb
author_rank: Newbie
timestamp: February 23, 2023, 03:59:10 pm
content: Let us know if you are still in the market for a GPIO data acquisition typle board. LabJack.com has a few U3-LVs earmarked for demo that I could send your way...