GPIB-Getting Started - Page 1
Forum section: electronics / beginners

author: gilbenl
author_rank: Regular Contributor
timestamp: June 02, 2015, 12:58:41 am
content: Preface: Assume I know nothing about GPIB, programming or otherwise.I have a few pieces of equipment with GPIB that I'd like to either get data from or have perform automated functions. My first goal is simply to perform automated readings from my DMMs. My next goal is to use the 501J to perform automated calibration checks on the DMMs and document results. Ultimately, I'd like to build an arduino controlled switching array that would also be the GPIB controller to allow cal over the bus of the DMMs and intermittent checking of the 501J against high stability 1V, 10V standards.For now, I would like to work towards the first two, but I mention the third in hopes of minimizing expenses.Equipment: HP 3478A, Datron 1062A, EDC 501JSo getting into it:Interface-Agilent 82357Bhttp://www.ebay.com/itm/82357B-GPIB-USB-Interface-Compatible-with-AGILENT-82357B-new-version-/251692772284?pt=LH_DefaultDomain_0&hash=item3a9a0eebbcIs this the most economical/versatile route?Anyone ever use this:http://www.ebay.com/itm/UGSimple-USB-to-GPIB-Controller-/171631337518?pt=LH_DefaultDomain_0&hash=item27f606602eWill it work with the Datron and EDC equipment?Is NI LabView the compatible with equipment of this vintage?

author: MatthewEveritt
author_rank: Unknown
timestamp: June 02, 2015, 09:41:21 am
content: I've not used either of those adapters so I can't say how well they'll work. I will say that finding drivers for usb gpib adapters can be a bit dicey. Don't assume it's standard and will work with whatever software you use. (I see no mention of labview support on the second one, for example).Quote from: gilbenl on June 02, 2015, 12:58:41 amInteresting question. If you're new to all this it might be worth looking at the 3rd partylabview driverspage.These are not hardware drivers. Unlike the usb-gpib adapter drivers you don't need labview drivers, they're basically more libraries of commands to make like easier. Whither or not you find a 'driver' for your test gear you can make it work.Gpib is (almost) a simple serial interface, so if you can find the programming manual for your devices you can use a standard gpib interface to send the required commands to the device. In most cases this is as simple as sending a string.This is possible in a whole pile of other languages, labview is common but it's far from the only thing that works (despite what the sales reps try to make you think.)When you say assume no knowledge do you mean of gpib, or programing in general? Do you have experience of any programming languages?

author: macboy
author_rank: Super Contributor
timestamp: June 02, 2015, 12:57:07 pm
content: There was a post recently about the new LabVIEW Home version for $50, which is a bargain (normally a $1k-$10k software). I'd recommend going that route software wise.As for the hardware, avoid the UGSimple as well as Prologix adapters. They do not have a VISA sofware interface nor a GPIB32.dll, which would be needed to work properly with software like LabVIEW or any other "real" GPIB compatible software. I would also avoid them as they do not have the proper electrical interface (line drivers). They might work fine in their own way with one or two instruments, but they may not work with a heavily loaded bus having several instruments and many metres of cable.The Agilent-compatible one is a compromise; it uses Agilent's drivers so it has full VISA support, which is good. But it again does not have the proper line drivers on the bus (just a microcontroller driving it directly). The actual Agilent 82357B does it right, as you would expect from the inventors of the GPIB bus, and it doesn't cost that much more. I bought onefrom this ebay sellerfor a little more than their current listing, and you can find others for even less. Note the make offer option, try it and you might get a bargain (I did). Mine was in a factory sealed box, brand new. Spend the little bit more for the 'real thing', you won't regret it.

author: bingo600
author_rank: Super Contributor
timestamp: June 02, 2015, 03:45:10 pm
content: I have experience with the real Agilent USB GPIB adapter :http://www.ebay.com/itm/291247520553And the $99 Beiming Agilent clone :http://www.ebay.com/itm/181617591635Both works excellent on Windows & Linux (linux-gpib), and both have the NI GPIB chip & real gpib-driverchips.I actually prefer the Beiming for linux, as it doesn't need to have the software loaded via USB on start.The firmware resides in a i2c prom on the adapter.I haven't heard about other Agilent clones besides the Beiming that works with linux-gpib.As mentioned above , then NI-Visa will work with the Beiming (but only on windows), as Agilent does not officially support linux. And they don't have a NI-Visa compatible driver for linux.I do most of my GPIB interfacing using python on linux, and i haven't had any need for NI-Visa yet./Bingo

