How are you running final.vi? Are you using the Run Continuously button? That button should not be used for routine operation of a VI.
The feedback node connected to elapsed time in the left while loop and the Output after indicator does not make sense for a top-level VI.
The code in the Formula node does not define output values for all possible cases. The formula node probably uses default values in those cases, but you have not documented that you want that. Hmmmm... I just ran a little test. It seems the Formula node retains the last value of an output while it remains in memory. This is a little strange as most LV functions generate a default output if the inputs do not define a value. The documention does not specify this behavior. I will have to think about that a while.
The final.vi is not the fully finished one. I will have tinker with it by running the actual tests using the equipment (although I have already ran these tests I have not completed the process).
But before that, I need to make sure the graph shows up properly. I am not really expert on Labview but I am good at general coding, thats why I used the formula node. Please let me know if there is a better way to do that.
I tried the solution you gave me and it seemed to work fine but my problem was different. I think I have finally found the right way to define the problem (Please see the attached vi).
The problem is that the outer while loop is actually a case statement which is triggered periodically. I have attached a new vi outlining the problem, this one has a case statement that is triggered by a square wave periadically. I would like to have the values to be accumulated in a environment like this.
I agree with Ravens Fan that you could benefit from the tutorials.
Here is a VI which show some of the things we have been talking about.