LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to measurement file gives a buffer error if the vi is run more than once

I am new to labview and trying to write a simple program to display and write voltage data to a file from a daq. The program is working but if I run the vi, select the output file, stop the vi, and re-run the vi, there is a data no longer available error. Is the daq still filling the bufer when the vi is stopped? I read somewhere that the daq assistant should not be in a while loop but I can not find a simple way of doing this without it in. In the mean time everything works fine if I just select continue after the error or close and open the vi every time.

 

A couple smaller issues...because the data inputs are converted to double ther are no column headers in the output file. Is there a simple way to add these in? I would also like to set up an input to the file name on the front pannel where I can just type in the name with the folder already set but I can't seem to figure out how to use the file path input on the front pannel. I am using Labview 2009

 

LabviewBlockDiagram.PNG

 

 

 

 

Message 1 of 2
(2,898 Views)

EMM81 wrote:

A couple smaller issues...because the data inputs are converted to double ther are no column headers in the output file. Is there a simple way to add these in? I would also like to set up an input to the file name on the front pannel where I can just type in the name with the folder already set but I can't seem to figure out how to use the file path input on the front pannel. I am using Labview 2009 


Sorry, I don't have access to DAQ at the moment, but let me give you some pointers to simplify your overly complicated diagram.

 

  • All your FOR loops are not needed. There is a "mean" in the statistics palette, and there is even a statistics express VI that can calculate the mean of dynamic data.
  • Delete all the extra numeric indicators and "right-click the charts...visible items... digital display", now move the digital display wherever you want, e.g. to the location of your current digital display. Result: Half as many terminals on the diagram---> simpler code that is easier to maintain.
  • ...

 

0 Kudos
Message 2 of 2
(2,889 Views)