LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Load and Save data parameters from the Front Panel

Solved!
Go to solution

Can someone provide me any VI example that ables the user so save his choices front the front-panel? And tell me if it is possible to save the values and strings from all fields that have been filled by the user. I want to implent a "LOAD" and "SAVE" parameters, and i want that those parameters can be read outside LabView, in order to ease up user's intereaction.

 

It would be wonderful if someone can support me in that.

 

Many thanks,

TN

TN
Currently using LV 8.5
logo
0 Kudos
Message 1 of 13
(6,496 Views)
http://forums.ni.com/ni/board/message?board.id=170&message.id=35828&query.id=244217#M35828 goto the above link and you will get some methods. Post back if you want something else. Thanks, Mathan
0 Kudos
Message 2 of 13
(6,490 Views)

Hi Mathan, thanks for the reply, but what you send me it's to save the FP to a .jpeg file. And that's not what i am looking for. I want to save the user's choices, which are numeric and strings, to a file that later can be open again by Labview. I want to implement a save setup and load setup, with the options the user has made. To able the user to repeat his experiment without filling all the fields over and over again. If you need, i can attach my VI, to see what kind of info i want to save and load.

 

Thanks

TN

TN
Currently using LV 8.5
logo
0 Kudos
Message 3 of 13
(6,478 Views)

TN,

 

Look at the configuration file functions.  You should be able to do what you want with those.

 

Lynn 

0 Kudos
Message 4 of 13
(6,475 Views)

HI

 

This is usually done by using property nodes to get the control params/wire values and saving them to some file.  You usually have to make your own filetype (.ini?) etc but what may be particularly usefull is the "flatten to xml" function under the file I/O pallete.

 

Craig

Message Edited by craigc on 05-12-2009 07:49 AM
LabVIEW 2012
0 Kudos
Message 5 of 13
(6,473 Views)

Hi Lynn, thanks for the reply.

 

I've been already looking to that, VI's config files, etc. But, i'm new with it, so if you can send me a little example, i would be very grateful.

 

 

TN

TN
Currently using LV 8.5
logo
0 Kudos
Message 6 of 13
(6,468 Views)

Hi Craig, thanks for the reply,

 

 

Can you send me pls a little example?

 

 

Thanks

TN

TN
Currently using LV 8.5
logo
0 Kudos
Message 7 of 13
(6,457 Views)

TN,

 

I do not have any examples readily available.  Decide what needs to be saved.  When the user presses the Save button, read all those controls and write to the files.  If each control has a unique label, you can use the labels as the key names for the config files.  When the user presses the Load button, read the config file and write the data to the controls using local variables (this is one of the legitimate sues for locals) or Value property nodes.

 

If you have lots of controls, you can programmatically match key names with control labels and write the data with property nodes in for loops without needing to create a local or property node for each control. Start with a reference to the panel and get the array of control references Controls[ ], then loop through that array.

 

Be aware that the config files are set up for simple datatype controls.  Dealing with arrays and clusters is more complicated.

 

There can be a bit of a learning curve working with the config file VIs.  I suggest you make some small test VIs while you are learning.

 

Lynn 

Message 8 of 13
(6,453 Views)

Lynn,

 

I'm attaching my VI. Can you pls take a quick look at it and tell me what's the best way for me to do it?

 

 

Thanks

TN

TN
Currently using LV 8.5
logo
0 Kudos
Message 9 of 13
(6,449 Views)
Solution
Accepted by topic author THN

Hi

 

I have attached a very quick and dirty example.  But you should get the idea behind how to do this 🙂

 

Craig

LabVIEW 2012
Message 10 of 13
(6,439 Views)