Thanks, tst. I can understand if you do nothing to an indicator why it returns its default value. Its seems a little perverse that changing the value programatically doesn't have the same effect as wiring to an indicator (particularly when I can read the new value from a local!). I was also fooling around a little with the save front panel routine and found that if I used a property node instead of the Set Control Value invoke method the new value remains.
Just so others can follow the thread here's my original post with the images:
I've noticed that if I try to programatically set the value of an indicator (which is in the connector pane) using the Set Control Value method it reverts back to its default value once the VI is finished executing. If it's not in the connector pane I don't have this problem.
Yet, if I use Set Control Value, then read from a local variable of the indicator to set the indicator I also get no problem.
Why is this? I'm interested in this because I'm trying to write a subvi that retrieves and stores a bunch of global values from a config file. The easiest way to do this seemed to me to use the OpenG vi that reads and writes the front panel controls to a config file (since some of my controls I wish to save are complicated). It didn't seem to work unless I added the second step of using the local variable to update the indicator.
I think this behavior has been around a while -- it sure sounds similar to some quirkiness I had to work around a while ago. In my case, I was using "Set Control Value" to configure the inputs of a vi before launching it using VI server. I found that the launched vi would sometimes use the default value instead of the value I set. In some cases, I had confirmed the "Set" with a subsequent "Get", but the running code *still* used the control's default value instead. (And similar issues using "Get Control Value" to query indicators of the spawned vi.)
Like you, I also found that running a wire out of a control (or a local variable copy of an indicator) would be enough to ensure that the value I set using "Set Control Value" would be used instead of a default.
So, no real answer here. Just confirming the seeming oddness of your observation. In fact, I find yours even more curious than mine. I was manipulating control values in a different vi prior to launch -- you're manipulating control values within the same vi.