08-03-2017 07:45 PM - edited 08-03-2017 07:47 PM
Currently stuck on a project that measures voltages on 12 channels using cDAQ-9188 and modules 9239. The Daq ni-9239 will coerce my data rate to only allow 1.6khz because that is all it supports, The measurements I need have to be at 100hz. I found the example below but Its configured to down sample 1khz to 250hz. I tried changing my numbers and to only sample 200 times making my sample rate 200hz from 2khz. The issue I'm seeing is when I go to graph my acquired data there are gaps. What can I do to fix the gaps or is there a better solution on how to Down Sample an Array of Waveforms. I am using the template from the Example Projects (Continuous Measurement and Logging). Can I please get some help with this issue of having to down sample and graphing my data. The data is being put into a queue and continuously being graphed in a separate while loop. Thanks!
Solved! Go to Solution.
08-03-2017 08:51 PM
I don't have LabVIEW here to confirm, but I believe there is a resample waveform function in the Signal Processing pallet.
08-03-2017 09:42 PM
I do not have LabVIEW here either to look over your VI, but the example you linked to would NOT be the correct way to down sample the data.
First you need to low pass filter your data, for your case put the pass band at 160Hz and then you down sample the data from 1.6kSa/s to 320Hz.
If you skip the low pass filtering then you run the risk of aliasing your signal and getting an incorrect result.
I suggest you check out the VI crossrulz suggested, it will correctly apply the filtering according to the help.
Cheers,
mcduff
08-03-2017 11:51 PM - edited 08-03-2017 11:54 PM
Does this look correct? I found a similar example and thought this looks correct? My sample rate and samples per ch would be running at 2k
08-04-2017 10:28 AM
I will be away from my desk for awhile doing some work that pays the bills.
At first glance it looks okay, however, I would change the interpolation mode to FIR filter instead of Coerce in the resample VI. It looks like the defaults are good for the FIR filter.
Cheers,
mcduff
08-04-2017 12:28 PM
Thanks mcduff and crossrulz, This seems to be working. I really appreciate your help.