ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving Front Panel Data

Hello
 
I would like to save values of control objects (default values) of my VI. So, for example, each user can save his own system settings.
 
I managed to set values programmatically to default, and with the next call they will be the same. But the problem is, if this vi is running as a subVi, it won't work, because the subVi must be in edit mode to make some changes of the vi property (default values). I attached my example (LV8)
 
I guess I can solve this problem by using vi-server method? Unfortunately I have absolutely no experience. Can somebody help me? Maybe there is another solution of this problem?
 
Thanks for any help
 
Woodi
0 Kudos
Message 1 of 7
(3,804 Views)
Why not just write the settings to a file and read them if necessary?
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 2 of 7
(3,800 Views)

Yes I thought of that to.

Saving as cluster? I am using this method in other vi's, which is working well.

I just wanted to do something more elegant. Maybe this is a stupid idea. If can't figure out to do that with the "default setting" method, i will do it as usual.

What is the best way to save such kind of data? I often have the problem, that (with the cluster method) old settings can not be used, if the cluster changes.

 

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

I usually use two methods. Either ini files or XML files. If I know there will be changes every now and then, I use the ini file. If the datastructure remains almost untouched, I use XML files.

For more elegant handling of the data I mostly use clusters and define a strict type def. So every instance of the cluster is updated. You can write both types of files if the data comes out of the cluster. There is a little bit more work to do if you use ini files than XML files.

Anyway - this is my personal opinion and there are lots of others here in the forums. Finally you have to decide what is best for you.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 4 of 7
(3,793 Views)
How does the "ini-files-method" work?
 
0 Kudos
Message 5 of 7
(3,787 Views)
You can simply use the "configuration file" vis. I think there should also be examples on this topic.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 6 of 7
(3,785 Views)
Yes, thank you. I just found it.
 
Thank you for your help!
 
Woodi
0 Kudos
Message 7 of 7
(3,782 Views)