Paul did a good job cleaning up the code.
While I don't completely understand the logic of the small inner while loop, I think you should eliminate it and instead use the outer while loop for the shift registers. Currently, your shift registers never clear between runs, thus their data can grow without limits, potentially leading to memory issues. (Especially since you run that loop at full bore without any wait). Here is one possible alternative if I understand correctly what you are trying to do. Look at the comments on the diagram (see image and diagram comments).
You reset the two indicators "complete" and "failure" on the left. Since complete gets written anyway as soon as the loop starts, you don't need to write the local. The current desing flow requires resetting "failure". For consistency, I would always define execution order. It is no big deal here, but if it were used as a control inside the loop, you could create a race condition if you don't ensure that it gets written before the loop starts.
For the failed timer in your case, I cannot reproduce it. Do the following:
Convert the "elapsed time" to a regular VI by opening its front panel. (right-click...open front panel. this will not do anything permanent to the installation!). Now open the "subElapsed time.vi", press "ctrl+m" to change it to edit mode. Save it under a new name elsewhere. Attach it here.
Now go back to the mani VI and press ctrl+z to undo. 🙂
Message Edited by altenbach on 06-15-2007 10:01 AM