Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA TCP/IP Resources, Aliases & DHCP

I using an alias from my (VC++) application to access a LXI power supply. I've done the VXI-11 scan & alias definition from MAX. I want to avoid the user having to use MAX if the IP address changes.

 

The power supply has a DHCP assigned IP address, but no hostname. It looks like the alias is nothing more than a mapping to "TCPIP0::129.86.82.157::inst0::INSTR" -- is that the case? If so, then how do I re-bind the aliad to the instrucment if it gets allocated a different IP address? What does the"Validate" button do?

 

I need to ensure that the alias maps to the correct device / serial number. I'd like to only define the alias once in MAX and then handle any address re-assignment from the applicaiton (with as much handled in VISA, et. al., as possible).

 

Currently I'm at VISA 4.2, but can upgrade if that helps. (saw something about a new static flag in 4.4)

 

Thanks,

0 Kudos
Message 1 of 4
(4,479 Views)

Dean,

 

You are right the VISA alias is just a friendly name for the visa resource "TCPIP0::129.86.82.157::inst0::INSTR" that is found when you run MAX. If the IP changes then the alias is bogus. LXI devices don't have to support DNS but if they do then you should use the hostname. Does your instrument support DNS and if so can you setup a DNS or Dynamic DNS?

 

Alternatively the VISA function viFindRsrc will not go out on to the LAN (so to speak) and find VXI-11 devices dynamically it only looks in the configuration that MAX keeps. If your LXI device is LXI version 1.3 or greater then it has to support mDNS and the NI-VISA viFindRsrc will return a list of mDNS capable instruments on your LAN. You could then check each ones "*idn?" response for model and s/n.

 

Message 2 of 4
(4,457 Views)

On my work i use a Agilent PNA who work with lan. In Labview the viFindRsr Box will go find the device only if you record first the IP address on NIMAX. it mean that your IP address of your device must be !!!First!!! Defined staticly (not DHCP). 

If your device must be DHCP there is a other way that i use. 

 

I have developed a simple soft (dos style) who when i give the IP passerell  adress (Ex 192.168.0.1) he will scan all the adress( 192.168.0.2 to 255) by PING and if the PING success the program stop when the *IDN? command match to my device and write in file the IP adress.  Of course my acquisition program use this file to commicate wth my device. I don’t incorporate directly this code on my principal program, because The PING command to be use fastly, must be incorporate in THREAD and EVENT. It means that can provide crash and bugs if you incorporate directly in your program.

 

0 Kudos
Message 3 of 4
(3,524 Views)

hi

 "VISA function viFindRsrc will not go out on to the LAN (so to speak) and find"

I finally found out why. But how can we solve this problem about not finding the network address?

Is there any other order to fix it?

Or do I need to use IVI visa? If the driver needs to be changed, the project will be renewed, which will be a lot of work.

thanks

0 Kudos
Message 4 of 4
(2,270 Views)