LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can you maintain indicator status

When using a state transition design pattern, I usually place all my controls/indicators inside the while loop around the case structure so that they are accessible to all states.

 

When doing this I find that I am having to "maintain" indicator status if an indicator is not otherwise wired within a state.

 

For example, if I have two states (state A and state B).

State A sets LED to TRUE if a condition is met and state B updates string indicator to "Wecome" if a condition is met.

If I transition from state A to B, I have to wire the LED indicator to a shift register which stores the previous value of the LED so that I can "maintain" the value set in state A when in state B (and same applies for the string indicator when transitioning from state B to state A).

 

Is there an easier way of "maintaining" the status of an indicator if it is not required to be wired in a particular state?

There is an option to "use default if unwired" but is there a similar option to "maintain current state if unwired"?

 

I find that my VIs are a little over-crowded when it comes to large complex designs and this would help a great deal.

 

Thanks

0 Kudos
Message 1 of 2
(2,171 Views)

No, the shift register is the correct solution.

 

(You could also place the indicator inside a case structure and wire a true out of all cases of the big case structure when the indicator needs to be updated. Make the boolean tunnel to use default if unwired, so all other cases give a false and don't update the indicator.)

0 Kudos
Message 2 of 2
(2,169 Views)