LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA TCP/IP Check if Connected

Solved!
Go to solution

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>   ---'


0 Kudos
Message 1 of 4
(4,932 Views)
Solution
Accepted by topic author James.M

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

Message 2 of 4
(4,883 Views)
Solution
Accepted by topic author James.M

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

Message 3 of 4
(4,876 Views)

MarcoMauri,

 

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>   ---'


0 Kudos
Message 4 of 4
(4,836 Views)