Jump to content

Build Array or append file


Recommended Posts

What in your opinion would be the best way to collect data in Labview? My data aquisition code retrieves data from a buffer in 10 sample blocks (an array with n columns and 10 rows). Currently I am using a shift register in a while loop to pass the previously built array from the output of the build array function and appending the array with the newly retrieved data array. At the end of the aquisition I then write to a spreadsheet file. The thing is that i am collecting data for an 8 hour period at 1 sec per sample. Is there a limit on how much data can be built in an array? or am I better off appending directly to a file? Also, if I build this size of an array, how much will this slow my code down?

Link to comment
What in your opinion would be the best way to collect data in Labview? My data aquisition code retrieves data from a buffer in 10 sample blocks (an array with n columns and 10 rows). Currently I am using a shift register in a while loop to pass the previously built array from the output of the build array function and appending the array with the newly retrieved data array. At the end of the aquisition I then write to a spreadsheet file. The thing is that i am collecting data for an 8 hour period at 1 sec per sample. Is there a limit on how much data can be built in an array? or am I better off appending directly to a file? Also, if I build this size of an array, how much will this slow my code down?

You are probably better off writing straight to disk (appending to file) at that sample rate. You will also have the data on disk, in case of a power outage or operator error which might cause your program to crash. If you write at 1 sample / second your computer should be able to keep up, unless you are writing a lot of data or have a slow computer.

Link to comment
You are probably better off writing straight to disk (appending to file) at that sample rate. You will also have the data on disk, in case of a power outage or operator error which might cause your program to crash. If you write at 1 sample / second your computer should be able to keep up, unless you are writing a lot of data or have a slow computer.

But, if the file is open and the program crashes durring a write to file, there is still going to be a chance of file corruption and loss of the file correct? Or will previously saved data be recoverable?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.