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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB interface

HI, I have a program wrote in labview 8.6 that interacts with an HP4284 analyzer.  We had to replace the analyzer and the address changed on the GPIB bus.  I changed the address in the software but it keeps reverting back to the original address.  I don't know why.  Does anyone have any suggestions as how to stop this.  Thank you

0 Kudos
Message 1 of 9
(1,351 Views)

Hi tomric,

 


@tomric wrote:

I changed the address in the software but it keeps reverting back to the original address.  I don't know why.  Does anyone have any suggestions as how to stop this.


When you "don't know why" this happens then you need to debug your code!

Suggestion: find the place where the address "keeps reverting back" and change the code to take the new address.

 

Other option: change the GPIB address of the replacement device. Usually there is an option in the device settings!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(1,340 Views)

Are you using VISA or the GPIB libraries?  My suggestion is to switch over to VISA if you are using the GPIB.  Otherwise, it would be completely wild guesses as to what is causing your reversion unless you supply code.


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 3 of 9
(1,327 Views)

Thank you for your reply. This particular program has been running for a long time with the original meter.  I didn't write it, and it's a long complex program.  I have ran the program in steps where the meter address is wrote to the program and the correct address is there.  It's only when the program is ran as a whole that the GPIB changes back to the original number.  This program uses VISA libraries, is this address imbedded in the libraries?

0 Kudos
Message 4 of 9
(1,309 Views)

Hi tomric,

 


@tomric wrote:

 This program uses VISA libraries, is this address imbedded in the libraries?


No. The address is either given in the source code, some configuration files, MAX VISA aliases, or mabye somewhere else. But not in the "VISA library"…

 

What about setting the replacement device to the same GPIB address as the old device?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 9
(1,295 Views)

@GerdW wrote:

Hi tomric,

 


@tomric wrote:

 This program uses VISA libraries, is this address imbedded in the libraries?


No. The address is either given in the source code, some configuration files, MAX VISA aliases, or mabye somewhere else. But not in the "VISA library"…

 

What about setting the replacement device to the same GPIB address as the old device?


That is the easier - and recommended - solution, I would think.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 9
(1,291 Views)

@tomric wrote:

It's only when the program is ran as a whole that the GPIB changes back to the original number.


Do a search on your entire application for the "old" Visa resource name that uses the previous GPIB address.  My wild guess is that you missed one.


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 9
(1,281 Views)

When you say replaced... with the same model number or a newer one?

 

NI-MAX is the best tool to sort out address things. When I use several instruments at a time I also use VISA Aliases.( you don't need too)  It makes the code easier to read

 

  1. Open NI MAX and open the interfaces and scan you GPIB for instruments
  2. Verify the LCR GPIB address.
  3. Click on the meter in NI Max and open a visa session
  4. choose Instrument IO or communicate with instrument
  5. Click on the Query button and the instruments ID string should be returned.
  6. On the instrument use the SYS Config key and change the address to the older one. (download a manual if you don't have one)
  7. Re scan instruments in NI MAX and verify old address works.
  8. Use the old software.

Norm

0 Kudos
Message 8 of 9
(1,261 Views)

I'd guess who ever wrote the code didn't necessarily wire all subvis to pass the VISA address, they saved the default address in those subvis and when the program runs now it gets the old address and causes an error..  Use highlight execution to track the code, find the name of the subvis that cause errors and look inside to see how the address is used (passed in or hard coded?).  It should be straighforward to solve the problem.  If not post the code here and we can help.

0 Kudos
Message 9 of 9
(1,244 Views)