From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Debounce reed switch contacts in FPGA

Solved!
Go to solution

To my compactRIO with FPGA I have a C-series Digital IO (9401) with a RED relay on four different inputs. The relays creating contact bounces within 200µs at closing. I would like to debounce the input signals, Which are digital, for period time measurements.

Since I am new to the system it is not obvious to me how to solve this in the FPGA. There are a few ideas on this forum for similar problems for use in the host computer. However, they are to slow and not possible implement in the FPGA.

 

I would appreciate some ideas on this task.

 

0 Kudos
Message 1 of 3
(3,281 Views)
Perhaps a small debounce capacitor may solve your problem. Google debounce capacitor. It is just a tip


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 3
(3,272 Views)
Solution
Accepted by topic author hasun

Typically digital debouncing involves a small state machine which requires that the input stay in the new state for n clock cycles. It resets if the input reverts before the timeout.  This should be fairly easy to implement in an FPGA, although I have not worked with them. For your case n would be selected to result in a time larger than 200 us.

 

Lynn 

0 Kudos
Message 3 of 3
(3,269 Views)