01-31-2009 11:48 AM
I am designing a program that acquires data from 8 identical measurement devices (measuring displacement at approx. 1Hz). The numeric data is being stored in an array that is refreshed everytime a new measurement is taken. I would like each measurement device to record data to the filename in a corresponding filename array, but only when the button in the corresponding boolean array is depressed. Again, this data is refreshed at 1 Hz.
In the interest of simplicity, I was hoping to write data using an auto-indexed for loop, as shown in the attached image. However, in its current form it is creating a new file for each data point. Ideally I would like all data points for a given channel to be written to the same file, ending when the boolean is set to FALSE.
Anyone have any suggestions?
Thanks in advance.
02-01-2009 02:15 AM
Hi Bryan,
How do you configure your write to measurement file?
I configure as the one I show in attached screenshots, and everything is working fine.
Regards, Kate
02-02-2009 05:06 PM
Hey Bryan,
Kate has a good suggestion. Notice that in her configure.jpg that she has append to file checked.
Let us know it this helps.
Ben
02-02-2009 07:32 PM
02-02-2009 07:40 PM
02-07-2009 09:37 AM
I attempted this yesterday with the suggested config settings, but when each data point was written to a measurement file it reset the relative time so that all data points occur at time 0.
Still welcoming any suggestions or advice. Thank you!
02-07-2009 12:34 PM
Neither your data or your approach to saving it makes any sense to me. If you are acquiring data for multiple channels, you should have an array and a single Boolean associated with that array. The way your data is now, you associate a Boolean with each element in the array and I don't see how you are doing that. You need to post the code that is acquiring it. It would seem to me that what you should have is a cluster array. The cluster would consist of a data array and a Boolean.
Also, you have no time data at all in a an array of DBLs so how can you expect to save any timing information? If your data array was a waveform data type, then you would have t0 and dt information that would be written to file.
02-07-2009 01:54 PM - edited 02-07-2009 01:58 PM
It's very possible that what I am doing is unorthodox and perhaps a very silly way to do what I am trying to do - this is the first labview program I have written. As for timing information, given that my sampling rate is so low, the timing data comes from the time that the data is written rather than waveform time data. That may not be very smart, but I think it works for my application.
I will post the VI on Monday when I have access to my computer with the saved VI. Thank you for the continued help!