packstove Posted September 11, 2006 Report Share Posted September 11, 2006 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? Quote Link to comment
Chris Davis Posted September 11, 2006 Report Share Posted September 11, 2006 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. Quote Link to comment
mlasse Posted September 12, 2006 Report Share Posted September 12, 2006 Writing to disk seems to be the better choice in this case. If you Quote Link to comment
LAVA 1.0 Content Posted September 12, 2006 Report Share Posted September 12, 2006 If you Quote Link to comment
packstove Posted September 12, 2006 Author Report Share Posted September 12, 2006 You can find more information on this statement in your "LabView for Everyone" Third Edition on page 882 . Labview for Everyone? I am unfamiliar with that text. Can it be purchased from Amazon.com? Quote Link to comment
jhoskins Posted September 12, 2006 Report Share Posted September 12, 2006 Labview for Everyone? I am unfamiliar with that text. Can it be purchased from Amazon.com? Yes it can be purchased from amazon. Quote Link to comment
packstove Posted September 12, 2006 Author Report Share Posted September 12, 2006 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? Quote Link to comment
mlasse Posted September 12, 2006 Report Share Posted September 12, 2006 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? Correct, but you can save data in smaller seperate files inside one folder. Markus Quote Link to comment
LAVA 1.0 Content Posted September 13, 2006 Report Share Posted September 13, 2006 See this LAVA posting regarding LabVIEW for Everyone, Third Edition. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.