LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

option to continue with empty file path without saving

Hi,
 
maybe some can help me: I have a program which runs without saving data, but the user has the option to save data (via a switch on the frontpanel). In this case the user is asked where to save the data because I left the path file empty. This works fine.
 
But sometimes the user hits the switch and then recognizes that he doesn't want to save data, so he hits "cancel" without entering a file path name. In this case LabVIEW gives an error (because the user didn't enter a file name) and you have to stop the whole program.
 
Does anybody know if there is an option to cancel the saving process once the user has hit the "save" button without stopping the whole program?
 
Thank you.
Steffi
 
0 Kudos
Message 1 of 26
(3,730 Views)
hello,

If i'm my idea it's correct... If you wanna stop that in a simple process, you just have to connect an error indicator to the save vi. Because that error popup only cames out if you don't have nothing connected.

If the vi don't have this error connector, you've to change the vi. What's the vi name?


Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 2 of 26
(3,722 Views)
Hi Stefi,

use the "file dialog" function to ask for a filename. Here you can check if the user has decided to cancel the save operation...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 26
(3,721 Views)
Hi,

I have the "Write Characters To File.vi" to save my data in a spreadsheet file. So what shall I wire to the file path? I'm not sure which function you mean? Do you mean an Express-vi? Maybe you have a simple example...

There is no error in in that "Write Characters To File.vi".

Thank you very much,
Stefi
0 Kudos
Message 4 of 26
(3,715 Views)
I'm using Labview 8.5, I can't see that function.

Please send me the function and tell me your labview version.
Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 5 of 26
(3,712 Views)
Hi Steffi,

in the "Write Characters to File.vi" you will find a "General Error Handler" which is bringing up those messages...
You can make a copy of this function and change this copy by deleting the error handler. Then it will have the same functionality without showing error messages.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 26
(3,711 Views)
I don't find the general error handler...

Maybe you can have a look (one more time)? I post the VI. I work with LabVIEW 7.1

Thanks.
0 Kudos
Message 7 of 26
(3,706 Views)
Hi Steffi,

oopen your vi, double-click "Write to text" or "Write to spreadsheet" - et voila...
Remember: always make copies before changing vi.lib-functions!

Hint: try to code according to style guide: left to right, straight wires Smiley Wink
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 26
(3,703 Views)
simply do like it's the attached picture. I can't send you an example in 7.1.


Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 9 of 26
(3,701 Views)
Hi Gerd,

I'm sorry, I don't get it. If I double click the vi I have the front panel of the vi, right? But I can't find a general error handler in there?!
Or shall I write "Not a path" to the "new file path" box or the "file path" box?
You didn't change anything in your attached vi, or? At least I didn't find any difference...

Sorry and thank you very much for your help.
Steffi
0 Kudos
Message 10 of 26
(3,692 Views)