Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

MAX IP Address for VISA TCP/IP Resource

Any way to programmatically get the IP address entered in MAX for a particular VISA TCP/IP resource when the device is NOT plugged in? I know there is a Property Node to get the address, but it seems to throw an error when the device isn't present.
 
Michael
0 Kudos
Message 1 of 4
(3,616 Views)

There has to be an easier way than this...

Michael

0 Kudos
Message 2 of 4
(3,609 Views)

Hi Michael,

Since MAX obtains the IP address by parsing the device, it is difficult to obtain an IP address when no device is attached.  I know that you are looking for an easier way to do it, but I believe that the program you attached is the only way.

The other option would be to query the device when it is attached and save the IP address as a global variable that can be accessed later.  You would need to use some sort of loop that would call the global variable if the property node throws an error implying that no device is attached.

I hope this helps a little.

Lauren L.

Applications Engineering
National Instruments
0 Kudos
Message 3 of 4
(3,581 Views)
Thanks Lauren. I actually found a solution to my problem. I was trying to find the IP address stored in MAX of a certain Alias in MAX (I think you thought I was trying to get the IP address of the IP stored on the device itself). I used the "VISA Find Resource" function to get a list of aliases and then get a list of the canonical names, and from there I got the IP address MAX had for a certain alias. See attached VI.
I was doing this because there are many different users, and one may change the IP address in MAX depending on their situation. I wanted to verify the IP is what it should be.
 
 Michael
0 Kudos
Message 4 of 4
(3,563 Views)