07-15-2015 05:50 AM
Is there a way i can supress errors from an Array to Spreadsheet node.
If the file is open and it cant write to it then it creates an error box and the VI stops running until you click continue. I simply want it to ignore the error and keep running without writing to the spreadsheet.
Solved! Go to Solution.
07-15-2015 06:17 AM - edited 07-15-2015 06:19 AM
You do not want to suppress the error, you want to handle the error. Use the "Clear Errors.vi", here you can specify which error code you wanna ignore. Besides, you may want to inform the user about a failed file operation...
By the way, I did not find any "Array to Spreadsheet node", what VI/function are you talking about?
edit: of course you have to use the error wire properly through your block diagram, do you? Alternatively, you can show us your code so we can suggest a more relevant solution for your case...
07-15-2015 06:21 AM
Sorry its the Write to Spreadsheet node in File I/O
And thanks. I dont need to notify of that particualr error as the data in-out is continuous and well visualised in the rest of the VI.
07-15-2015 06:29 AM - edited 07-15-2015 06:32 AM
Since this is not a low level File I/O VI, it does not have error terminals in/out. I would suggest you to use a low level VI set, like the "Open/Create/Replace File", Write to Text File", and the "Close File" VIs. In this way you have more options to catch and handle the error.
Or you can modify the high level "Write to Spreadsheet File" VI to have error terminals in and out (and deleting the pop-up terminal from inside)... But NEVER ever modify&save an original LabVIEW system VI, first save it under a different name and location!
See here:
07-15-2015 06:31 AM
Blokk wrote:By the way, I did not find any "Array to Spreadsheet node", what VI/function are you talking about?
I'm pretty sure the OP is referring to the Write To Spreadsheet File VI.
The short answer is no. The error handling is done inside of that VI.
However, it is a pretty simple VI to build up yourself, especially if you do not care about a lot of the configurations that VI has. The version I made is just an Array To Spreadsheet String and a Write To Text File. I also pass in the reference to the file instead of constantly opening and closing the file.
07-15-2015 06:33 AM
"The version I made is just an Array To Spreadsheet String and a Write To Text File. I also pass in the reference to the file instead of constantly opening and closing the file."
Yep, this solution is even better, I suggest to go this way...
07-15-2015 08:23 AM
Ok Got it working. I just edited the original Write to Spreadsheet File (string).vi (saving it in a different location). It was as simple as createing clear errors node followed by an error report node then wiring them up to the Node select thing in the top corner (not sure what its called)
Everything else is left the same.