Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI GPIB card not always finding instrument (gives different errors)

hello,
i am currently having a host of problems with my GPIB connections. Smiley Sad although i've used gpib often in the past, i'm no expert so please bear with me.  i'll just start with the first few problems i'm having and see if i can work from there.

i have a Windows XP PC with an NI PCI GPIB card installed. I installed NI-488.2 ver 2.5 on it the other day (so i have the MAX program). I have the PC connected via GPIB cable to an Agilent 4156c. and i don't know if this matters, but the 4156c is also connected to another PC (via Agilent USB GPIB interface)...more on that later.

anyway, one problem i've been having is that the "scan for instruments" in MAX doesn't always work. In otherwords, sometimes when i do it it does finds the 4156c (says "Hewlett Packard..blah blah blah", but then 10 minutes later it does not work at all....it says "instrument doesn't respond to IDN?", or says it cannot find any instruments on the bus, or sometimes it even says "there has been an error" (verbatim, that's what it says!) and doesn't even let me scan for instruments anymore! i have checked my connections thoroughly and the equipment *IS* connected properly, so I don't get the problem (i don't understand why it finds the instrument and sometimes it doesn't). Also, sometimes it even gives an error that there's an interface with the "same address" but i've checked that too and there isn't (even though the 4156 is connected to another PC, the other interface has a different address). i have tried the "Troubleshooting" tool in Max and it's of no help..the GPIB card/software test always pass. I'm wondering if there is something wrong with my card or if I just don't have something configured properly.

oh and i don't know if this matters but I should mention that the reason i have two PCs connected to the HP4156c is that I want one PC (with the Agilent USB gpib interface, call this PC#1) to control both the 4156 and the other PC (with the NI PCI GPIB interface, call this PC#2). Right now I am just testing the connections between the instruments/PCs. I can see the 4156c from PC#1 but not always from PC #2. My end goal is to be able to "talk to" and control PC#2 (and the 4156c) from PC#1.
                               
sorry if this sounds confusing...and many, many thanks to anyone who can offer any sort of advice!

-Anita
0 Kudos
Message 1 of 13
(4,950 Views)

I'm sure all of your problems are because of the two controllers connected to the same instrument. You can only have a single controller assigned as a master. From your description, you want to have the Agilent as the active system controller and the NI set as a talker/listener only. I don't recall where in MAX you do that but once done, before you can do a scan for instruments in MAX, the Agilent controller would have to pass control to the NI controller.

I'm not sure I even understand why you need a GPIB controller in PC2. There are a lot of easier (and cheaper) methods to communicate to a second pc. A simple cross-over network cable comes to mind.

0 Kudos
Message 2 of 13
(4,940 Views)
thanks very much for the response!

so I unplugged the Agilent USB GPIB from the 4156c, and restarted PC #2 (one with NI PCI GPIB card). So now only this PC is connected to 4156c,  that's it. But I am *still* having the same problem! argggh.

in MAX it keeps saying "the device does not respond to an *IDN query".  when i do "communicate with instrument" it says iberr = EADR, complaining how there is an addressing error.

i don't understand the addressing error. the NI card in the PC is set to interface address GPIB0, primary addr 3. the 4156C is set to primary addr 18. In MAX it recognizes there's an instrument at addr 18, but for some reason it doesn't respond to the *IDN query. any ideas?

0 Kudos
Message 3 of 13
(4,915 Views)

Have you confirmed in the instrument manual that it actually supports the *IDN? command? Many older instruments do not and the message can be ignored.

Not sure about the addressing error. Have you tried setting the primary address for the controller to the default value of 0?

0 Kudos
Message 4 of 13
(4,912 Views)
thanks for the response! yes, i have confirmed that the instrument (agilent 4156c) does support the *IDN command. I know because when i connected the other PC (PC#1, with the Agilent USB GPIB interface, it always connected perfectly w/o any problems, and when I sent an *IDN command via that computer it would always responds appropriately).

So i did as you suggested, I changed controller address to 0, so now the card its at GPIB0, primary addr 0. Saved it. Then right under instrument it showed "there has been an error" and when i ran troubleshooting utility, both the Software and the card *failed*. i clicked on "Help" and it says it was "Unknown NI-488.2 Software Error." It suggested I try restarting the computer so I did.

after restarting the computer and reopening MAX, i clicked on find instrument. It then found the instrument but gave the same error as before ("Device does not respond to an *IDN command"). Argh! I ran troubleshooting utility and now they both pass. Hmm. I wait a minute more and try again, and voila, now it works...sending IDN returns "Hewlett Packard, 4156c, blah blah blah". ok, so that time it liked it.

the thing is, now i'm not 100% sure that the problem is solved because as I said before, this happened before..I couldn't get it to find the insturment and then after restarting/changing address or something  I finally did get it to work....but then the problem popped up yet again.

I should note that the problem (not being able to communicate with instrument) tends to arise after the computer has been idling a while (e.g. for 1 hour or so). whenever I come back to the computer and it gets out of screen-saver mode, it rarely works anymore (can't communicate with instrument, gives errors, etc).

anyway, i'll cross my fingers and hope this works (i'll let the computer idle and then check to see about the errors). thanks so much for your help!!


0 Kudos
Message 5 of 13
(4,902 Views)
ok, well crossing my fingers didn't help at all (T_T)  ....i let the computer idle for 30 minutes and I  now I'm back to square one with the same problem/errors as before. Smiley Sad In MAX, I put on NI spy to capture, and nothing. I use NI 488.2 communicator and send *IDN query, and NOTHING (not even an error). I do "Scan for Instruments" and it gives me the same old "There was an error...". I run the Troubleshooting tests and both the software and the card fail now. ARGH.

So basically after restarting my computer everything can be working fine, but once my computer idles for more than ~20 minutes, all he!! breaks loose and I can't talk to the instrument anymore and all these errors pop up. So strange....

Could something be wrong with my card? Should I try re-installing NI 488.2 ?


0 Kudos
Message 6 of 13
(4,896 Views)
The simplest thing is to try to re-install NI-488 and NI-VISA and make sure you have the latest versions. Then, you might want to try the controller in another pc or at least a different slot in the same pc to see if it works there. The possiblity exists that the card is defective but I'm pretty sure you will be asked to perform something similar to the above first if you contact NI to see about a repair.
0 Kudos
Message 7 of 13
(4,893 Views)
ok, i will try reinstalling. and i never had NI-VISA on there, just NI-488.2 (just what's on the CD that came with the GPIB card). but it seems like I should install VISA too because from what i've been reading on here it sounds like I will need it if i eventually want to communicate with another PC using an agilent card. i don't have the cd for VISA  but i assume i can just get it from here: http://joule.ni.com/nidu/cds/view/p/id/989/lang/en

anyways, i will go and reinstall. thank you so much for your help.
0 Kudos
Message 8 of 13
(4,890 Views)
Hello,
I have taken a look at the programmer reference guide for your device, the syntax for the identification query is
*IDN?

I am not sure if you are sending that instead of just *IDN.
Let us know how this goes.

Christian A
National Instruments
Applications Engineer
0 Kudos
Message 9 of 13
(4,868 Views)
^ thanks for the response, actually i had been sending *IDN?, i guess what i had typed above was just a typo. sorry for the confusion!

anyway, I unistalled all NI software from my computer, and re-installed NI 488.2 and VISA. i *STILL* have the same problem! Smiley Sad  Sometimes the instrument responds to *IDN? properly ("Hewlett-Packard, 4156c..."), sometimes it does not and just says "Device did not respond to an *IDN? query".  When i try to use the 488.2 communicator, it keeps complaining of an addressing error (two things have the same address) but there is no address conflict, and i have changed the address to a million things and it does not make a difference.

Could i have a faulty card? Or would it be more likely that it's the cable I'm using? It seems so strange that it can always find the instrument and obtain its GPIB address, it just can't always communicate with it. The problem often seems to happen after the computer has been idling, which is quite strange.


0 Kudos
Message 10 of 13
(4,858 Views)