LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I downsample a dynamic data stream?

I am using the DAQ assistant to gather a continuous data stream sampled at 1kHz from multiple channels. I want to downsample this data to 500, 100, and 10 Hz without having to run the program more than once. I've tried using the downsample mathscript but the output is sampled much less than I desire and I'm not really clear on the syntax used with this command. It seems like there has to be a straight forward solution to this. I'm just not too experienced with Labview yet. Any help would be greatly appreciated. Thanks
0 Kudos
Message 1 of 4
(4,404 Views)
You can simply decimate the array. Pass the array into a loop that pulls out only the elements that you need. For example, for the 500 Hz output index out every other element, for the 100 Hz output grab every 10th element and for the 10 Hz output take every 100th element. As with most things LV, there are at least a dozen ways of doing this depending on your circumstances. The best approach to take will depend largely on the structure of the rest of your code.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 4
(4,395 Views)
Hello Mike,
 
Thanks for the post.  Again, I'm not really familiar with Labview, so how do I index out only the 10th or nth element out of an array? and also can I put my dynamic data directly into an array from the DAQ assistant?  These questions are probably easy I'd appreciate any more help you can give me.
 
Thanks a lot.
samfrancis33
0 Kudos
Message 3 of 4
(4,368 Views)
Hello again Mike,
 
Actually I figured out how to do something I think will work using the mathscript box and the downsample function.  I also figured that I couldn't use the .tdms format to convert to an array.  If there is a way to convert .tdms to an array I'd love to know.  If anyone has an idea, please let me know.  Thanks again Mike.
 
Sam
0 Kudos
Message 4 of 4
(4,360 Views)