11-22-2013 11:02 PM
It looks to me like you probably have a loop inside of a loop situation. This is what is causing your poor resutls. To make it work, you need to take the logic that Sammy has given you and apply that to your loop. I.e. The shift registers should be a part of your outer loop (or which ever loop is acquiring the data).
A quick method for converting it to your loop is to connect the shift registers of the inner while loop to the outer loop (make it a shift register also) and then remove the inner while loop. See the picture below for a depiction of what I've described.
Let us know if this works for you.
11-23-2013 08:24 AM
I in fact I did it, I added a shift register for de data, but nothig change. The sum only take the las number, or the first, but is just one. I just have while lopp, but the bigger "while loop" is the while of all process, the other two lines are "case loop".
The data have to come from out of the while loop. I tested that in the Sammy's vi, and either works if the random generator is out of the while loop. How I can fix that
11-23-2013 08:10 PM
I could fix the problem. I had to include the adquisiction block (block 3 in the image) into the while loop, use its iterations counter (not the general counter) and change the loop conditional to "continuous" instead of "stop if". Thanks so much for your help, really helped me.