From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

I have two gpib-usb-hs devices; both of them work in MAX but only one will function in labview, help please?

Solved!
Go to solution

Hi,

 

For my application I need to communicate with two instruments using two gpib-usb-hs devices. I am using Windows XP, Labview 6.1, MAX version 5.1 and NI488.2  version 2.42. I have checked and this ni488.2 driver should be compatible with my gpib-usb-hs devices and my versions of windows and labview. I have also tried older and newer versions of NI488.2 with no success.

 

I can communicate with my instruments properly in MAX, indicating to me that the devices themselves are functional. When I try to communicate with my instruments through labview (using the gpib example in labview), only one of the gpib-usb-hs devices communicates successfully. The other device returns the error EDVR: Error connecting to driver or device.

 

I am really not sure where to go from here. The only under thing that I found strange was that the working gpib-usb-hs had has a visa alias name assigned to it while the unworking device has none. I tried giving it an alias name but this did not help.

 

Any suggestions would be greatly appreciated. 

0 Kudos
Message 1 of 14
(9,253 Views)
Why would you use two different controllers instead of one with just two different cables? Why are you using the low level GPIB functions instead of VISA? As long as you specify either device 0 or device 1, out should all work but it's probably more complicated than it needs to be.
0 Kudos
Message 2 of 14
(9,250 Views)

With regards to alias - Every instrument needs to have alias assigned properly otherwise it wont work in LabVIEW.

 

It suggests that you have some conflict in the instrument you are connecting to the PC.

 

Windows detects and installs the required driver and makes an entry in the windows registry, when ever a new instrument is connected. This entry is used by MAX to create and assign a unique alias name.

 

Remove instruments and USB GPIB converter, Try deleting all the existing alias assigment and than try connecting onc by one.

 

What instrument are you connecting to the PC using USB GPIB controller? Is it NI or Non NI instrument?

Have you checked connecting one at a time and tried to talk using LabVIEW VI? Is it working independently?

 

Let me know you observations

0 Kudos
Message 3 of 14
(9,245 Views)
Vijay,

The poster is using GPIB which uses only an address number and device number. No alias is required.

The error is associated with a controller - not an instrument connected to it.

A resource name such as GPIB0::12::INSTR is sufficient. An alias such as 'DMM' is optional.

Aliases are stored in visaconf.ini - not the Windows registry.

NI does not make any GPIB instruments so your question does not make any sense to me.
0 Kudos
Message 4 of 14
(9,242 Views)

Hi Dennis,

 

I agree with you on above reply. Only one controller is enought to communicate with upto 15 GPIB devices. Communicating with devices through Aliases is optional. 

 

NI MAX has an issue in assigning and routing the communication to the right instrument. Ex: NI MAX does not allow changing the Aliases name in case of following situation. 

 

1. Connect a new device (GPIB Controller first time) it assigns aliases name automatically,

2. Connect the same type of device (GPIB Controller) with different serial number

3. MAX does not allow to change Alias name of second one to that of first one (When i searched, i found that NI MAX uses the information form Windows Registry to create a Aliases name or Device identifiers such as "Dev1").

4. I have faced similar issue with respect to NI Ethernet to Serial Converters in the Past.

 

I really could not find correct use case under which MAX gets into this mode. 

 

I meant to check NI device not the Non NI Instruments of course non NI instrument has nothing to do with MAX except IEE 488 communication enabling. It was my mistake.

 

I would suggest to do the following

 

Go to NI MAX>>Tools>>Reset Configuration Data.

0 Kudos
Message 5 of 14
(9,233 Views)

Thanks Dennis_Knutson and Vijay_J for your quick response to my query.

 

I have tried doing NI MAX -> Tools -> Reset configuration Data but it did not seem to have any effect. 

I have also tried the other suggestion to you visa function instead of gpib read/write. The same issue persists: one of the gpib-usb-hs devices will work fine but the other will report an error.

 

Both gpib-usb-hs devices are working fine, i.e. if there is only one gpib interface listed in MAX then it will work in labview. If both gpib interfaces are listed in MAX only the one which was installed first will work in labview.

 

Dennis_Knutson, could you explain what you mean by using one cable for two instruments please? I'm a newby and perhaps over-complication things.

0 Kudos
Message 6 of 14
(9,212 Views)

What Dennis suggested is to connect both your instruments in a single USB-GPIB converter (Controller). You can keep connecting multiple GPIB instruments in a single card as shown in below URL. 

 

http://en.wikipedia.org/wiki/File:IEEE-488-Stecker2.jpg

 

One side will be a male and other side will be female. You can keep stacking the multiple GPIB connector intern as many instruments maximum of up to 15 number. Set the unique addres to each instruments using the manual controls available on the Instruments.

0 Kudos
Message 7 of 14
(9,209 Views)
Solution
Accepted by topic author aimee123
There are numerous free tutorials on GPIB. Any should explain how multiple instruments can be connected to a single controller.

That being said, even though unnecessary, you should have no problems with multiple controllers on the same pc. With both connected, did they pass all tests in MAX? You are using an old driver and seem to have tried several different versions. I suspect a driver issue and I would advise you to uninstall all GPIB and VISA drivers and then start over. Not at all necessary but can be done to satisfy your curiosity.
0 Kudos
Message 8 of 14
(9,200 Views)

Thank you, connecting my instruments via cables and using just one gpib-usb-hs controller works perfectly. I still don't know why my convoluted method of using two gpib-usb-hs controllers didn't work...hypothetically in a situation with 15+ instruments it would be necessary to use more than one controller? And to answer your question, with both connected all three tests in MAX were passed successfully. In any case I am grateful that I have a way forward now, thanks Dennis and Vijay for your help 🙂

 

 

0 Kudos
Message 9 of 14
(9,187 Views)

Probalby because you didn't read the help file

"When there are multiple GPIB controllers that LabVIEW can use, a prefix to address string in the form ID:address (or ID: if no address is necessary) determines the controller that a specific function uses. For example, to set GPIB controller 2 to talk to a device on address 3, use the prefix 2:3. If a controller ID is not present, the function defaults to controller (or bus) number 0. "

 

Bus 0 will be the first gpib bus connected  to address a device at address 3 on the second controller the address string woud be 

"1:3"


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 14
(9,169 Views)