LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How i can to create a vi, which read from configuration file and i could modify this indicator and save the config data??

Hi guys,

I have in my application a subvi which i use to save the configuration of application. I create one file with the last saved configuration, and i would like to open this values and that i could to modify this indicator value, but i cant since to modify i need 'numeric control' and to read the data from file i need 'numeric indicator '...
I thought, use a numeric control and use the values from file to the default values, but i didnt get to find the property node to adjust it. is it possible? or any different way to get it....??

Also, i attached the capture file.. i would like the program DOESNT SHOW the question of
replace the file!!. i would like directly replace the file when i push save.

Thanks, i attached the vi.
Download All
0 Kudos
Message 1 of 10
(3,716 Views)
In order to write a default value to your controls, you can create a local variable for each control and write to that. To create a local, just right click on the control and select Create>Local Variable. To disable the advisory dialog, open the Write To Spreadsheet File VI, go to the diagram, and at the the Open/Create/Replace File function, wire a Boolean false constant to the Advisory Dialog input. Save the modified VI with a different name and in a new location.
Message 2 of 10
(3,716 Views)
Hi Dennis,

Great!, all perfect, thank you!.
0 Kudos
Message 3 of 10
(3,716 Views)
Hi Dennis!

I have a litle problem with this vi!, i can cancel the option of save with the sim000, but if i aceppt save with with this name and this name already exist, later show the dialoge `replace file or cancel', if i push cancel i get error... How can i remove this error and i get cancel and the program continue running?.

Thanks!.
0 Kudos
Message 4 of 10
(3,716 Views)
Several of the LabVIEW VIs for file writes have the General Error Handler.vi in them. This VI is creating the error dialog. You can delete the function and do your own error handling. The error code generated by a Cancel is 43 so you could set something up to ignore this.
0 Kudos
Message 5 of 10
(3,716 Views)
Hi Dennis, I understood you... but i can`t do it, can you modify the vi?. I want when i push cancel replace the file doesnt show error and the vi continues running...

Thanks.
0 Kudos
Message 6 of 10
(3,716 Views)
Here's a Write to Spreadsheet file that I use. It doesn't have the general error handler and I have added error in/error out connections. Because it has a different connector pattern, you'll have to make some wiring changes in your diagram. You should be able to make the same changes to Write Characters to File.
0 Kudos
Message 7 of 10
(3,716 Views)
Hi dennis,
Thanks for the reply, but i wasnt able to get the correct way, i put the same in the wirte characters to file, and i continue seeing the error eof??...
Can you adjust the vi file, for me will be easier.
Sorry for the time!.

Regards,Fonsi.
0 Kudos
Message 8 of 10
(3,716 Views)
Hi Dennis,

Your 'write to sreadshhet mod' suprime the dialog of replace file or not!, i want when i push save, it show the dialog input name of file and show the default sim000 but when i push this sim000 and this file already exist, then show the dialog to replace or not, if i replace Ok not problem, but when i push cancel replace it shows error eof!!!.
Your file, only remove this dialog and only replace the file directly.
i put the capture, when i choose the file to save and the program say to me this file exist and it give me the option of replace or not,i want when i push cancel replace it continues running without get error.
is it possible?.
Thanks.
Regards, Fonsi.
Download All
0 Kudos
Message 9 of 10
(3,716 Views)
Sorry dennis, i got it, i modified your vi, put false into the question replace the file... and it runs well.
Thanks for your help!.
0 Kudos
Message 10 of 10
(3,716 Views)