06-05-2008 06:41 PM
06-08-2008 11:19 PM - edited 06-08-2008 11:21 PM
Hi mtaylor,
I understand that you are receiving some high frequency spikes in your signal that you would like to remove. I think the best remedy for the problem would be to figure out what is causing these spikes and how you can fix the problem in hardware. For a discussion on removing glitches or adding a debounce filter to a digital signal, please see the KnowledgeBase article linked here.
From what it sounds like, you are reading frequency using a counter input task and converting the frequency value into an RPM value. If you are reading continuous samples, you should have an array of values depending on the number of samples you are reading each time. If this is the case, you will have to actually check each value in the array to see if it falls within the range you are expecting (i.e. 10-100 Hz). If the value is above the expected range, you can simply coerce it to the maximum value you expect to receive. To do this, you can place a For Loop on your block diagram and pass the array into it. You will then use the In Range and Coerce function (found under Programming » Comparison on the Functions palette) and set a maximum and minimum value. Any value in the array that falls outside the expected range will be coerced. Please see the attached screenshot for an example of this. Also, please note that this solution will coerce out of range values, but it does not solve the problem completely. I would strongly suggest looking into the source of these glitches and how you can remove them in the hardware. Hope this helps,
06-09-2008 12:26 PM
06-09-2008 12:49 PM
06-10-2008 03:30 PM
06-12-2008 07:09 PM
03-22-2011 08:43 AM
i am facing the similar scenario!!! i am havng a magnetic pick-up with a screw fixed on rotating shaft.. i hav been trying to solve this problem but with no luck.! can anyone please post their
successful VIs?
thanks
03-23-2011 11:40 AM
Hi Crackjack,
Have you tried the example vi mentioned above and adjusting it to your application?
03-24-2011 04:07 PM - edited 03-24-2011 04:10 PM
Hi CrackJack,
Is the issue that you are picking up duplicate edges (i.e. "bounces")? Most of the newer NI DAQ products support Digital Debouncing Filters on the PFI lines. You can find more information about the filter in your appropriate hardware manual (e.g. X Series User Manual).
If you are using a device that supports filtering, you can configure it through DAQmx Property Nodes. If not, the retriggerable pulse generation mentioned earlier in the thread might be a possible workaround. External conditioning is also a possible solution if the other options are not suitable.
Best Regards,