LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

directory path without open dialog window

i have a vi which automatically opens files from a specified directory, but once a day this directory is flushed. Then labview opens a dialog box and wait till a user make an action. How can i turn off this option ???

Thanx for answers
0 Kudos
Message 1 of 6
(3,286 Views)
Often you correct this by selecting the Open or Create option with the open/create/replace.vi make sure your path is valid. If the path points to a directory that was flushed then the directory must be created first. If this doesn't work for you try listing the file i/o funtions in use and dialog message you are getting.

Randall
Message 2 of 6
(3,286 Views)
What do you mean by flushed?? Is the directory still present after flushing? When a filename path control is placed on the front panel, right click and make the browse button visible. Right click on the browse folder button and select browse options. Then set selection mode to new or existing dir.
0 Kudos
Message 3 of 6
(3,286 Views)
i mean: all files in this directory are deleted.
And so, labView can't find any file, so it opens the dialog box.
i would say to it to wait for an incoming new file without opening the dialog box.

Thanx
0 Kudos
Message 4 of 6
(3,286 Views)
Try using the 'List Directory' command under the File I/O, Advanced File Functions from the block diagram. This will output a list of filenames in a directory. Then use the 'Array Size' function to see if the directory is empty(array size >0). If true, then read you file. If false, then do nothing.
0 Kudos
Message 5 of 6
(3,286 Views)
Indeed, that's quite the solution i made: that's the 'Read characters from file' vi which decides to open the dialog box; so i move this vi into a IF loop and i make a test on the path (if equals to NotAPath then 0).

thanx for ur answers, all

Matt
0 Kudos
Message 6 of 6
(3,286 Views)