Author Topic: 34401a interface to PC - RS232 or GPIB?  (Read 26291 times)

0 Members and 1 Guest are viewing this topic.

Offline motocoderTopic starter

  • Supporter
  • ****
  • Posts: 769
  • Country: us
  • Electrical Engineer
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #25 on: June 20, 2014, 12:54:47 pm »
If you go for GPIB, you may better pick a National Instruments PCI bus card.
As surplus they may be available for less than 100€/$, plus cable(s).
That's much better, and you later can extend your system with other instruments.   

I considered this, but the problem is my PC is maybe 10 feet or more from the meter. I think the GPIB cable is going to be rather big and bulky, and didn't think it would be practical due to the length. OTOH, I have a USB hub just a couple of feet from the instrument.

I've been considering building a small Linux box that I could locate underneath the table where all my test equipment is. However, the wife has her new equipment alert system fully engaged since the purchase of the 34401A, so any new PC will have to wait.
 

Offline Zucca

  • Supporter
  • ****
  • Posts: 4308
  • Country: it
  • EE meid in Itali
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #26 on: June 23, 2014, 04:51:11 am »
Newbie here.

Tonight I did my first experience on connecting a 34401a with GPIB.
I´m using the Beiming F82357, so far no problem and good customer support.

Here the theory GPIB vs RS232 I read to give me an idea [? means I don´t fully understand why]:

GPIB

1) GPIB has 1MB/sec of shared bandwidht between the devices connected
2) The maximum GPIB speed is equal to the lowest speed device in the chain (?)
3) Up to 15 devices (?, depends on protocol implementation I believe) with 1 GPIB Adapter at the same time
4) Expensive (cables and adapter) but reliable

RS232

1) Dedicated bandwidth PC<->Device but much slower speed
2) Cheapest way to connect with PC
3) max 1 device each serial port at the same time

Now I want to connect in the same GPIB bus my Keithley 220 (made in 1985) and the 34401a, I will let you know if the performance will degrade (see point 2 in the GPIB feature above).

Please correct me or add comments if necessary, I want to know the truth.

Thanks in advance,

Z
Can't know what you don't love. St. Augustine
Can't love what you don't know. Zucca
 

Offline motocoderTopic starter

  • Supporter
  • ****
  • Posts: 769
  • Country: us
  • Electrical Engineer
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #27 on: June 23, 2014, 01:01:27 pm »
Now I want to connect in the same GPIB bus my Keithley 220 (made in 1985) and the 34401a, I will let you know if the performance will degrade (see point 2 in the GPIB feature above).

I am interested to hear your results.

One thing I discovered reading the 34401a manual is that the maximum bps rate it supports is 9600, which is really quite pitiful. So it seems they are not even really taking advantage of the maximum realistic speed you can get over RS-232. My point is that the theoretical bandwidth of the interface is important, but may not be the limiting factor for the particular device you are using.
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1988
  • Country: dk
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #28 on: June 23, 2014, 04:27:15 pm »
One thing I discovered reading the 34401a manual is that the maximum bps rate it supports is 9600, which is really quite pitiful. So it seems they are not even really taking advantage of the maximum realistic speed you can get over RS-232. My point is that the theoretical bandwidth of the interface is important, but may not be the limiting factor for the particular device you are using.

Well at 100, 10 or even 1 NPLC , 9600 seems to be fine

What would you be measuring ?

/Bingo
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1988
  • Country: dk
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #29 on: June 23, 2014, 04:34:27 pm »
Now I want to connect in the same GPIB bus my Keithley 220 (made in 1985) and the 34401a, I will let you know if the performance will degrade (see point 2 in the GPIB feature above).

None of the above would be able to overrun the Beiming , well overrun would/ought to be impossible due to the 3-way handshake on the GPIB Bus , your 2. Means the one doing the slowest 3-way handshake.

So your 2. would only be active if you query both instruments at the same time.

