I have a VI running that frequently uses the "Write to Spreadsheet File" VI to record the data it is reading. My problem is that occasionally, if running unchecked, the file it is saving to becomes so large it fills the hard-disk drive of the computer it's running on. When this happens my VI throws up an error box which halts operation until the error box is acknowledged somehow by a user. I need to be able to "catch" this error before it happens so that I can tell LabVIEW to power down power to the test system. So basically, how do I go about "catching" the error from the "Write to Spreadsheet File" VI so that it doesn't completely hang my program when unattended? Many thanks! Neil
The standard "Write to Spreadsheet File.vi" is lacking in a couple of ways: (1) it doesn't give you an option for the type of error dialog and (2) it doesn't have an error out terminal. It's easily modified. See attached. This vi lets you decide whether to display a warning and check the error output terminal for the error condition.
Save a copy of the function with a different name and not in the NI folder. Modify the copy and remove General Error Handler.vi that's called and wire the error out of Close File.vi to a front panel indicator. Lastly, wire the error out to the VI's connector pane