Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Storing ASCII into Memory and writing this to an open file

Hi,
I have a program that reads in ascii from a COM port and writes this to file. At the moment chunks of data are lost as the loop waits to refresh the file write action. Judging from some of the forum discussions I think that the write to file should be outside of the while loop but don't know the way of going about it. I have tried this, but it only writes the last string value that occured when the while loop ended. I know that the amounts of data that need to be collected before the loop ends is small <1Mb so could be stored in RAM with no problem.
 
What is the best method of storing ascii into RAM and then off loading it to my file?
 
Thanks
 
James
(Labview 6.1)
0 Kudos
Message 1 of 2
(2,885 Views)
The problem that you are seeing with the loop passing out only the last value obtained is because its acting as a classic output tunnel. If you want to build up an array for the data generated and then pass the array out of the loop when it finishes; right-click the output tunnel and enable autoindexing. This will now pass out the entire array instead of the last iteration scalar value. Hope this helps!
0 Kudos
Message 2 of 2
(2,873 Views)