|
Re: Writing a 2D array to a .csv file inaccuracy
If you turn on execution highlighting and run the VI I think you'll find that you have race conditions caused by using too many local variables and too much parallelism that isn't specific enough.
When your while loop begins, you have three parallel pieces.
1. Read the stop button and determine if the loop will run another iteration.
2. Take whatever value is in Iteration # and put it in the file.
3. Run the loop to completion
There are three locations where I think you have used a local variable but should instead use a wire. Local variables are useful for UI programming and as a simplistic communication between parallel loops, but if you use them instead of a wire, just to make it look pretty, you need to be very aware of race conditions. You just told the compiler that you don't care about sequencing the operations with this data.
Greg McKaskle
|