GPIB to <modern thingy> adapter - Page 1
Forum section: electronics / testgear

author: dom0
author_rank: Super Contributor
timestamp: February 22, 2015, 06:55:28 pm
content: I want to automate some repetitive measurements and thus want a GPIB adapter I can connect to my lab computer or notebook. Available interfaces are printer port, RS-232 and USB... but I'd like to avoid the first two, so USB<->GPIB it is I think.I've seen that the "official" (Agisight, NI etc.) adapters cost a small fortune, so yeah... bit out of my reach. I also need usable Linux drivers (I probably use the Python instrumentation libraries to talk to my devices in the end) .. so yeah, what's the "standard recommendation" for this?

author: Fsck
author_rank: Super Contributor
timestamp: February 22, 2015, 06:58:13 pm
content: prebuilt:http://galvant.ca/shop/gpibusb/

author: rx8pilot
author_rank: Super Contributor
timestamp: February 22, 2015, 06:59:42 pm
content: I got the Galvant open source adapter. Have not hooked it up yet, fingers crossed. If Python is your thing, it seems like a good choice.

author: NF6X
author_rank: Unknown
timestamp: February 22, 2015, 07:16:26 pm
content: I use a Prologix GPIB to Ethernet adapter with my Mac. They also make a GPIB to USB adapter.

author: LaurentR
author_rank: Frequent Contributor
timestamp: February 23, 2015, 07:55:23 am
content: Quote from: dom0 on February 22, 2015, 06:55:28 pmDid you check EBay? There are plenty of the Agilent (82357B) and NI (GPIB-USB-HS) USB>GPIB adapters. Usually around $100-150 for the Agilent and a bit more for the NI. Still not 100% cheap, but way more affordable than the ridiculous new prices and with very good Visa stack support.

author: alex.forencich
author_rank: Frequent Contributor
timestamp: February 23, 2015, 08:05:47 am
content: Quite a few of the cheap devices out there are very slow as they use a USB to RS232 chip internally, and this is a very narrow bottleneck as USB and GPIB are both MUCH faster than RS232 serial. The Gavant cable and the Prologix cables are both GPIB to RS232 to USB. You will notice this if you want to save a lot of traces and/or screenshots. The Prologix GPIB to Ethernet cable does not speak a standard instrument control protocol on the ethernet side, which means it won't work with any standard instrument control libraries. Same with the GPIB to RS232 to USB cables.I would recommend either an Agilent or a Beiming GPIB to USB cable, or an Agilent, HP, or ICS GPIB to Ethernet box. GPIB to Ethernet means no screwing around with device drivers and you can have one box for your whole bench and access it via wifi. However, the boxes are a bit more expensive. The old HP E2050A GPIB to LAN box can be had for pretty cheap when they pop up on ebay, possibly cheaper than the GPIB to USB cables.

author: dom0
author_rank: Super Contributor
timestamp: February 23, 2015, 12:38:15 pm
content: Thanks to everyone for the recommendations. These GPIB<->Ethernet boxes sound really interesting, I'll keep an eye out for one

author: aroby
author_rank: Regular Contributor
timestamp: February 23, 2015, 01:47:37 pm
content: I connected one of these up but haven't got around to trying it.I've read that it works quite well.http://egirland.blogspot.com/2014/03/arduino-uno-as-usb-to-gpib-controller.html

author: macboy
author_rank: Super Contributor
timestamp: February 23, 2015, 02:01:08 pm
content: Quote from: dom0 on February 22, 2015, 06:55:28 pmI bought a new-in-box Agilent 82357B USB-GPIBfrom this seller. The box was factory sealed,trulynew-in-box. I used "make an offer" to get a slightly better price. This is not much more than a prologix or a 82357B knock-off, and I would recommend this route. Unlike the prologix or the knock-offs, the Agilent uses the 'proper' 75160/75161 GPIB bus driver chips, has proper driver and software support, and it is made by the inventor of GPIB, so it should be closer to spec and result in fewer problems. A USB adapter is recommended over PCI, or *gasp* ISA, as it can easily be used with any computer built in the past 10 years or the next 10 years.I have no affiliation with the linked seller except as a satisfied customer.

