06-15-2017 09:30 AM
Hey all, I have a front panel where I want to change the visibility status of various nodes based on the system state. Right now, my vi's unlock state looks like this:
Is there any way to condense this such that I could send Visible =(true), for example, to all the desired controls/indicators? Even if I could only send it to my desired bool controls/indicators, that would also save space (and wiring time).
06-15-2017 09:49 AM
For common properties like "Visable" "Enabled", etc you can use an array of references to the affected controls and indicators.
For unique properties like "value" I will bundle up references and use a sub-VI to apply the changes.
Ben
06-15-2017 10:03 AM
Maybe, you could do something like this in another vi once you save your original. This example will turn all controls and indicators visible/invisible and would need a case statement within the loop for finer control.
06-15-2017 10:18 AM
@Minions wrote:
Maybe, you could do something like this in another vi once you save your original. This example will turn all controls and indicators visible/invisible and would need a case statement within the loop for finer control.
I had thought about using a for loop, but would there be a good way to eliminate the delay between each Ctl becoming visible as the loop cycles through the array?
06-15-2017 10:26 AM
@ATE-EGNE wrote:
@Minions wrote:
Maybe, you could do something like this in another vi once you save your original. This example will turn all controls and indicators visible/invisible and would need a case statement within the loop for finer control.
I had thought about using a for loop, but would there be a good way to eliminate the delay between each Ctl becoming visible as the loop cycles through the array?
You would need a very slow machine to be able to spot the delay.
But if you did you could use an "deferFPUpdat" node to defer front panle updates BEFORE the For loop and then un-defer the updates when done.
Ben