Jump to content
  • 0

USB-1208FS-Plus, Digital Input Event Handler & Counter Input Debouncing Setup


jp07

Question

Hello All, 

We purchased a few USB-1208FS-Plus boards. 

We are using C# to develop a custom app for our system. 

Couple of questions: 

  • Can you tie an event handler in C# to one or to many of the digital inputs? If so, what function do we need to use?  
  • Does the 1208FS Plus have interrupt digital input ports/capability?
  • We have connected a momentary pushbutton to the counter input:
    • Any recommendations for de-bouncing the counter input? 
      • How can we control/force only one tick count per full actuation of the button? 

Thank you

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hello @jp07

17 minutes ago, jp07 said:

Can you tie an event handler in C# to one or to many of the digital inputs? If so, what function do we need to use?

Sorry no, the event handler is only to be used with an analog input scan.

18 minutes ago, jp07 said:

Does the 1208FS Plus have interrupt digital input ports/capability?

not a feature, to know the state of any of the digital inputs, you poll them in a loop.

19 minutes ago, jp07 said:

We have connected a momentary pushbutton to the counter input:

  • Any recommendations for de-bouncing the counter input? 
    • How can we control/force only one tick count per full actuation of the button? 

 

You would need to add an RC filter or capacitor to filter out the debounce. 

The amount or size of the capacitor will depend on the frequency you measure with an oscilloscope. 

There are many good sources for helping you with this on the internet, here a couple links:

https://www.circuitbasics.com/switch-debouncing/#:~:text=Switch bouncing is not a,changes in the switch signal.

https://www.digikey.com/en/articles/how-to-implement-hardware-debounce-for-switches-and-relays

 

Link to comment
Share on other sites

  • 0

Jeffrey, 

Thank you for your quick response and help. 

Concerning the de-bouncing issue, is there any software solution that can be integrated? - e.g. function in the MCC Universal Library (C#) that can solve this issue?

Does MCC offer any other boards/devices with the capability to do interrupts? 

I appreciate it. 

Link to comment
Share on other sites

  • 0
13 minutes ago, jp07 said:

Concerning the de-bouncing issue, is there any software solution that can be integrated? - e.g. function in the MCC Universal Library (C#) that can solve this issue?

There is no built in feature to 'tame' debounce, nor a UL library call.  It must be done externally.

22 minutes ago, jp07 said:

Does MCC offer any other boards/devices with the capability to do interrupts? 

The only modern product we offer with interrupt support is the PCIe-DIO24.

https://www.mccdaq.com/pci-data-acquisition/PCIe-DIO-Series.aspx

There is a UL example: ULEV01 for VB.net and C#.net

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...