author: dom0
author_rank: Super Contributor
timestamp: June 02, 2015, 08:54:46 pm
content: Quote from: MatthewEveritt on June 02, 2015, 09:41:21 amGPIB is remarkable for being straightforward and very complicated to get right (on many levels at once)at the same time.

author: rfeecs
author_rank: Frequent Contributor
timestamp: June 02, 2015, 09:21:03 pm
content: Quote from: dom0 on June 02, 2015, 08:54:46 pmGPIB is parallel, not serial.If you want compatibility, National Instruments is probably best:http://www.ebay.com/itm/171805923906Insanely expensive, though. $599 new from NI!By now GPIB is pretty much obsolete. Cables aren't cheap either.

author: MattSR
author_rank: Regular Contributor
timestamp: June 02, 2015, 10:27:48 pm
content: Is there any standard way to access a GPIB interface from a software perspective? Any APIs or libraries out there?The cheap adaptors above seemed to use custom driver software, but I would want to make sure that my software would work with whatever hardware people have out there!

author: MatthewEveritt
author_rank: Unknown
timestamp: June 02, 2015, 11:01:40 pm
content: Quote from: dom0 on June 02, 2015, 08:54:46 pmSimple to use, as long as you've deep enough pockets.Quote from: rfeecs on June 02, 2015, 09:21:03 pmYou know, I knew that. No idea why I was thinking serial. Probably because I always choose RS232 or USB over GPIB if I can. I can afford the cables, for starters. Thanks for the correction.

author: rfeecs
author_rank: Frequent Contributor
timestamp: June 02, 2015, 11:11:32 pm
content: Quote from: MattSR on June 02, 2015, 10:27:48 pmVISA:http://en.wikipedia.org/wiki/Virtual_Instrument_Software_ArchitectureNational Instruments has NI-VISA and NI-488.2:http://www.ni.com/pdf/products/us/4gpib659-663.pdfIt looks like they are selling this. But you can download for free from their drivers section.Keysight has the same and they are basically compatible.

author: houkensjtu
author_rank: Contributor
timestamp: June 03, 2015, 12:15:45 am
content: Quote from: MattSR on June 02, 2015, 10:27:48 pm(Point out my mistake if there is any)The GPIB communication standard is maintained by several companies, however, unlike LabVIEW, the API's which support the communication ITSELF is usually free(free as free beer, but not truly freedom).http://www.ni.com/download/ni-visa-5.4.1/4626/en/However recently, I found on latest NI webpage that they began selling visa licenses which means VISA(at least the new version) will no longer be free anymore, if this is true, I should give NI a big.Also a big thumb down for those companies because I think they are manually making those libraries and API's messy and even you spend quite bit of time on them, you get nuts.Anyway if you finished installing VISA, I recommend this python library call pyvisa, which give you a powerful and elegant way to avoid using those evil proprietary softwares(LabVIEW, etc..), in a way more nerdy fashion!http://pyvisa.readthedocs.org/en/master/Happy hacking!

