LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Daqmx data acquisition with persistent nyquist error

Solved!
Go to solution

Hi, I have created a multi channel data acquisition vi (2 accelerometer and 1 sound pressure) using producer consumer model.   The vi is attached. Using labview 2011.  I keep getting nyquist error (attached 2) when doing a bandpass filter between 50 to 5000Hz.  This happens despite having set my sampling rate at 22050Hz.  When I checked the wave output I noticed that the signal has a dt of 1s.  The text output verify this findings.  I could not figure out how this is so since I had set the sampling rate at 22k Hz.  Any help will be much appreciated.  Thanks.

Download All
0 Kudos
Message 1 of 6
(2,477 Views)

Hi Crawling,

 

it's because you set your waveform constants (used to initialize the shift registers) to a dt of 1...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(2,457 Views)

Thanks for the pointer.  I need to intialize the shift register so that time is not carried over to the next sampling.  I have got the values in the waveform constant by default.  I tried removing the value 1 but I keep getting zero for dt  and eventually an error in the filter as well.  Should I just put in the value, 0.000045 s  (1/22050) assuming that the sampling was correctly performed at 22050Hz.  I would rather be assured by the actual sampling rate.  How then should I overcome this situation.  Thanks

0 Kudos
Message 3 of 6
(2,445 Views)
Solution
Accepted by topic author Crawling

I would do something like this.  You should calculate the dt from the set sample rate (with the recipricol) and use that to initialize the shift registers.  This way you only have to edit 1 constant if you have to change your sample rate.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 6
(2,433 Views)

It seems that the problem is not at the shift register.   The issue persisted despite removing all the waveform constant from the shift register.  I think the source of the problem is at the obtain queue.  The dt for waveform array constant is 1. 

0 Kudos
Message 5 of 6
(2,420 Views)

GerdW and crossrulz were right.  It is the shift register.  Thanks. 

0 Kudos
Message 6 of 6
(2,417 Views)