11-11-2009 09:42 AM
I'm developing an application to work with an M-series daq card and labview 8.5 to output a signal and then record on 8 differential inputs for a short period of time (~10 ms). I need to stack my data, however, because the incoming signal will be very, very small, even after amplification. So basically i'm running a slightly modified version of the multifunction Synch AI-AO.vi (included with the install of daqmx). What is the best way for me to rerun this vi a set number of times and add new data directly to the old data (not cat-ing or anything, like |sample 1 of run 1| + |sample 1 of run 2| = stacked stample 1).
A slightly modified version of the mutlifunction synch AI-AO.vi is attached.
11-11-2009 10:08 AM
11-11-2009 10:34 AM
Sorry, I should have been more specific. I'm still kind of new to labview and I'm still caught off guard at how easy it makes some things.
Right now I'm writing my all my data with the Write to Measurement File vi. If I want labview to add these files together should I just keep my vi how it is, but instead of the express write to measure file vi, write it to a spreadsheet
Then read that data back into an array
Read a storage file into an array
Add the two arrays
Write the new array to a spreadsheet file into the storage file
If I'm acquiring my data as a waveform will this method work? Is there a smarter way to do this?
11-11-2009 11:25 AM
Could you avoid the multiple file writes and reads by writing the waveforms to an array? Is it possible to do the equivallent of n=n+x, where n would be the storage array and x would be the new data? and then write that array to a file?
Do the waveforms need to be written into an array or is it possible to add waveforms? From what I've read it doesn't seem like adding waveforms is built in.
11-11-2009 11:25 AM - edited 11-11-2009 11:27 AM
Hi LSU,
see attachment on how to "stack" several measurements. I simply add the waveforms and use a shift register to keep the last iterations value.
Writing to files in each iteration is extremly CPU consuming - especially with express vis. Using for loops for just one iteration is "senseless". You could enable the conditional terminal of the for loop to realize your stop feature.
For your message 4:
Have you ever tried all the things you asked for? Sometimes it's easiest to just try&error ![]()
And for the "n=n+x" question: It really helps to take the free online courses offered by NI!
11-11-2009 02:54 PM