Computer comms w/ Instrument (USB, GPIB, IEE488, RS232...) - simple guide? - Page 1
Forum section: electronics / testgear

author: Rax
author_rank: Super Contributor
timestamp: October 10, 2023, 01:24:47 am
content: Hi all,Is there a known, simple, accessible writeup somewhere that would introduce one (particularly of the kind that's a bit short in time and patience...) to ways in which one can connect their computer with their bench instruments?I've never been able to scratch the surface too much, but I do have:An USBGPIB kit of parts (unbuilt), but also a couple of built onesan RS232 to USB cable (which I have no idea if correct!)I have a bunch of HP, Fluke, Tektronix and many other branded instruments.Some other potentially useful thoughts/asks:I highly prefer USB as interfaceWhat software offers a good balance between complexity/features, simplicity of installing and making work, and maybe cheap or zero licensing cost?What are some of the things to know? For instance, IEEE488 comes with some address settings... How's that visible from the computer/program side?What types of instruments I'd like to connect? Mostly metrology stuff (DMMs from 6.5 to 8.5 digits, calibrators of all sorts - mostly Fluke, but not only), but other things such as maybe a scope or three - HP, Tek, Rigol, etc., generators of all sorts (HP, R&S, etc.) etc etcI'm sure I probably asked all the wrong questions...Thanks a bunch!

author: jjoonathan
author_rank: Frequent Contributor
timestamp: October 10, 2023, 01:51:14 am
content: I personally think USB is best for applications with built-in drivers but falls off hard if you have to manage the drivers yourself. Test equipment drivers are particularly bad. It always seems to turn into a fight. Ethernet is never as smooth as plugging in a USB HID keyboard but you never have to fight drivers even if you want to code in python on linux from a laptop connected through wifi alone.My stack: AD007 GPIB<->Ethernet Bridge, python-vxi11, jupyterlab.EDIT: AD007 is no longer cheap. The key ingredient here is vxi11 compatibility, which is spoken by the python library. Depending on what you can find, this can tip the equation. Whatever you choose, best of luck

author: Rax
author_rank: Super Contributor
timestamp: October 10, 2023, 02:05:38 am
content: Quote from: jjoonathan on October 10, 2023, 01:51:14 amOver network is the best of all worlds - I'd be mind blown to harvest data from my living room laptop when I don't feel like sitting in the garage, where my bench is - but in my case I can't really imagine it being practical, unless I:Have some way to connect all instruments to wifi. Nope, right?I connect all instruments to my bench desktop, which is online itself via wifi. Connecting them to the desktop would still have to be USB, so...But maybe there's a simpler solution I am not aware of.

author: jjoonathan
author_rank: Frequent Contributor
timestamp: October 10, 2023, 02:10:38 am
content: You don't need a computer at your bench, just some GPIB cables to wire them to the AD007 (or similar) and an ethernet cable to put the AD007 on your network.

author: coromonadalix
author_rank: Super Contributor
timestamp: October 10, 2023, 02:12:50 am
content: there is no simple guide, even if many brands do use rs232, gpid, lan interfaces, gpid interfaces, fakes or genuine ones, ar488 project here on eevblog, prologix adapters, arduino based ones, raspi ...you have IVI drivers, visa drivers, USB tmc, LXI compatible .... and you have some of their softwares, and excel macro enabled sheets, vb, c++, c#, Python etc ...Nothing is perfect between many brands, mostly old stuff vs more recent onesThere is a few software pieces here on eevblog forums who can be useful and slightly standardize some equipment, work in progress ...there is no definitive answers to help you, you'll have to dig and read ... and do testsPython is lately getting more traction, compatible with many os'es ...Even purely using usb interface, you may have to deal with incompatibilities, quirks etc ... you may not be able to read at fast rates ... sluggish responses etc ...

author: Rax
author_rank: Super Contributor
timestamp: October 10, 2023, 02:15:38 am
content: Quote from: coromonadalix on October 10, 2023, 02:12:50 amCongrats on your 5000th post!

author: Rax
author_rank: Super Contributor
timestamp: October 10, 2023, 02:21:18 am
content: Giving a shot to this now:https://www.eevblog.com/forum/metrology/3458a-logging-via-windows-app-revisited/

author: alligatorblues
author_rank: Regular Contributor
timestamp: October 10, 2023, 02:55:50 am
content: I've spent considerable time and effort connecting instruments to computers. There is no 'universal' way to do it. The easiest is GPIB using a GPIB PCIe adapter on the motherboard. IVI is a compendium that develops VISA. VISA is a universal access method which will work with any computer architecture and any instrument with a VISA driver.It is up to the manufacturer to create a VISA library accoding to the standards set by IVI. Any VISA library will work. However, different manufacturers have different ways of packaging VISA. Keysight puts it in the I/O libraries package, which you need for general communication. Benchvue contains a subset of the I/O libraries.Once VISA is configured, you can communicate in C#, Java, C++, visual basic, python, Matlab, Labview; and whichever other language drivers are disteibuted with the particular VISA implementation. National Instruments has a VISA package for virtually any instrument that has GPIB or 9-pin serial connectivity.But some of them work only with NI GPIB cards or GPIB<>USB adapters. The various VISA packages come with many instrument, operating system and programming language drivers. So, a program written for VISA should work across similar instrumentation.

author: rcjoy
author_rank: Regular Contributor
timestamp: October 10, 2023, 04:06:35 am
content: VXI-11 and your own C, C++, or Python program is the guaranteed most reliable way to talk to instruments.If your instrument says "LXI" on the front panel, it will support VXI-11 natively. Just plug the instrument into your network switch, and you can access it from any Windows/Mac/Linux PC on your network. Even your laptop.If you have GPIB instruments, a GPIB/LAN gateway such as the Agilent E5810A, Keysight E5810B, ICS 9065, and others (likely the Tektronix AD007) connects your instrument to the network. The GPIB/LAN gateway speaks VXI-11.Absolutely no drivers are needed on your PC since it is just standard network communications via RPC.To make it easier to use in your program, you can use a VXi-11 library that wraps the RPC calls with more friendly function calls.For Python, use python-vxi11 athttps://github.com/python-ivi/python-vxi11For C on Windows, you can try libvxi11 athttps://github.com/f4exb/libvxi11For C++ on MacOS, you can try libvxi11 athttps://github.com/Lew-Engineering/libvxi11At home I have a E5810A and several GPIB instruments. I can talk to all of them from my laptop via WiFi anywhere in the house.

author: Rax
author_rank: Super Contributor
timestamp: October 10, 2023, 05:28:23 am
content: Interestingly, I guess I registered the first success (thanks to bdunham7!...). I was able to connect to my 34401A by using a Fluke RS232 to USB cable and Test Controller!Quite smooth and reliable too! (this one minute I've used it)

author: Njk
author_rank: Frequent Contributor
timestamp: October 10, 2023, 07:25:51 am
content: Quote from: rcjoy on October 10, 2023, 04:06:35 amBTW, for a USB connection, it's possible to get and install the standard USB TMC class driver (ausbtmc.sys) that allows to talk with the instrument directly from the app. No libs at all. A simple example:https://bitbucket.org/hexamer/usbtmc-scpi-exe/src/main/