author: NF6X
author_rank: Unknown
timestamp: February 23, 2015, 05:04:00 pm
content: Quote from: alex.forencich on February 23, 2015, 08:05:47 amIf I wanted an Ethernet to GPIB controller with better compatibility with existing libraries than my Prologix interface, would those be good options? How about the NI interfaces such as the GPIB-ENET/100? I'm on a Mac, and I will prefer to control my test equipment from Python scripts. Also, I won't want to buy expensive software from NI.

author: alex.forencich
author_rank: Frequent Contributor
timestamp: February 23, 2015, 06:32:17 pm
content: Those boxes are known to speak VXI-11, which is the standard LAN instrument control protocol. Good instruments with LAN ports will speak VXI-11. Anything marked LXI should speak VXI-11. There are several pure Python implementations of VXI-11 (e.g. see signature). However, I do not believe the NI boxes speak VXI-11.Also, good USB instruments will speak USBTMC. Shitty instruments will show up as serial ports or speak proprietary protocols. Shitty instruments with LAN ports will probably use raw sockets and a proprietary protocol. Some instruments that speak VXI-11 will also open raw TCP ports and accept SCPI commands, but I have heard stories about implementations on some instruments being rather unstable.

author: rx8pilot
author_rank: Super Contributor
timestamp: February 23, 2015, 06:55:38 pm
content: For the USB (Agisight 82357B), are you able to daisy chain instruments?The LAN gateway with VXI-11 support seems like the route with the least fuss albeit a little more money up front. Most of the newest instruments support LXI, so it seems there would be no additional configurating when mixing old/new gear.

author: alex.forencich
author_rank: Frequent Contributor
timestamp: February 23, 2015, 07:08:17 pm
content: Actually, the Tektronix AD007 could also work. The communications protocol does not seem to be listed in the features section of the manual, but there are some references to VXI-11 in the manual so it seems like it should work. There are a couple of these on ebay right now for relatively cheap.Edit: confirmed that they do speak VXI-11, according to this page:http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Is-it-possible-to-use-NI-VISA-2-5-with-Tektronix-AD007-ENET-GPIB/td-p/39749

author: dom0
author_rank: Super Contributor
timestamp: February 23, 2015, 07:44:11 pm
content: Quote from: rx8pilot on February 23, 2015, 06:55:38 pmI'd absolutely expect that fromanyGPIB adapter, especially if theres Hpagisight stamped on the case

author: rx8pilot
author_rank: Super Contributor
timestamp: February 23, 2015, 07:56:49 pm
content: Quote from: dom0 on February 23, 2015, 07:44:11 pmI am still learning how these things work, but so far it seams the GPIB to Serial via USB can only address one device per COM port. Not sure if this is true, or just my interpretation of what I have read so far. If I am understanding, the Agisight 82357B and similar have drivers that make it appear as a GPIB port not a serial port connected to a GPIB adapter.This would have been perfectly normal when I was working as a programmer in the late 80's. It did not take long to get accustomed to fully automatic peripherals/drivers/and software that we enjoy today. Working with GPIB is like jumping into a time machine.

author: alex.forencich
author_rank: Frequent Contributor
timestamp: February 23, 2015, 08:02:30 pm
content: You can address multiple devices, but you have to use something similar to AT commands to select which device you want to talk to.

author: rx8pilot
author_rank: Super Contributor
timestamp: February 23, 2015, 08:10:42 pm
content: VXI-11 sounds far more manageable than AT commands that I would likely have to sort out myself.Is it safe to say that if I have everything connected into a VXI-11 ethernet box, I should be able to use most all of the popular applications out there?

author: alex.forencich
author_rank: Frequent Contributor
timestamp: February 23, 2015, 08:12:53 pm
content: Well, anything that was written to use NI-VISA, Agilent VISA, or direct VXI-11 should work.

author: macboy
author_rank: Super Contributor
timestamp: February 23, 2015, 09:35:34 pm
content: Quote from: alex.forencich on February 23, 2015, 08:02:30 pmI will assume you are talking about the prologix, or at least something other than the 82357B. The 82357B is a full GPIB adapter and can control many instruments, subject to the limitations of the GPIB bus itself (total cable length, etc.).

