LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save control configurations in file in labview

Hello, 

i am trying to save configuration controls on front panel in the file and load it back. I have one vi which is working fine to save and load it back but when i modify it into my new vi its saving values but not leading it back. I know there are some mistakes because i just copied and pasted the load and save vi in main vi. can someone tell me how should i save it and load it back? both vis are attached working and not working both....

 

thank you....

Download All
0 Kudos
Message 1 of 3
(1,523 Views)

1. A VI should only have 1 event structure.  And you definitely should not have more than one event structure in a loop.  Just use more event cases.

2. For your file IO, right-click on the Write/Read Text File nodes and turn off the "Convert EOL".  That option should not be turned on when dealing with flattened data as it will change data.  For Windows, any Carriage Return (\r) or Line Feed (\n) will be converted to a Carriage Return and a Line Feed (\r\n).



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(1,496 Views)

Hi,

 

I have taken a look into your VIs. After some troubleshooting, I have noticed that there is an error when loading the config file in "not working.vi":

afort_0-1662727155056.png
Interestingly, if I load the config file of "working.vi" into "not working.vi", it does work; which means that the issue is at the saving file event in "not working.vi", and not at the loading file event.

If you remove the parity, flow and data bit controls, "not working.vi" saves and loads config properly.

 

afort_0-1662733700039.png

 

Therefore, the issue lies within those controls.

 

Reach out as needed,

 

Fort

0 Kudos
Message 3 of 3
(1,482 Views)