I'd expect no significant delay (even though i don't know the 220 specs)

What are you guyzz measuring since you worry about the GPIB Bandwidth (or rs232) ?

1000+ samples/sec or ?

I'd say your use (programmig) of the GPIB Bus is prob going to be the biggest delay factor here.
Not the xferrate of the bus.

/Bingo
 

Offline Zucca

  • Supporter
  • ****
  • Posts: 4308
  • Country: it
  • EE meid in Itali
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #30 on: June 23, 2014, 04:55:08 pm »
Thanks bingo600 for the clarifications.

According to your information I assume the GPIB is an event triggered bus and the traffic there is generally very low, so it is very unlikely to hit the maximum bandwidth limit, at least with the 34401a.

Now let´s discuss what I read about GPIB.

I heard that it is possible to send over the GPIB screenshot of Spectrum Analyzer [SA] measures, in this case while the image is being transfer the GPIB is 100% busy (no other communication possible).

Now imagine I was polling cyclic every 10NPLC a Voltage measurement with my 34401a on the same GPIB Bus, at the time the SA image will be sent I think I will lose some measures.
Same story with a very slow (I imagine, still have to test) 1985 device like the Keithley 220. I trigger the 220 and I hope it will give me back what I need before I need to get the data from the 34401a.

Can you confirm me the GPIB is a "one talker only" bus? If yes, then the bus performance is affected by:

1) Number of talker devices
2) How fast they can talk
3) How much they have to talk

Again, I have just started with GPIB and I say thanks to everyone in advance who is explaining me how it works.
« Last Edit: June 23, 2014, 05:03:25 pm by zucca »
Can't know what you don't love. St. Augustine
Can't love what you don't know. Zucca
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1352
  • Country: si
  • I like to measure things.
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #31 on: June 23, 2014, 05:11:47 pm »
Can you confirm me the GPIB is a "one talker only" bus? If yes, then the bus performance is affected by:

1) Number of talker devices
2) How fast they can talk

Again, I have just started with GPIB and I say thanks to everyone in advance who is explaining me how it works.
Yes, only one device can talk in one particular moment.
Not only is the transfer rate limited by how fast a device can talk, but also how fast it can listen.

Here is the timing diagram of the GPIB data and handshake lines:

Lines NRFD and NDAC are pulled low by all listeners. Only when they all release NRFD line and it goes high (pull-up resistor), is the talker allowed to put data on the bus and only when they all release NDAC, does the talker know they all received the data. If you have a slow listener, the whole system has to wait for it.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline AlfBaz

  • Super Contributor
  • ***
  • Posts: 2184
  • Country: au
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #32 on: June 23, 2014, 05:30:39 pm »
Here's some empirical data.
HP3457A at 0.005 NPLC hooked up to a function gen putting out a square wave 0 to 4V at 1Hz.
I then get set ScopeExplorer to auto-refresh (get a screen grab) from my lecroy 574 every 1 second.
The graph shows narrowing (spikes) of the pulses. Not shown in the pic is some complete misses of the high pulse.

This is with an agilent usb adaptor

 

Offline AlfBaz

  • Super Contributor
  • ***
  • Posts: 2184
  • Country: au
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #33 on: June 23, 2014, 05:31:59 pm »
The above pic is zoomed in... it does go down to 0V
 

Offline Zucca

  • Supporter
  • ****
  • Posts: 4308
  • Country: it
  • EE meid in Itali
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #34 on: June 23, 2014, 06:15:16 pm »
Thanks AlfBaz and Dave!

Your answers went beyond my expectations. Now I have a clear picture on how the GPIB works. Very interesting discussion  :-+.
Can't know what you don't love. St. Augustine
Can't love what you don't know. Zucca
 

Online macboy

  • Super Contributor
  • ***
  • Posts: 2254
  • Country: ca
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #35 on: June 23, 2014, 07:07:56 pm »
Can you confirm me the GPIB is a "one talker only" bus? If yes, then the bus performance is affected by:

