Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

"The interface associated with this session is not currently the controller in charge" -- Why can I communicate with my device in NI MAX but not a VI?

Hi all, I have an Agilent 82357B GPIB/USB interface and I'm trying to use it to communicate with a Tektronix AFG310 Function Generator (FG). I've used another Agilent 82357A in the past (like, earlier today) with this PC and that works perfectly, so I assume all the Agilent/VISA stuff is still working.

 

It shows up in NI MAX as GPIB0::1::INSTR. This is the first strange thing, because when I set the GPIB address to be 5 in the FG's menu, it didn't show up in NI MAX; it only works if I set it to 1... but I thought the machine dictates the GPIB address and NI MAX displays that?

 

Anyway, so when the GPIB address is set to 1 in the FG's menu, I can click open the VISA Test Panel for GPIB0::1::INSTR and communicate with it, like get the system info by sending *IDN?:

 

VISA_test_FG_working.PNG

 

I can also successfully change some parameters (you'll have to trust me that it's outputting the right stuff):

 

STAT_ON_FG.PNG

 

I can also communicate with it in the Keysight Connection Expert software:

 

KS_FG_test.PNG

 

However, for some reason, when I try making a very simple VI to do the same thing, I get an error. Here's the VI I used:

 

FG_testsnippet.png

 

With the VISA resource name:

 

VISA_res_FG.PNG

 

And it's giving me this fun error:

 

newGPIB_error.PNG

 

What's going on here? I googled that error, but didn't find anything that really helped me resolve it.

 

It's very strange to me that I can communicate with the machine (which should be like 90% of the hard part) but my VI can't. In the Agilent VISA User's Guide, here: http://cp.literature.agilent.com/litweb/pdf/E2090-90040.pdf

 

It gives that error as "VI_ERROR_NCIC". It seems like there's a VISA command it gives so you can put the controller in charge, viGpibPassControl on page 204 of that link: "Tell the GPIB device at the specified address to become controller in charge (CIC)."

 

...but I don't really know how to use that. Does anyone know what I can do? Thank you!

0 Kudos
Message 1 of 4
(10,494 Views)
Do you have an NI controller that you can test with? You've still got problems with all of those secondary addresses. The fact that you change the instrument address and its not being reflected in MAX is a big problem as well. You make no mention of what exactly you have installed as far as drivers. Personally, I think the controller is bad since you had a different one working. Probably a question for Keysight. Their utility program should be perfectly capable of setting it as cic.
0 Kudos
Message 2 of 4
(10,481 Views)

@Dennis_Knutson wrote:
Do you have an NI controller that you can test with? You've still got problems with all of those secondary addresses. The fact that you change the instrument address and its not being reflected in MAX is a big problem as well. You make no mention of what exactly you have installed as far as drivers. Personally, I think the controller is bad since you had a different one working. Probably a question for Keysight. Their utility program should be perfectly capable of setting it as cic.

I'm afraid I don't have an NI controller. I bought this 2nd Agilent one because I had the 1st working well, but in the future I'll just go with NI.

 

Actually, what's strange is that now I can kind of get the instrument address to show up when it changes. Here's what I did. I changed the GPIB address on the machine to 3, then refreshed MAX. It doesn't show up there, and the old addresses (none of which are still plugged in, by the way) are still there. Then I go to the Keysight Connection Expert and 'Rescan', at which point it shows up in the list of my instruments (of which the others are the same machine, but with the past GPIB addresses I tried, similarly to in MAX...). After this, if I refresh MAX, the new address GPIB0::3::INSTR shows up in the list, and I can communicate with it using the VISA test panel.

 

I installed the drivers so long ago that I don't know, but I'll try and find out. However, I've gotta reboot for an update so I will report back later. As always, any advice is very welcome.

0 Kudos
Message 3 of 4
(10,453 Views)

Alright, sooooooo now it's working.

 

I can't say for sure what happened, but I did click the "check for updates" thing in MAX and then install a "critical update" 488.2 driver, and then restart. When I restarted and went into MAX and turned my machine on and refreshed MAX, that huge list of devices was gone, and the new address is there. I could communicate with it in the VISA test panel so I tried it with my program and now it magically works!

 

So, for anyone in the future who has this problem, I strongly suggest you consider using

 

 

 

 

~~*^~MaGiCk!!!~^*~~

 

 

 

0 Kudos
Message 4 of 4
(10,450 Views)