I have a test system with a Sorenson DC source that uses LXI. I have found that if I power cycle the DC source I can not communicate with it using VISA until I also reboot my computer.
I can bring the source up in NI-Max and even refresh its webpage, but all attempts to communicate using VISA time out, until I reboot my computer.
I don't understand why I can communicate with the source in NI-Max but not through VISA until I reboot.
Maybe it's a "Windows thing"... Is there anyway to fully reset an Ethernet port through LabVIEW?
Solved! Go to Solution.
Does your DC source have a fixed IP address or is it auto-assigning something in the 169.254 range?
If it's a fixed IP, it should work and I don't know why it isn't.
If it's getting a 169.254 IP, then you power cycling it gets a different one but your PC doesn't notice. So you either need to re-scan for instruments in MAX to make it notice, or set it to a fixed IP so it doesn't change on power cycle.
Yes it has a configured IP address of 192.168.1.10 and the computer is set to 192.168.1.5
I can't think of any reason it doesn't work.
Like I said MAX can see it just fine and even refresh its webpage, but LabVIEW can't see it.
I have all my instrument settings in a config file that is parsed when my program starts. I then run a
*IDN? on all the instruments to make sure they are present and powered. But the if the DC source (the only one on LXI) was powered on after the computer it always fails to respond to *IDN? until I reboot the computer.
Are you using just VISA read and write, or are you also using VISA open, close, or others? It might be worth explicitly opening and closing the VISA reference to it, in case that resets the connection.
Closing the VISA session on a fail and reopening it on the retry seems to have solved this