Author Topic: Need advice on what software to use to control T&M equipment in the home lab  (Read 1755 times)

0 Members and 1 Guest are viewing this topic.

Offline SwakeTopic starter

  • Frequent Contributor
  • **
  • Posts: 562
  • Country: be
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... 



When it fits stop using the hammer
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2903
  • Country: 00
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 using python-ivi and been writing pretty much all of my own drivers. Python-ivi will use python-vxi11, python-usbtmc, PyVISA and a number of other libraries to actually talk to the hardware. To then use it looks something like this:
Code: [Select]
dmm = ivi.keithley.keithley2000("TCPIP::gpib1::gpib,17::INSTR",
    id_query=True)
dmm.measurement_function = 'four_wire_resistance'
dmm.range = 10e3

with 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.

Offline Berni

  • Super Contributor
  • ***
  • Posts: 4982
  • Country: si
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.
 

Offline little.tesla

  • Contributor
  • Posts: 40
  • Country: ch
I use the HP/Agilent E5810A to interface my devices over ethernet to GPIB. As a "control" software I use https://github.com/pymeasure/pymeasure which 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.
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6334
  • Country: ro
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.

Offline HKJ

  • Super Contributor
  • ***
  • Posts: 2928
  • Country: dk
    • Tests
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).
 

Offline SwakeTopic starter

  • Frequent Contributor
  • **
  • Posts: 562
  • Country: be
Those HP/Agilent GPIB to Ethernet interfaces come at a steep cost, not very hobby friendly even second hand  :o
That 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.
When it fits stop using the hammer
 

Offline HKJ

  • Super Contributor
  • ***
  • Posts: 2928
  • Country: dk
    • Tests
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.

TestController 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.html
http://lygte-info.dk/project/TestControllerPopupParamSweeper%20UK.html


For 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.
« Last Edit: February 06, 2023, 08:31:09 pm by HKJ »
 

Offline mendip_discovery

  • Frequent Contributor
  • **
  • Posts: 869
  • Country: gb
Worth having a look at
https://github.com/PhilippCo/meas_rpi

There 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.
Motorcyclist, Nerd, and I work in a Calibration Lab :-)
--
So everyone is clear, Calibration = Taking Measurement against a known source, Verification = Checking Calibration against Specification, Adjustment = Adjusting the unit to be within specifications.
 
The following users thanked this post: orenthalcaleb

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6334
  • Country: ro
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_logger
https://github.com/RoGeorge/DP832_charger_logger

Another 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/

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 27097
  • Country: nl
    • NCT Developments
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...
IMHO 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.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2903
  • Country: 00
Those HP/Agilent GPIB to Ethernet interfaces come at a steep cost, not very hobby friendly even second hand  :o
Deals 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.

That python based stuff seems promising, although programming is not my strongest point. I understand that to automate something you have to scripts it somehow.
An 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.

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.
In 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.

Offline dobsonr741

  • Frequent Contributor
  • **
  • Posts: 677
  • Country: us
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.
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 28575
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
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...
You have omitted disclosing which PC OS you are using.
Avid Rabid Hobbyist.   Come visit us at EMEX Stand #1001 https://www.emex.co.nz/
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline Bud

  • Super Contributor
  • ***
  • Posts: 6933
  • Country: ca
Facebook-free life and Rigol-free shack.
 

Offline orenthalcaleb

  • Newbie
  • Posts: 5
  • Country: us
    • LabJack Measurement & Automation
The company I work for LabJack.com has 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/
« Last Edit: February 23, 2023, 03:57:02 pm by orenthalcaleb »
 

Offline orenthalcaleb

  • Newbie
  • Posts: 5
  • Country: us
    • LabJack Measurement & Automation
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...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf