11-26-2007 12:34 PM
11-26-2007 12:51 PM
11-26-2007 02:35 PM
11-26-2007 04:21 PM
11-29-2007 02:14 AM
11-29-2007 11:05 AM
12-05-2007 08:11 AM
12-05-2007 08:22 AM
12-06-2007 03:42 AM
12-06-2007 09:30 AM
A good pattern is to move the write to file to its own loop. Look at the producer/consumer design pattern. You would create a queue at the beginning of the program. Feed that queue reference to 2 parallel loops. In the top loop where you do the DAQ, you enqueue the data. In the other loop, you have a dequeue operation to take the data out and write it to the file. You release the queue only at the end of the program after both loops have finished.
Depending on the speed of acquisition, you may not need to do this. In the VI you show, you've created a buffer, but it is really just another step in the process and is really not buffering anything. Data flow requires the data to go into the queue, and then it requires it to come right back out before the rest of the code can continue. The biggest problem is that the queue is getting created every iteration.