06-24-2015 12:11 PM
Hello,
I have a TCP/IP resource that I'm communicating with via VISA. It works just fine, but I'm trying to check the connection periodically to make sure everything is still functional. The "Is Connected" property works for serial communication, but it outputs False every time with this TCP/IP connection. Does anybody know a quick way of checking the connection? Do I need to ping the IP Address?
See attached snippet to see how I initialize the connection for clarity.
Thanks,
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
Solved! Go to Solution.
06-25-2015 01:02 AM
Hi james,
did you consider sending periodically a status request to your device?
The overhead most probably would be negligible and it lets you check non only the presence over the network of the device but also its overall status.
Regards,
Marco
06-25-2015 01:13 AM
Hi James,
I'd like to add that this is not a VISA-related problem.
I'd suggest this good reading:
http://www.codeproject.com/Articles/37490/Detection-of-Half-Open-Dropped-TCP-IP-Socket-Conne
Regards,
Marco
06-25-2015 11:32 AM
Thanks for the tip. I think that a request to the device every once in a while is really the only way to check I guess. That article clears up why I'm seeing what I'm seeing. Thanks!
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'