Thank you all for your responses. I made some of the changes suggested, but due to time constraints (I probably don't have time to switch to a completely different architecture) and other issues, I could not fix everything suggested.
altenbach:
The files do indeed grow without bound, at a rate of roughly 200 MB a month. The computer that is being used has 4 GB of RAM and a Core2 Duo processor, so I guess I just thought it could handle it for up to 3 months (the longest period of time it would be on for one run). I guess that would mean that every 5 seconds a large file would have to be read into memory to display the data on the XY graph. Unfortunately, I don't see a simply way to get around this. I guess if the user could look at a subset of the data in the top loop as the data continues to be written in the bottom loop, it would ease the load on the processor, but I am not sure how to create a movable window to look at the past data. I am also not sure if populating the table with all that data means Labview has to keep a copy of all that data in memory for both the table and the graph. I guess the chances are that is the case.
As for the while loop in the event structure, I am not sure of a simpler way to build a user interface where you can start and stop the acquisition or do other things while the acquisition is running. Is that so bad? I initially tried to do a producer/consumer architecture, and couldn't get it to work. I don't have much formal Labview training and so most of what I do is from examples. I just could not figure out how to control the flow of the program and don't fully understand the VIs used in design pattern example (queue handlers, semaphores, etc).
The time polling and was used instead of a timed loop because initially, the users wanted to be able to change the rate of acquisition on the fly. So, sometimes they are interested in data once every second, usually once every 5 seconds, and occasionally once per minute. That design requirement was also why I created and destroyed the task within the loop, because I wanted to be able to change the rate on the fly. I thought the timed loop required a preset rate that could not be changed while the acquisition is going. However, in the interest of time and to try to eliminate this bug, I did go ahead and pull out the task creation and destruction from the loop.
Gabi1:
I also changed the file reading so that opening of the file only occurs once, outside the loop rather than every iteration. That worked fine. As an attempt at a quick fix, I also put in a request deallocation at the end of the loop. As for the large diagram, I will try to improve in future programs (more subVIs, etc). I have always had a hard time keeping my programs on one screen without using ugly and confusing stacked sequence structures.
Ben:
Do you think this could easily be converted to a producer consumer architecture, and if so, where are some good examples? I couldn't find good examples where data is generated in one loop and displayed in another, only a general picture of the design pattern. I probably could devote about one day to fixing this issue and I am certainly not a Labview pro.
All:
One thought I had to reduce file size and processor overhead was to write data to a .txt file and a binary file in parallel so that Labview could read from the only the binary file but the user would still get the benefit of the txt file for simpler post-processing. In Matlab (which I am much more comfortable with) you can easily save the same type of data as either text or binary, but it seems a little more convoluted in Labview, and I couldn't get it to correctly read the binary information back from the "Write to binary" VI. This may be a little bit of a vague question, but if I wired the same data into both the "write to text" and "write to binary" VIs, how to I read back the binary stuff correctly? Also suggestions on making a "data window" so the user could scroll back only looking at portions of the file would also be appreciated, so that the entire file does not have to be read in during every iteration, just the most recent portion, or if desired, a window going back in time to search for an event in the data that occurred previous to the window.
Thanks a lot!