Jump to content

Recommended Posts

Hi all,

I noticed that functions such as "File/Directory Info" and "get file size" can stall seriously if a network path (e.g. \\192.168.3.1\share\file.txt) does not exist, because that particular machine is down. :angry:

Does someone know of a faster way of determining if a remote machine is up, other than pinging with system exec?

Thanks!

Aart-Jan

Link to comment
Hi all,

I noticed that functions such as "File/Directory Info" and "get file size" can stall seriously if a network path (e.g. \\192.168.3.1\share\file.txt) does not exist, because that particular machine is down. :angry:

Does someone know of a faster way of determining if a remote machine is up, other than pinging with system exec?

Thanks!

Aart-Jan

I've noticed the same issue.

I worked around this problem by pinging the remote machine before trying open a file.

Link to comment
I worked around this problem by pinging the remote machine before trying open a file.

I've got to agree - I found that it was Windows searching and searching and searching, so the pinging was the best solution. It's actually pretty elegant - you can't get much lower down than a ping, so it's a neat and efficient method to see if a remote PC is accessable before really trying to do any work with it.

Link to comment
  • 4 weeks later...
I've got to agree - I found that it was Windows searching and searching and searching, so the pinging was the best solution. It's actually pretty elegant - you can't get much lower down than a ping, so it's a neat and efficient method to see if a remote PC is accessable before really trying to do any work with it.

At least if ping hasn't been disabled for that computer. Nowadays with security concerns all over the place this is not something uncommon to happen.

Rolf Kalbermatter

Link to comment

I have not tried the technique but you could try to open TCP connections to NetBIOS ports 139 and 445 of the remote computer to see if it is serving files. If one of the connections open without error then most probably the computer is online for filesharing. You can then close the connection and open the file. When the computer is not online, you have control on the timeout input of _TCP Open Connection_ to set how long is too long to wait.

Alternatively, you could call the file function in a VI spawned in parallel to your main code and if the VI doesn't resume with valid data after some delay (shorter than the network timeout) resume the main code letting the spawned VI running until the file function times out.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.