LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array to Spreadsheet suppress errors

Solved!
Go to solution

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. 

0 Kudos
Message 1 of 7
(3,231 Views)

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...

 

Example_VI_BD.png

 

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...

 

 

0 Kudos
Message 2 of 7
(3,208 Views)

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.

0 Kudos
Message 3 of 7
(3,198 Views)
Solution
Accepted by AceScottie

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:

http://forums.ni.com/t5/LabVIEW/How-do-I-catch-errors-from-quot-Write-to-Spreadsheet-File-quot/td-p/...

 

 

0 Kudos
Message 4 of 7
(3,188 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 7
(3,167 Views)

"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...

0 Kudos
Message 6 of 7
(3,157 Views)

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.

 

0 Kudos
Message 7 of 7
(3,097 Views)