Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How are GPIB interface numbers assigned

I have two NI GPIB-USB HS adapters. I want to set up VISA aliases. I may want to disconnect and reconnect the USB plugs from time to time. How do I make sure adapter A is always GPIB0 and adapter B is always GPIB1?

0 Kudos
Message 1 of 13
(6,747 Views)

Hi joshxdr,

 

I am not aware of any way to do this automatically, but there are a couple of ways to do this programatically.

 

The best way I can think to do this is by programatically importing a MAX configuration through LabVIEW.  Here is some documentation and example on how to do that:

 

http://digital.ni.com/public.nsf/allkb/BBB5B94C038267DF8625723E00030559?OpenDocument

 

Nick

Applications Engineer
National Instruments
0 Kudos
Message 2 of 13
(6,724 Views)

Also, here is another example of how to determine and assign device names.  This might be able to help even with your GPIB adapters.

 

https://decibel.ni.com/content/docs/DOC-6551

 

Nick

Applications Engineer
National Instruments
0 Kudos
Message 3 of 13
(6,721 Views)

Hi Nick, thanks for your reply. The problem is that when I plug in two USB-GPIB adapters, one adapter becomes interface GPIB0 and one becomes GPIB1. I need to be able to control what GPIB index gets assigned to what adapter. I have been playing around with MAX, and there does not seem to be a way to swap these indices. Otherwise, every time I reboot or disconnect/reconnect the USB plugs, I have a 50% chance of messing up my VISA aliases. For example, instrument A is at GPIB0::1 and instrument B is at GPIB1::2. If the GPIB interface for instrument A boots up as GPIB1, then my VISA aliases will all be wrong.

0 Kudos
Message 4 of 13
(6,719 Views)

Do you realize a single GPIB adapter can be connected to several instruments at one time? The instruments just have to have unique addresses.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 5 of 13
(6,714 Views)

I am aware that a single GPIB controller can control multiple instruments. Each GPIB controller in my system is connected to 10 or more instruments depending on the configuration. I would be concerned about signal degredation if I tried to connect everything to a single GPIB controller. I use my example of instrument A and instrument B to simplify the discussion.

0 Kudos
Message 6 of 13
(6,705 Views)

@joshxdr wrote:

I am aware that a single GPIB controller can control multiple instruments. Each GPIB controller in my system is connected to 10 or more instruments depending on the configuration. I would be concerned about signal degredation if I tried to connect everything to a single GPIB controller. I use my example of instrument A and instrument B to simplify the discussion.


Plus you can only have 14 instruments connected to a single GPIB bus.  Dude, if I was in your shoes, I would see if I could change over to LAN.  So much easier and cheaper.

 

What computer equipment are you using?  If this is an actual computer inside of a test rack, I would try to use PCI(e)/PXI(e) GPIB interfaces instead.  They are more reliable than the USB, mostly for reasons like you are running into.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 13
(6,701 Views)

@crossrulz, I don't understand what you mean by reliability. I assume that the USB to GPIB adapter is electrically equivalent to a PCI-GPIB adapter. If it isn't, then I think NI has some explaining to do. The only issue is that I need to figure out how the GPIB interface index is assigned, so that I can make sure that the correct index is assigned to the correct adapter.

 

My desk computer is a laptop. I can write some code, carry my laptop to the lab, plug in the USB connectors, and run my test set the same way that it is run by the dedicated PC in the rack. This would be impossible with PCI-GPIB.

 

I am updating the controller and software of an old test set which uses all old GPIB equipment.

0 Kudos
Message 8 of 13
(6,698 Views)

@joshxdr wrote:

@crossrulz, I don't understand what you mean by reliability.


I don't trust the USB connector to stay in place, especially if the rack is being wheeled around.  The GPIB connector isn't going anywhere.  That's all I meant by reliability.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 13
(6,691 Views)
The best you can do is mark the connectors and put them in the same order each time in the same place in your laptop. Further more you can check in your app on one of the devices if it replies. If not you could address the other way. You need a way to distinguish between ok 1 and not ok 2 state
greetings from the Netherlands
0 Kudos
Message 10 of 13
(6,680 Views)