LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

set a timeout for "read from text file"

I Need to read from a text file on a remote pc and use the read from text file function to do this. It wotks but sometimes this pc is down causing long wait times in my vi.
Is there a way to set a timeout for the read from text file function, or is there an other solution?

Thank you
0 Kudos
Message 1 of 3
(2,614 Views)

You could check that the path is valid first before you attempt to read the file.  hen put the file read in a True-False case structure based on the results of the check.  You can use the function "Check if File or Folder Exists"  It checks whether a file or folder exists on disk at a specified path. This VI works with standard files and folders as well as files in LLB files.   The function is found in the File I/O --> Advanced File Functions palette.

 

Tom

Message 2 of 3
(2,594 Views)
Tom,

I use a ping first before attempting to read the file and can now avoid reading a file on an off pcSmiley Happy.

Thank you again
0 Kudos
Message 3 of 3
(2,582 Views)