06-10-2011 09:25 AM - edited 06-10-2011 09:33 AM
Sorry - I'm not sure I understand what the criteria are. As I understand it, you can only write an array, not a cluster i.e. if I wan't to record data of more than one data type (e.g. a time stamp and some data) I have to do it in two separate write operations, which is effectively what I do currently. Also, you can't write more than one group at a time (?), so that means that I have to write one group and then the other, which sounds like its outside the criteria for "one header only"
thanks
Niall
06-10-2011 11:17 AM
Niall, I think your fix will be to go to "decimated" (default) layout instead of interleaved. to do this for a single sample of N channels, drop a build array on the data wire to make the data array 2D, then transpose it so data are in rows, not columns. This will work around the failure of NI_MinimumBufferSize to work with the interleaved layout.
06-13-2011 03:09 AM
You mean record each data point as another channel? This would obviously forgo the channel name metadata? To be honest - the simplest thing looks like its to do what I was going to do before I found out about this buffering which was just fill up an array with the data points and write this once when I change files.
Thanks for figuring out what the problem was though.
Niall
06-13-2011 08:19 AM - edited 06-13-2011 08:25 AM
no, just change the data layout input constant from "interleaved" to "decimated", and rearrange the data inputs to match.
interleaved means that you write a sample at a time: for a 2d array that would mean each row is a sample.
decimated means that you write a channel at a time: a 2d array would have each channel in a row, or in other words each sample is a column.
what you have is a 1d array that is one sample. wire it to a build array node to change it to a 2d array. now it's a an array of size Nx1: one row exists in the 2d array. Transpose this array to get a 1xN array: one column of N channels.
to illustrate:
Oh, and you only need to do this where you are writing an array of channels. The documentation says that all channels in a group need the same layout setting. You can change your single channel writes (time) from interleaved to decimated without rearranging the input array.