LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save the update control input value in application

Dear Sir:

I built an application in labview. In the labview environment, I can set up a default string control array in the front panel. If I change the elements of the string control array, in labview I can make this update value as default, then when I reopen this file again, I already can use the changed string control array as my default value. However, how can I change a string control array and make the updated array as my default value in application? Then when I run this application again, I have a new updated default string control array. Thanks.

Best Regards.

Fred
0 Kudos
Message 1 of 5
(2,862 Views)
I'm not sure if I understood correctly.. but here goes:

If you want to change only one control value to default (not all of them), then simply right click on the control and select "Make Value Default" and immediately save your vi.

To see if it was okay, try the following steps:

1. Set the control value to a known default (value you want)
2. save the vi.
3. close the vi
4. open the vi, change the control value, and close the vi
5. open the vi. The control value should be that which appeared in step 1 above.

You can also set a control value to default programically. (Unfortunately I don;t have LV in front of you to describe the steps). I think you can use the property node to set it to default (right click object and select "Property Node".

JLV
Message 2 of 5
(2,853 Views)
Dear Sir:

Thanks for your response. I already know how to set the current control value as default value in the front panel under labview edit environment. Thanks for your suggestion. However, if I build this program into application (executation)file, and when I run this application on any other computer without labview program, I would like change my control value in my application file and save the modified control value as default value. Then when I run this application file again, the modified value is my default value. Anyway, my question is in labview edit environment, I can make the current value as default value, however, how can I do this function in the application file? Thanks.

Best Regards.

Fred
0 Kudos
Message 3 of 5
(2,844 Views)
The method Make Current Values Default is not available in the run-time engine. This would require the VI to be in edit mode and you can't edit an executable. The only solution that I know of is to use exteranl configuration files. LabVIEW has built-in functions for reading and writing to ini files. Also, OpenG has a set of tools to make reading and writing ini files easier.
0 Kudos
Message 4 of 5
(2,836 Views)
thanks for your guy's help. This give me a ideal to set up the password. My solution is to set up the default user list into excel file, and as the program run it, labview would read this file first to set as the default file. While the program is running and if the programmer or user want to update the list, just write these data to excel file.

Thanks again.

Fred.
0 Kudos
Message 5 of 5
(2,822 Views)