From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-18-2011 04:41 PM
I'm using LabView 2009 Fall and I want to resample multi channel data (2D array) continously. This means that I need a resample function with one filter stage per channel. Is there any subVI available that I can use? I can only find VI's for one channel at a time and this doesn't work since they don't provide initial conditions; they only have initialize/continous.. I want the VI to pad the data automatically so that the data lines up with the unfiltered data and so that I'm not losing any data.
Thanks
Solved! Go to Solution.
05-19-2011 06:49 PM
hi mrsound,
I am not clear on your desired application, but from my understanding you should look in the LabVIEW Examples (Help> Find Examples). Depending on what kind of reading you are expecting, this path may change, but for an example I am using Voltage readings: click Hardware Input and Output > DAQmx > Voltage > Acq&Graph Voltage-Int Clk.vi
Once you open this VI, go to the front panel, and select your device. Then, to read multiple channels, select multiple channels in the drop-down menu or use a colon (for example, a0:2 to read channels 0, 1, and 2).
Hope this helps!
~kgarrett
05-19-2011 06:59 PM - edited 05-19-2011 06:59 PM
Thank you, but I don't understand how this will help me. I wrote resample..
I have a huge data set and therefore need to process it in chunks. For this I need a continuous multi channel resample function.
05-19-2011 07:00 PM
hi mrsounds,
My apologies for misunderstanding you. So you are not actually reading from different channels, as much as you are trying to pull certain sections off of a
spreadsheet?
~kgarrett
05-19-2011 07:27 PM
Sorry for being unclear. I will try to explain..
I'm trying to process a huge multi channel data set that is saved in a binary file. Since the file is so huge I cannot read it all into memory; I have to do all my processing in chunks. The multi channel data in the binary file is saved interleaved, which means that the different channels are all mixed together, and I don't want to chunk through the file more than ones.
The first step in my processing of the data is to resample it. Therefore I want a resample function that can process one chunk at a time and remember the filter stages for the different channels separately. Then the chunk is passed on to my second processing step.
05-20-2011 04:05 PM
Never mind..
Seems like the built in resample function actually can handle multiple channels at ones if I wire a 2D array to it. 🙂
05-20-2011 05:01 PM
ah, now I understand. Have you actually written this file yet? If not, I would highly recommend you write a TDMS file (a specialized form of binary, with headers which distinguish the data from each channel). If you have already written it to a binary file, you will need to reverse the write and then re-write it into a TDMS file. The TDMS pallette (under File I/O in LabVIEW) will do exactly what you need. If you want to use the binary file you already have written, you can progromatically parse through it, but you will need to know exactly how the data is stored. For example, you could find the total length of the file, then divide it by the number of channels you are reading from, then iterate through and pull every section of that length. However, if any of the bit lengths are non-uniform, or you get off by one bit, your data will be completely skewed.
If you need any further clarification on this, please let me know. Thanks!
~kgarrett
05-20-2011 05:41 PM
Thanks,
The original file is a wave file (and I think all of them are interleaved). This perticular file is from a data recorder that even adds extra information to the wave file, for example scaling factors. I can read all information with my custom made reader, following the manufacturer's file specification. Then I add even more information and save it in my own similar format.
05-23-2011 09:38 AM
so, the built in resample function does what you need? If so, please post where it is in the functions pallette and tag that as a solution. Thanks!
~kgarrett
05-23-2011 11:37 AM
@kgarrett88 wrote:
so, the built in resample function does what you need? If so, please post where it is in the functions pallette and tag that as a solution. Thanks!
~kgarrett
Signal Processing -> Signal Operation -> Rational Resample 🙂