author: rx8pilot
author_rank: Super Contributor
timestamp: June 03, 2015, 02:18:34 am
content: I am only slightly ahead of you as far as GPIB is concerned. With a goal of capturing data and some modest automation, I set out to get my GPIB gear connected. I first tried the Galvant USB adaptor. It connected but would not work with a lot of commercial software (at least it wasn't obvious and I did not want to mess around). I eventually got an Tek AD007 ethernet VXI bridge. This made it easy to get 2 power supplies, a scope, and DMM connected to any PC on the network. I like it better than USB for sure.Next, I looked at how to gather the data for analysis and control the instruments for automated tests. I found the Python options fairly quick, but did not want the learning curve or the time needed to code and tweak all the time. I am going with NI LabView primarily because the learning curve seems short and this is for professional work where time is money. I am definitely not one of those that MUST work with open source everything. I am also working with NI to put together an entire PXI system so I may as well learn the system now. If there was some sort of GUI based alternative, I would consider it, but have not seen anything yet.At the moment, I only have a few crusty old utilities to capture data off the scope and that is as far as I have been able to get.

author: Melt-O-Tronic
author_rank: Frequent Contributor
timestamp: June 03, 2015, 03:41:25 am
content: Quote from: macboy on June 02, 2015, 12:57:07 pmmacboy, can you expand on that? I was about to order a Prologix ethernet adapter tonight and am hesitant now. I'd rather do GPIB over ethernet than over USB because I have two computers that I want to use the instruments with -- otherwise I'd save some money getting an Agilent USB interface on eBay. I'm planning to use it with LabVIEW Home and maybe some C# later on. Prologix' FAQ page seems to indicate that it will work, but leaves some ambiguity:Fromhttp://prologix.biz/gpib-ethernet-1.2-faq.html:QuoteFor what it's worth, the instruments I have that need networking are an HP 3478A DMM, an Agilent 66309D DC source, a Racal-Dana 1992 universal counter and an HP 8648B sig gen. My DSO & SA already ethernet & USB (Rigol, both).

author: gilbenl
author_rank: Regular Contributor
timestamp: June 03, 2015, 04:42:38 am
content: I seem to have opened pandoras box. I was half expecting to get lashed for posting a GPIB "how do I..." thread. However, I think this reaffirms my deduction that there are few definitives these days about GPIB, at least in practice. Old standard=limited info.As far as coding ability goes, again, assume nil. I've done quite a bit of SQL (which I know is useless here), some arduino and some python (if anyone is an X-plane fan out there), but little else. Both the Datron DMMs and EDC standard have extensive example code and I'm pretty good with the old "figure it out". Famous last words.Unless I'm blind, I don't see any compelling reasons not to go with the agilent adapter, namely due to brand reliability, VISA and line drivers, which if I understand correctly, will be important when chaining 4 instruments. I'll be placing the order later this week and will update with some playing around once I have it. Until then, I hope the conversation will continue. Very interesting stuff! Thanks, all.

author: rx8pilot
author_rank: Super Contributor
timestamp: June 03, 2015, 06:02:55 am
content: Going with an option that has guaranteed compatibility is a good idea. This is especially true if you are not a programmer. You will have your hands full getting the what you want out if this even if everything is perfect.Have you looked at LabVIEW Home yet? Seems like a good idea and a very fast way to the finish line.

author: dom0
author_rank: Super Contributor
timestamp: June 03, 2015, 06:56:27 am
content: Quote from: gilbenl on June 03, 2015, 04:42:38 amNot so much, it's just that all software wants the proper APIs, which the cheap adapters don't have, so at the end of the day everyone either uses VXI (again, proper API) or the not-exactly-cheap adapters. This is what I meant above: GPIB is somewhat simple on the physical layer, but that is only a part of a GPIB system, and naturally the software is crucial to the system, too.

author: macboy
author_rank: Super Contributor
timestamp: June 03, 2015, 03:22:53 pm
content: Quote from: Melt-O-Tronic on June 03, 2015, 03:41:25 amYou can talk to a prologix adapter in LabVIEW, using either the serial or tcp interfaces available in LabVIEW, but the Prologix box will not appear as a GPIB adapter in LabVIEW. This means that you will need to explicitly send the appropriate Prologix commands to make it talk to your instrument(s). Also, all instruments will be connected through that single serial or TCP interface, rather than appearing as separate connections within LabVIEW (e.g. one device at GPIB::26 and one at GPIB::15 for two different GPIB devices on a "real" GPIB bus). So if you want to talk to multiple instruments, you need to do all the hard work yourself, sending appropriate Prologix commands to address the different instruments to send commands and get responses.

author: ElektroQuark
author_rank: Unknown
timestamp: June 03, 2015, 03:30:48 pm
content: I have installed NI drivers for my NI PCI card and the software overload is huge.Anyone knows how to simply install the PCI card drivers, VISA drivers and communicate with the instruments directly with a simple software sending text strings?It looks like I have to install all of the NI software. Most of it is useless for my needs.

author: Melt-O-Tronic
author_rank: Frequent Contributor
timestamp: June 03, 2015, 05:17:25 pm
content: Thanks,macboy! That was very helpful.

author: gilbenl
author_rank: Regular Contributor
timestamp: October 23, 2015, 02:04:43 am
content: Finally got back around to this. Will expand with details as I stumble through this.Purchased an Agilent 82357B GPIB to USB adapter for $84+free shipping from China. Took some poor sap a month to canoe it over to the southern US. I plan to run this setup on an older Laptop-Dell Vostro 1500 (Win XP, Core 2 Duo) running LabVIEW, version TBD-will discuss later. Unfortunately, the RAM is kaput so another week wait.Some things I've learned:-Although NI LabVIEW runs just great on OS X, Keysight does not support IO drivers for 64-bit macs.-Benchvue has a very limited list of supported instruments, of which I own none.http://www.keysight.com/main/editorial.jspx?cc=US&lc=eng&ckey=2418722&id=2418722&cmpid=zzfindbenchvueinstruments] http://www.keysight.com/main/editorial.jspx?cc=US&lc=eng&ckey=2418722&id=2418722&cmpid=zzfindbenchvueinstruments-Take home: If you want to control older instruments, use a PC running Windows and LabVIEW. I was able to get the 82357B installed on a bootcamp windows partition, but ran out of space during the LabVIEW install and said screw it.In the meantime, let's dig into the $85 adapterino:Rather large. Very solid. Gets very hot during use.Single screw opens it up, bolts run straight through providing rigidity. Notice the detachable micro USB. Maybe an opportunity to put in into another case...maybe with some other devices and a USB splitter...maybe...Top of board: Cypress CY7C68013A-128AXC USB Microcontroller and Agilent 1822-0639 (ON Semi 14063-501 GPIB IC)Bottom of Board: Xilinx XC9536 CPLD, and a pair of TI SN7516 series GPIB TransceiversWell, more interesting things to come....

author: baoshi
author_rank: Regular Contributor
timestamp: November 02, 2015, 10:06:04 am
content: If you are serious getting into LABVIEW, you should consider NI's USB-GPIB-HS. Agilent card can be supported but you need install both Agilent IO suit and NIMAX and use Tulip driver on it.I do not have the other equipments but I do have a 3478A. Because it does not have a IDN? command, NIMAX cannot recognize it directly. But LABVIEW driver do work, just having to set GPIB address to 23 or modify the .vi file.

author: macboy
author_rank: Super Contributor
timestamp: November 02, 2015, 06:38:25 pm
content: Quote from: gilbenl on October 23, 2015, 02:04:43 amNo, you didn't. You purchased a rather well done clone. So did many others here including myself. See this other thread:Flood of new Agilent 82357B GPIB-USB adaptors on eBay the real deal?

author: gilbenl
author_rank: Regular Contributor
timestamp: November 02, 2015, 07:07:22 pm
content: Quote from: macboy on November 02, 2015, 06:38:25 pmDespite Keysight confirming that the S/N was clean, on second glance, the PCB logo gives it away as a fake. In any case, $84? I'll take it any day of the week. Seems to work, but will see once I get it connected to the windows PC.

author: rx8pilot
author_rank: Super Contributor
timestamp: November 02, 2015, 07:28:51 pm
content: Quote from: macboy on November 02, 2015, 06:38:25 pmIt's not a clone in the nice way - like an IBM PC 'CLONE' that is legitimately licencing technology, its an illegal fake copy that screws up the industry. I cannot and will not trust anything from China. They are a copy-cat nation that brutalizes legitimate businesses all over the world in order to 'grow'. These things are sold cheap because it is STOLEN and did not have any design costs or after the sale support costs. It is made in someones garage with parts stolen out of the reject bin at some factory or straight copied.Don't support this behavior. In the long run, it discourages real companies from innovating or at minimum drives the cost up as legit business uses resources to fight off this nonsense.

author: gilbenl
author_rank: Regular Contributor
timestamp: November 02, 2015, 10:15:47 pm
content: Quote from: rx8pilot on November 02, 2015, 07:28:51 pmI 100% agree with this line of thought, though, there is a flip side here. Agilent makes fantastic products and regularly advance the industry. However, their $550 price tag on this item is not because of R&D, but because thats what the marketthey want to sell towill bare. It alienates the amateur, who this day and age, often needs professional gear. If they made the price of gear used by both amateurs and industry more reasonable, nobody would buy the copy. If a genuine unit was sold by agilent for, say, $175 , I would've bought that. Agilent chooses to price themselves out of the amateur/hobbyist/tinkerer market. So is it right? No. Am I more than happy to have it for $85 rather than $550, clone or not? You bet!Where the Chinese are really being dicks is by copying products that are already consumer-priced. Fake arduinos come to mind.Anyway, the thing works (clone or not), my windows laptop is now configured and in the coming weeks, there may be an interesting project coming to fruition. Sorry for posting a teardown of something that's been torn down in excess by now.

author: rx8pilot
author_rank: Super Contributor
timestamp: November 02, 2015, 11:19:04 pm
content: When I needed a GPIB adapter a while ago, I got a used Tektronix AD007 GPIB to Ethernet box for about $100 used of course. There are plenty of genuine used adapters out in the wild for hobby or small business use. My whole bench, which is my sole source of income, is loaded with eBay buys that were a tiny fraction of the new price....on topic. FWIW, the decision to go with a LAN adapter has worked out great. It allows me to setup and program LabView from my main workstation and then run it from the laptop that is on my bench. Any instrument can be seen from any computer on the network. Handy.

author: gilbenl
author_rank: Regular Contributor
timestamp: November 03, 2015, 03:14:24 pm
content: Quote from: rx8pilot on November 02, 2015, 11:19:04 pmThe LAN adapter makes great sense if you want to view/control instruments on multiple computers. If you have a lab in a garage and an office upstairs, it could definitely save you some trips particularly if you have an insatiable desire to always know whats going on with your experiments. They do seem to have a wide range of price points ($~200-1,300), however, I suspect the clone market is virtually non-existent.

author: macboy
author_rank: Super Contributor
timestamp: November 03, 2015, 06:45:19 pm
content: Quote from: rx8pilot on November 02, 2015, 07:28:51 pmI do not support this behavior; I thought it was a genuine Agilent. I bought mine years ago before the thread mentioned above exposed these as fakes.

author: macboy
author_rank: Super Contributor
timestamp: November 03, 2015, 07:09:27 pm
content: Quote from: gilbenl on November 02, 2015, 10:15:47 pmI suppose that a $50 Arduino isaffordableto hobbyists just like a $500 GPIB adapter isaffordableto corporations. But the clone costs 1/5 to 1/10 as much in both cases. Are Arduino not doing something similar to Agilent by charging a market-bearing price rather than a merely modestly profitable one?Don't forget that Arduino is open source hardware. That means that anyone is free to copy it and build it. Maybe thedesireof the creators is to allow people to roll-their-own, but the reality for something this popular is cheap, readily available clones.Soback on topic....I have both the Agilent clone USB adapter and an old ISA slot based NI GPIB-TNT (in a Pentium 4, the most recent computer I could find/afford with ISA). Both work well. I primarily use them with HTA scripts, that's HTML Application. It's a Windows-only thing. For the uninitiated, briefly, an HTA is an HTML file (web page) that works just like an application program. You create the GUI with HTML and the code in VBScript or Javascript (ok, JScript to be pedantic). Both Agilent and NI have ActiveX controls available that will allow use of the GPIB interface within script code, including events/interrupts. I had to mess around a lot just to get the ActiveX stuff working, but once you have that going, if you know HTML and a scripting language, you can bang out a simple GUI application like a virtual front panel in no time.Another quick way to bang out a simple (textual, not GUI) application is EZ-GPIB. This uses aPython-likePascal-like scripting language, and is rather limited really. If you just want to write a script to perform a screen capture, do a sequence of operations, or to log data for hours on end, then it works.

author: gilbenl
author_rank: Regular Contributor
timestamp: November 03, 2015, 07:49:15 pm
content: Quote from: macboy on November 03, 2015, 07:09:27 pmI'll be expanding on this in detail later, but for the purpose of this project I dug out an old Core2Duo Win Vista laptop. I do have a copy of NI LabVIEW and will look into an HTA based interface. I'd like to get back into python, something I haven't used in about 10 yrs. One of my goals is to put a 21" monitor over my bench, which will display the goings-on of my bench meters allowing me to enjoy not having giant bench meters, well, on the bench. Feeding them will be an input box and this is why I'm looking for a 7001 or similar switch. The goal is to see how quickly the "uninitiated" can get meaningful data and automation capabilities using a GPIB interface on the cheap, with little effort.

author: macboy
author_rank: Super Contributor
timestamp: November 03, 2015, 11:31:55 pm
content: Quote from: macboy on November 03, 2015, 07:09:27 pmCorrecting myself... EZGPIB uses a Pascal-like scripting language.

author: macboy
author_rank: Super Contributor
timestamp: November 03, 2015, 11:43:35 pm
content: Quote from: gilbenl on November 03, 2015, 07:49:15 pmI'm looking to do something similar. I have 6 bench meters, and while I don't mind having them in front of me, I would like a consolidated display, as well as the ability to do math that uses more than one meter. For example use two or more meters to measure current and/or voltage and calculate circuit power, gain of an amplifier, impedance of a speaker, efficiency of an amplifier (power in vs out), etc., possibly while varying another parameter like frequency or amplitude of a signal.I have several 7001's with scanner cards. I have both quad 10-channel 2-pole cards (which can be combined into dual 20 channel or one 40 channel, 2 pole), as well as 10-channel 4-pole cards. The latter have ultra-low thermal EMF relays on the sense connections for less error in 4-pole resistance measurements. I am very willing to part with some of this equipment, if you are interested shoot me a PM.