author: alex.forencich
author_rank: Frequent Contributor
timestamp: February 23, 2015, 09:51:07 pm
content: Quote from: macboy on February 23, 2015, 09:35:34 pmYeah, I was referring to the prologix/galvant cable GPIB to RS232 to USB style cables.

author: NF6X
author_rank: Unknown
timestamp: February 23, 2015, 09:58:44 pm
content: Using a Prologix ethernet to GPIB adapter to get the ID string from the instrument at GPIB address 3 might look something like this:telnet 192.168.1.123 1234(in telnet:)++addr 3ID?;++read(ID string prints in the telnet window)I think that the USB to GPIB ones use the same sorts of commands, but you connect to them as a virtual COM port instead.You can talk to multiple devices on the GPIB bus with the Prologix interfaces. As mentioned previously, they have their own proprietary (but documented) command set, which may be a fatal flaw if you need an interface that's compatible with particular software.

author: alex.forencich
author_rank: Frequent Contributor
timestamp: February 23, 2015, 10:05:24 pm
content: Well, a bunch of the cables are actually GPIB to serial with an FTDI (or similar) USB to serial chip in them (Prologix, galvant). The prologix Ethernet cable is the same as the USB one, except communication takes place over a TCP socket instead of via seria. The 'true' GPIB to USB cables will use out-of-band control sequences. There are several different cables out there, none with open interfaces as far as I know. The NI GPIB-USB-HS and the Agilent 82357B are probably the most common. VXI-11 is the standard Ethernet control protocol, and it also uses out-of-band control. It's actually implemented with the Sun RPC standard for remote procedure calls over TCP connections. The prologix cable would be far more interesting if they didn't try to roll their own protocols.

author: NF6X
author_rank: Unknown
timestamp: February 23, 2015, 10:10:40 pm
content: I agree that the Prologix cable would be much nicer if it didn't use in-band control (as long as it could still support open-source software). I'm torn between writing my own Python code to talk to my instruments over my Prologix interface vs. spending more money on a better interface.

author: dom0
author_rank: Super Contributor
timestamp: February 23, 2015, 10:12:22 pm
content: How complicated is VXI-11 by the way(*)? There are sun RPC implementations available pretty much everywhere, XDR, too, of course, and single-board computers with plenty of GPIOs and Ethernet are commonplace, too.Hardware-wise not much missing to connect them to GPIB (although I read somewhere that there are a few signals on GPIB that are timing critical and thus wouldn't lend well to software/userspace implementation)...(*) on a scale from "A few hundred to a thousand LoC" to "it has 489 RPC entry points and 1321 custom types and handles all sorts of shared and intermittent state"

author: alex.forencich
author_rank: Frequent Contributor
timestamp: February 23, 2015, 10:14:27 pm
content: If you're a big use of python for instrument control, it would be great if you could help out with the new Python instrument control project that we're trying to spin up over athttps://github.com/LabPy/labpy-discussion/issues. The idea is to use pyvisa as a back end. It might be worth looking in to adding support for Prologix style cables to pyvisa/pyvisa-py somehow. I'm not sure what the best setup would be for doing that as the cables just look like serial ports.

author: alex.forencich
author_rank: Frequent Contributor
timestamp: February 23, 2015, 10:16:36 pm
content: Quote from: dom0 on February 23, 2015, 10:12:22 pmAs a client or a server? The API is really simple, the guts are just connection management (open/close) and data transfer (read/write). Take a look at python-vxi11 for a pure Python client implementation. I have put some time into getting a server running as well, but this code is not yet included in python-vxi11 as it is still in development.

author: dom0
author_rank: Super Contributor
timestamp: February 23, 2015, 10:20:39 pm
content: Speaking server side, but the server is probably very application dependent, I guess (depending on whether one wants to build an instrument, or a GPIB bridge with something like a Raspberry Pi and some line drivers).Okay, halfway skimmed trough the main spec, I guess one can omit the interrupts and locking for a first implementation, should cut the effort down.

author: alex.forencich
author_rank: Frequent Contributor
timestamp: February 23, 2015, 10:22:52 pm
content: Quote from: dom0 on February 23, 2015, 10:20:39 pmI was actually considering something like a TI Luminary Micro with line drivers, a CPLD, and lwIP. Haven't had any time to work on it though.