Example Code

Using DAQmx Counter Digital Debounce Filter with 660x Family

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Data Acquisition (DAQ)

    Software

  • LabVIEW

    Driver

  • NI DAQmx

Code and Documents

Attachment

Overview

This example explains how to use the Counter Digital Debounce Filter for the 660x family. This filter dismisses any input pulse shorter than the duration of a filter pulse.

Description

The code first configures the Counter Task to count Edges. The Counter being used is specified then a property node is used to enable a digital filter. Once the filter is enabled, the minimum pulse width needs to be specified in order to allow for very small signals to be processed while still allowing for a debounce time. 

Requirements to Run

Software

  • LabVIEW 8.6 or compatible
  • DAQmx 8.7.2 or compatible

Hardware

  • Examples is written for the NI 660x Digital I/O (DIO) family.  May also work with other NI DAQ devices, untested.

Steps to Implement or Execute Code

  1. Download and Open the Example
  2. Verify your hardware is connected to your computer
  3. Confirm the proper information is entered as the counter identifier
  4. Specify the minimum Pulse Width that count edges will count
  5. Enable Digital Filtering
  6. Run the code

Additional Information or References

Block Diagram

filter.JPG

**This document has been updated to meet the current required format for the NI Code Exchange.**

Francisco Arellano

National Instruments Mexico
Field Systems Engineer - Energy Segment
www.ni.com/soporte

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Todd S.
NI Employee (retired)
on

Thanks for posting.  Please add LabVIEW to your tags and rename your atttachment to include the LabVIEW verison.

Todd S.
LabVIEW Community Manager
National Instruments
Contributors