11-14-2012 07:36 PM
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
Solved! Go to Solution.
11-14-2012 07:41 PM - edited 11-14-2012 07:46 PM
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.
11-14-2012 10:38 PM
Simple and Straight forward ( I would say its out of the box 🙂 )
11-15-2012 10:53 AM
Simple, elegant and in hindsight it should have been so obvious but it just wasn't.
Thanks so much for this.
11-15-2012 11:30 AM
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)
11-16-2012 10:55 AM
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