Your inner while looop only runs once per each iteration of the outer while loop. You feed it a Closed enum into the shift register. Inside the loop it compares the value in the shift register to Closed then stops.
Thanks for the suggestion, how can I achieve the three conditions in the flow cotrol valve as per the VI.
Please can yu give some link, hint or modification. Its urgent.
Why did you remove the state machine?
Looking at your previous attemt you were somewhat close, take a look at this and modify as needed.