In a large VI i need to implement a subVI which chooses between 3 schemes (already existing subVI is attached). The problem is each time I start the simulation the scheme chosen from previous simulation is retained. How do I initialise the boolean controls such that all schemes are unselected at the start of new simulation.
Solved! Go to Solution.
We don't have the RS_FlipFlop VI that this VI calls. So I'm guessing those are what you want to initialize. The simple way is to pass in a Reset boolean. So you initialize the values when the Reset is set to TRUE.
Sorry my bad, I've now attached the RS Flip flop subVI. My query is what do you mean Reset Boolean? And since the SingleSelect subVI is in the somewhere in the middle state of the state machine, should the indicators be reset during the initial state?
Yes but since the Single Select subVi is within a case structure within a while loop, every time u stop the program the values get cleared but when u restart the program and reach the state with the Single Select subVI the boolean controls get reinitialised to whatever the choice was in the previous iteration. How do I avoid this? Initialising the LEDs in the initial state doesn't help as the values are already set using the R-S flip flop.
Even your "singleselect.vi" is a subVI, as can be seen from the assigned connectors. Simple wire all false to the inputs when you call it. How are you calling it?
Du you want to initialize the shift register is the flipflop subVI? Use the "first call" primitive and some boolean logic.