LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I supress error messages generated by the Directory / File Info VI

I use the Directory / File Info to determine if a file exists.  If the file size returns a zero I create the file and write the header.  This ran fine in LabView Ver 6.1.  In Ver 7.1 It returns a LabView general error message (File Not found).  Everything else works fine except the error message confuses our operators.  Does anybody have a different way to determine if a file exists within LabView that will not generate an error?
0 Kudos
Message 1 of 6
(2,645 Views)
I was under the impression that such error dialogues are supressed if you just wire the Error Out terminal to an indicator (which you could hide if you didn't want anyone to see it).

Failing that, go to File -> VI Properties, select the Execution category, and uncheck Enable automatic error handling.
0 Kudos
Message 2 of 6
(2,636 Views)

Newer LabVIEW version have automatic error handling enabled bu default (set in options...block diagram). An error dialog will appear if an error occurs but the error output is not wired. The dialog should go away once you wire the error output. This confuses me, because usually you would use the error output to determine if a file exists or not. How are you using the tool?

Easiest would be to wire the error out directly to the selector terminal of a case structure and place the alternative code sections in the two cases..

0 Kudos
Message 3 of 6
(2,635 Views)
It always returned an error. You probably never had an error indicator wired to it. The difference with 7.1 is that by default, error dialogs are turned on. This is great to have when people don't wire up the error out indicators and it will actually catch problems that people would never otherwise see. You can turn off the automatic error dialogs (Tools>Options>Block Daigram) or get the error and if it equals 7, ignore it.
0 Kudos
Message 4 of 6
(2,632 Views)


@agood wrote:
I use the Directory / File Info to determine if a file exists.  If the file size returns a zero I create the file and write the header. 

OK, this is incorrect, because a file can exist and be of size zero at the same time! 😉 As mentioned above, you should use the error output. If there is no error, the file exists. If there is an error, the File/folder does not exist.


 

Message Edited by altenbach on 01-11-2007 12:33 PM

0 Kudos
Message 5 of 6
(2,632 Views)

Thank you all for the input.  Wiring the error out worked. 

 

Art Good

0 Kudos
Message 6 of 6
(2,624 Views)