08-24-2020 07:35 AM
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
08-24-2020 07:45 AM
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!
08-24-2020 08:12 AM
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.
08-24-2020 09:06 AM
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?
08-24-2020 09:35 AM
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?
08-24-2020 09:52 AM
@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.
08-24-2020 11:06 AM
@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.
08-24-2020 02:09 PM
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
Norm
08-24-2020 03:46 PM
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.