Opening and closing VI references seems to consume a considerable amount of time if repeated once and again, so I recommend you to simply open ONE reference to the vi outside the while/for loop, and pass it through. You should close this reference when exiting the program. that will avoid opening & closig references all time... About your program, as long as I understood you, you are using sequences, well, this could be good if dataflow goes in that sense, else, you should use state machines selecting the action you need at every loop, not repeating initialize state every time, including when you exit... well hope this has helped you as I think the other answers did... Good Luck