From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-18-2011 03:41 PM
Greetings,
I am new to labView and do not have very much experience. I am trying to write a VI that collects data and writes it to a file. I run the VI and get a window that asks where I would like to save the file and what to name it. After specifying a name and location and allowing the VI to complete I open the file that I just wrote. The problem is that there is a jump in the data, it will give the data collect on the first iteration of the VI but then there will be a jump in time and data. The jump, I am assuming, is because the VI will not collect data until after I have specified the name and location of the file I am writing to. How can I set up the VI so that there is no jump in data collection? I have attached a file with some sample data that I collected. The 'jump' is circled in red.
Thanks in advance!
07-18-2011 03:50 PM - edited 07-18-2011 03:52 PM
Try this. By naming the file before hand using a file path control (or a constant on the block diagram), it will write to the file without prompting.
07-18-2011 05:05 PM
What are you doing with the data once you've collected it? Pulling it into Excel?
C
07-18-2011 05:09 PM
I am storing it on a USB drive so that I can access it on other programs such as matlab.
07-18-2011 05:20 PM
Looks like your data is just a tab delimited text file? Are you just manually starting and stopping the daq process or are you dialing into a set of parameters and taking a specified number of points or what?
07-19-2011 08:17 AM
Yes, my data is a tab delimited text file. The VI is set up to collect a specified number of points and then stop running.
07-19-2011 09:21 AM
Have you tried what I recommended? Are you still having issues or is the problem resolved? If not, post your VI.
07-19-2011 04:15 PM
Thank you all for you comments and suggestions. I believe I have discovered the problem. I had originally had the write to measurement VI inside of a loop that did not stop until a button was pressed. Doing things that way LabVIEW needed to decide when to write the data to a file and it chose to do it after the first x number of samples, which was specified. The was I have it now is that there is not an 'infinite' loop and the program stops after a set number of samples is recorded. This way LabVIEW records all the data and then asks me where I want it write the data.
Thanks again for all the input!