1) Number of talker devices
2) How fast they can talk

Again, I have just started with GPIB and I say thanks to everyone in advance who is explaining me how it works.
Yes, only one device can talk in one particular moment.
Not only is the transfer rate limited by how fast a device can talk, but also how fast it can listen.

Here is the timing diagram of the GPIB data and handshake lines:

Lines NRFD and NDAC are pulled low by all listeners. Only when they all release NRFD line and it goes high (pull-up resistor), is the talker allowed to put data on the bus and only when they all release NDAC, does the talker know they all received the data. If you have a slow listener, the whole system has to wait for it.
...But only if the slow listener is listening. Most of the time, there is a single listener, so throughput is essentially based on the speed of that listening alone (but also affected by cable capacitance).
 

Offline davorin

  • Supporter
  • ****
  • Posts: 922
  • Country: ch
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #36 on: July 16, 2014, 09:53:45 am »
Bought now one of those F82357 GPIB-USB adapters on ebay today...

Seems to based on a Cypress USB microcontroller....similar to the ISP programming cable from Lattice...

Let's see how well it can be reverse engineered (o;

 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #37 on: July 16, 2014, 02:28:05 pm »
similar to this?
http://sigrok.org/wiki/GPIB-USB_82357B_clone
Export the flash then?
 

Offline davorin

  • Supporter
  • ****
  • Posts: 922
  • Country: ch
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #38 on: July 16, 2014, 05:12:51 pm »
Hmm....pretty much...the Lattice Semiconductor ISP cable uses the same 68013 USB SoC...
Think I have of those controllers some spare at home ;-)

Line drivers I just ordered recently...

 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #39 on: July 16, 2014, 09:30:14 pm »
I have a couple of these http://www.ebay.com/itm/280870904109
If they can be used it would have been interresting to try it.. (for my keithley 2015)
 

Offline davorin

  • Supporter
  • ****
  • Posts: 922
  • Country: ch
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #40 on: July 16, 2014, 09:36:30 pm »
Got a couple of those as well ;-)

