Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Debounce counter signal, digital filtering not possible?

Solved!
Go to solution

Hey all,

 

When reading the signal from a flowmeter at lower flowrates, the signal bounces. Because these bounces are counted in addition to the proper pulses, this leads to an unreliable counter output. With a scope attached, I can clearly see the bouncing behavior and determined that bounces start to occur around 100Hz. The flowmeter should be accurate in the 1500 to 10Hz range. Removing every other device in the system that could influence the signal has no effect.

 

Bounces occur both on the rising and falling edge.

 

Because I use a compactDAQ 9188 chassis and a 9411 counter module it seems that it is not possible to make use of the digital signal filtering? I would like to establish that this is a correct assumption.

 

When adding a digital filter (see the attached VI) I get the following error explaining that enabling the filter is not possible.

 

digital filter enable.jpg

 

 

Updating to DAQmx to 9.2.3 makes no difference. 

 

I read about using a counter output to generate clean pulses (with a sufficiently high pulse width to bypass bouncing) here. For me this is not an option as I do not have a counter output module.

 

Are there any other ways to obtain a correct edge count output from the bouncing signal?

 

Regards,

 

Bram Visser

0 Kudos
Message 1 of 10
(9,261 Views)

Dear Bram,

 

To do this you need to perform a hardware timed counter task. In other words you need to configure a sample clock (DAQmx timing VI). Problem in case of a edge counting task is that you need an external clock to perform your edge counting on. If you don't have an external clock source the analog sample clock can be used to do this; you have to create an analog input task for this. The ai sample clock will start with the analog input task and based on the ai sample clock the counter will count the edges.

I modified your VI; please select the ai sample clock from your chassis, please select the correct counter and an analog input as well.

 

Best regards,

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 2 of 10
(9,234 Views)

Hey,

 

Thanks for your reply. Unfortunately your suggestion of adding an analog clock to the counter task does not solve my problem. I'm still not able to make use of the digital filter as the VI you modified still gives me the same error I described earlier. 

 

Maybe I don't understand you correctly, but adding an external sample clock should not influence the digital fiter property of the counter, right? I can use the counter to count edges, measure periods of the pulses or any other counter task without any problems/errors (aside from the fact that bounces in the signal give me some incorrect values). Only trying to enable the digital filter of the counter to debounce the signal gives an error.

 

On a sidenote, the updated VI attached here does contain a sample clock, but no matter what clock source I use (tried them all), I cannot enable the filter.

 

This is what I am trying to do: http://decibel.ni.com/content/docs/DOC-3766, but it seems that my hardware does not support it.

 

Regards,

 

Bram Visser

 

 

0 Kudos
Message 3 of 10
(9,224 Views)
Solution
Accepted by topic author bvisser

Dear Bram,

 

You are correct, digital filtering isn't suported with the second generation cDAQ chassis (like the NI 9188), I overlooked that one (I tested this with a 0172 chassis and that worked fine). What we can do is measuring at the same rate and filter the glitches in the software, please seee the following example .

 

Best regards,

Martijn S
Applications Engineer
NI Netherlands
Message 4 of 10
(9,220 Views)

Hey,

 

Thanks for the pointer, fortunately I already found that example and used it on a sidetrack for the system that we are developing. Nothing wrong with NI information availablility!

 

My problem is semi-solved. Too bad the newer chassis does not have digital filtering implemented. Is this planned to be made available in a future driver update?

 

Regards,

 

Bram Visser

0 Kudos
Message 5 of 10
(9,214 Views)

Hi Bram,

 

This is something we are strongly considering for inclusion in a future driver update.  It's too early to give any specifics or guarantees, but we hope to have the feature included with DAQmx 9.4 which is scheduled to release in Q3 of this year.

 

 

Best Regards,

John Passiak
Message 6 of 10
(9,201 Views)

Greetings, 

I just encountered this same issue.  

 

We ordered a $10K cDAQ-9178 chassis and associated modules only to find that the counter hardware didn't support debounce filters.  Since our test system is closed loop around an encoder's feedback, we were left with a system that doesn't function because of noise on the counter signal.  

 

I can't find anything in the specification document for the 9178 states that debounce filtering is not supported.  I understand that every piece of hardware can't support every feature, but if it's not supported it needs be be stated somewhere.  It's not acceptable that the only way to find this out that this feature is disabled is by physically trying to use it.  The specification for the $179 USB-6008 clearly states that Debounce/Glitch Removal on the counter is not supported, but no such information for the $1100 cDAQ-9178 chassis.

 

My workaround has been to use an additional daq board that supports digital debounce for counter measurements along with all the other cDAQ hardware.  

 

I was hoping NI can answer the following questions:

1.  Why is debouncing available on a low cost multi-function DAQ boards (i.e NI-USB-6210, 6211) and not on the higher cost cDAQ chassis?  

2.  Does an older version of the cDAQ-9178 chassis support debounce filters?  (i.e. First generation?)

3.  Is there any new information available as to when Debouncing/Glitch Removal will be available for the cDAQ-9178 chassis?

 

Thanks for your time and consideration.

Steve 

0 Kudos
Message 7 of 10
(9,130 Views)

This link provides information on a possible work around...

http://digital.ni.com/public.nsf/allkb/9ECE7DBE7DF338BD86256F8600734A41

0 Kudos
Message 8 of 10
(9,109 Views)

Hi Steve,

 

I do apologize for the inconvenience.  Digital filtering should be added for the 9178 in the next version of DAQmx (9.4) which will release later this year (think NI-Week timeframe).  To answer your questions to the best of my ability:

 

1.  The "2nd generation" cDAQ chassis was initially intended to support digital filtering on release.  Due to the complexity of the routing on the gen II chassis, implementing digital filtering was a bit more complicated than originally thought, and the feature was pulled with the understanding that it would be added in at a later date.  The software group that develops for cDAQ was then occupied with the release of the 9188, 9181, and various other green-measured projects and so didn't have the bandwidth to go back in and add the feature until recently. 

 

2.  "1st generation" cDAQ refers to the 9172.  It does support digital filtering (similar to M Series DAQ).  The 9178 does not yet have software support for digital filtering but it is coming soon.  The 9178 filtering will be very similar to what is currently offered on X Series (see X Series User Manual) except it uses an 80 MHz timebase instead of 100 MHz. 

 

3.  Digital filtering will be available on the 9178 via a software update some time this fall (DAQmx 9.4).

 

 

Best Regards,

John Passiak
0 Kudos
Message 9 of 10
(9,068 Views)

The link you posted unfortunately isn't going to help enable digital filtering on the 9178.

 

M Series and earlier as well as the 9172  only had software support for digital filtering as part of counter tasks.  The hardware actually has a filter per PFI line, so you can technically filter things like Sample Clock and Triggers which are not part of counter tasks.  The workaround to enable filtering on terminals not supported by the driver would be to configure a dummy counter task as shown in your link.

 

The developers added several new filtering property nodes that support X Series for many other terminals so the old workaround isn't as relevant for the newer hardware (you can just directly configure the filters through the new property nodes).  The 9178 should have the same support for the new properties once filtering is added in.

 

 

Best Regards,

John Passiak
0 Kudos
Message 10 of 10
(9,061 Views)