LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save/restore all numeric controls values to/from file

I need to save values of all input controls to file (user can choose path) and restore values from file.

 

Is there ready to use solution?

0 Kudos
Message 1 of 20
(4,935 Views)

The OpenG toolkit Variant config, has a solution to read and write a full panel to disk based on INI files.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 20
(4,931 Views)

hi hellboy,

 

as an attachment you can find a simple Sub VI (Read_Write Ctrl Value.vi).

You can use this VI as a Sub Vi to save and read the values of all controls.

 

Hope this helps

Best regards

Dippi 

Message 3 of 20
(4,887 Views)

Dippi,

 

Could you please post the vi for LV version 8.0? or could you post a snapshot of the block diagram? Thank you.

 

Jae

0 Kudos
Message 4 of 20
(4,752 Views)
0 Kudos
Message 5 of 20
(4,740 Views)

I have the same problem. But the example is not working...

I run it on attached example "fake.vi", but I get the two errors reported on attached pictures.

Can anybody help me? Thanks...

 

Download All
0 Kudos
Message 6 of 20
(4,580 Views)

I have no idea why, but the "Read_Write Ctrl Value" has two different paths being used for the reading and writing of the file. That makes absolutely no sense to me. The two paths should be the same. Set the paths to be the same (or better yet, make it a control), and the VI should work.

 

This is basic LabVIEW knowledge. Have you gone through the tutorials? To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.

0 Kudos
Message 7 of 20
(4,563 Views)

Hi xdaf,

 

if you take a look into thew blockdiagramm of my VI, you will see that there is a different path connected to the "Open/Create/Replace File" function.

 

Change this in both cases to e.g. "C:\Daten"...

Then it will work

 

best regards

Dippi

0 Kudos
Message 8 of 20
(4,558 Views)

Hi Dippi, 

I agree that having two different files for writing and reading doesn't have much sense. But if I choose to write only (so, if I select "setze" from the control panel), the VI should work, and write to file the status of my controls.

But that doesn't happen: I get the two errors.

Thanks anyway for the suggestion...

0 Kudos
Message 9 of 20
(4,552 Views)

Hi xdaf,

 

could you please take a lokk at your path.

In my exmaple it's

"C:\Daten" or "C:\hallo"

 

Then open your Windows Explorer and look at "C:\" is there file / folder names "Daten" or "hallo"??

If so, please delete this file/folder!!!

 

Or your go into your blockdiagramm and change "open or create" -> "replace or create"

 

Does this help?

Thanks

Dippi

0 Kudos
Message 10 of 20
(4,548 Views)