LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to reset all controls on the front panel except one?

Solved!
Go to solution

Hi everyone,

 

I've got an interesting problem, whereby I need to run successive tests using a test station that has several Indicators on the Front Panel. At the end of each test I need to reset them all to default values, except for one control (Test ID) which needs to retain its information - it's value is used in an intitialization state to query test information from a database so it can not be reset along with the rest of the controls.

 

I can reset all controls at once using a ThisVI reference and the VI Default Vals.Reinit All method but this obviously will reset my (Test ID) control values as well. Any suggestions on how to properly retain or perhaps store this controls information while resetting all the others. I can individually reset the others but there are a few and more may be added as this system is developed.

 

I'm really not sure what the proper way to do this is and perhaps Labview has a trick up it's sleeve that I'm unaware of to get around this.

 

Thanks in advance for any suggestions,

Alex

Alexander H. | Software Developer | CLAD

0 Kudos
Message 1 of 6
(4,168 Views)
Solution
Accepted by topic author alexhunt

Flank the invoke node with two value property nodes of the control that needs to retain the value. Make the left one read and the right one write and wire them together. Connect the three nodes with a error wire to establish execution order.

 

The first read will place the value on the wire, which is then written back after the values have been reset to the default.

 

 

 

Message 2 of 6
(4,164 Views)

Simple and Straight forward ( I would say its out of the box 🙂 )

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 6
(4,148 Views)

Simple, elegant and in hindsight it should have been so obvious but it just wasn't.

 

Thanks so much for this. Smiley Happy

Alexander H. | Software Developer | CLAD

0 Kudos
Message 4 of 6
(4,119 Views)

Reading your question again, it seems that you want to clear all indicators, but not the controls. In this case an even better way would be to successively call the VI from a toplevel program and simply set the VI properties to "clear indicators when called". (see also)

0 Kudos
Message 5 of 6
(4,103 Views)

That's also a good tip for future use but in my case your first suggestion was spot on as there are also controls that should be reset as well.

 

Thanks again for the quick response and great suggestions.

 

-Alex

Alexander H. | Software Developer | CLAD

0 Kudos
Message 6 of 6
(4,067 Views)