Tried once a Chinese Arduino Nano clone as a GPIB USB adapter...but switched to the PIC 18F2550 Preloxig clone design...much better..
But still...when I switch on more than 3 devices..communication stops due to missing line drivers...and every week more instruments are coming (o;

 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #41 on: July 16, 2014, 10:02:02 pm »
have been thinking about this https://www.tindie.com/products/galvant_industries/gpibusb-adatper-rev4/
not sure what would be best, the ebay types or this
I'm not going to get more gpib stuff I guess
 

Offline davorin

  • Supporter
  • ****
  • Posts: 922
  • Country: ch
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #42 on: July 16, 2014, 10:08:49 pm »
Looks similar to the Prologix clone called Prelogix...just with line drivers...

Biggest problem I have is that either Farnell nor Mouser have an available Centronics 24 pin connector for PCB mount....

I can't tell anything yet about the Agilent clones..but what I like about the Prologix clone is the fact that I can just start a serial terminal and type in what I want to do...
like setting and neasuring voltage on my 6632B with "++addr 5, volt 5, meas:curr?" (o;

I intend to use my GPIB adapter in combination with MRTG or other RRD tools to log power consumption over time..and display a nice graph...
 

Offline alex.forencich

  • Frequent Contributor
  • **
  • Posts: 397
  • Country: us
    • Alex Forencich
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #43 on: July 17, 2014, 01:30:20 am »
If you want a convenient solution for a whole stack of equipment, I would go with a GPIB to LAN adapter.  The old HP E2050A boxes can be had for quite cheap on ebay for around $100 and they bridge the GPIB bus to a VXI-11 interface.  Then you can just connect it to your home network and you're good to go.  The LAN port on those is only 10 Mbit, but that generally doesn't cause much of a problem.  They also have the correct line drivers for a proper GPIB interface. 
Python-based instrument control: Python IVI, Python VXI-11, Python USBTMC
 

Offline motocoderTopic starter

  • Supporter
  • ****
  • Posts: 769
  • Country: us
  • Electrical Engineer
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #44 on: July 17, 2014, 05:24:43 am »
One thing I discovered reading the 34401a manual is that the maximum bps rate it supports is 9600, which is really quite pitiful. So it seems they are not even really taking advantage of the maximum realistic speed you can get over RS-232. My point is that the theoretical bandwidth of the interface is important, but may not be the limiting factor for the particular device you are using.

Well at 100, 10 or even 1 NPLC , 9600 seems to be fine

What would you be measuring ?

/Bingo

Nothing - making the same point you are, namely that the communications channel isn't necessarily the limiting factor.
 

Offline scasagrande

  • Contributor
  • Posts: 45
  • Country: ca
    • My Blog
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #45 on: July 26, 2014, 05:36:51 pm »
have been thinking about this https://www.tindie.com/products/galvant_industries/gpibusb-adatper-rev4/
not sure what would be best, the ebay types or this
I'm not going to get more gpib stuff I guess

Hey that's mine! I didn't see this thread earlier so sorry for the late response.

If you want VISA support my adapter doesn't do that. It was designed from the beginning to avoid VISA because I didn't want to put up with it.

Someone mentioned the GPIB line driver chips and how you would need an external power supply. You know that the official NI and Agilent USB to GPIB adapters also are only powered over USB? You mostly need to be able to sink current.

I also work closely with anyone that has issues with my adapter be it simple issues trying to figure out an instrument's communication protocol or debugging firmware bugs. The next firmware version (v6) is currently in beta with a number of speedups, requested features, and software compatibility improvements.

Oh, and its all open source! I'm trying to make open source my full time job so buying my adapter goes to support this project and others including software projects such as InstrumentKit.

Here's some links:

www.galvant.ca
www.youtube.com/user/stevencasagrande
www.github.com/Galvant/gpibusb-firmware
www.github.com/Galvant/InstrumentKit
 

Offline doktor pyta

  • Frequent Contributor
  • **
  • Posts: 488
  • Country: pl

Offline dramoto

  • Contributor
  • Posts: 19
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #47 on: October 10, 2014, 10:23:37 pm »
 

Online macboy

  • Super Contributor
  • ***
  • Posts: 2254
  • Country: ca
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #48 on: October 13, 2014, 12:20:55 pm »
The cheaper option that I found...

http://egirland.blogspot.com.es/2014/03/arduino-uno-as-usb-to-gpib-controller.html
This may work or may not depending on your instruments. The main issue is the input levels of the Arduino's ATmega328. The nominal specified "high" voltage is 0.7 Vcc (or greater), which is 3.5 V at 5 V Vcc. GPIB bus uses thevenin termination which creates a floating (high) voltage of slightly less than that (around 3.3V). So the logic level specifications of the Arduino are not met, and reliable operation is not guaranteed or expected.

A better option is to use a microcontroller with inputs that are (or are configurable to be) TTL level inputs. There is also this open-source H/W & S/W option, which uses TTL logic chips to interface to the bus.
 

Offline dramoto

  • Contributor
  • Posts: 19
Re: 34401a interface to PC - RS232 or GPIB?
« Reply #49 on: November 07, 2014, 10:07:45 pm »
This may work or may not depending on your instruments. The main issue is the input levels of the Arduino's ATmega328. The nominal specified "high" voltage is 0.7 Vcc (or greater), which is 3.5 V at 5 V Vcc. GPIB bus uses thevenin termination which creates a floating (high) voltage of slightly less than that (around 3.3V). So the logic level specifications of the Arduino are not met, and reliable operation is not guaranteed or expected.

Thanks for the info.

You know it well.
My Arduino Gpib works with the fluke 45 but not yet with the keithley 2000
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf