LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Front Panel values lost upon save

Solved!
Go to solution

I am just taking my first steps with Labview. I have created a couple of VIs and have managed to get I2C communication happening through a third party DAQ box. The problem I am having is fairly simple, I am trying to save VIs but they are not retaining the values I have entered in the Front Panel.

 

I have a top level VI and a couple of subVIs that contain lower level functionality for sending I2C messages. The top level VI has a couple of value controls that let me enter device addresses, etc. It also has groups of toggle switches that I am using to set bits that I later combine into bytes of data that I can send.

 

But whenever I save a VI the front panel settings are defaulting to some other value. I dont understand it, I just want the value box to hold the number I entered. And more importantly in this case I need the array of toggle switches to stay where I set them so when I run it again the same bytes are transmitted. But each time I open the VI, the toggle switches are all greyed out and set to 0.

 

Is this normal? How do I get controls to retain there values? Is there a design reason they do not?

 

Thanks for any advice.

 

0 Kudos
Message 1 of 4
(2,552 Views)
Solution
Accepted by topic author TripleAntigen

You need to do:

 

"Edit" --> "Make Current Values Defaults" before saving.

Christopher Povey

Principle Test Systems Engineer for BAE Systems.
Message 2 of 4
(2,548 Views)

You may also consider initializing these values from a file. There are lots of posts which go into details about how you can do this. This is a much more flexible and maintainable approach then relying on the default value of a control.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 4
(2,527 Views)

Great, thanks for the responses!

0 Kudos
Message 4 of 4
(2,505 Views)