Using Digital Change Detection with NI-DAQmx for LabVIEW

Updated Dec 19, 2017

Reported In

Software

  • LabVIEW Full
  • LabVIEW Base

Driver

  • NI-DAQmx

Programming Language

  • LabVIEW G

Issue Details

  • How can I implement change detection interrupt event feature on my DAQ device with NI-DAQmx for LabVIEW?
  • Where can I route my change detection pulse in my DAQ device? 
  • Do I have to have a task to utilize change detection?

Solution

This article applies to devices and modules that support change detection. Digital change detection can be configured using the DAQmx Timing VI by setting the polymorphic selector to Change Detection. Under this mode you provide the channels to monitor for change detection. A sample will be taken upon detection of an edge. Each line is monitored individually; a detection on any line will cause a sample to be taken on all channels defined by the task.  
A change detection event can be used as a signal source. When a change is detected on one of the monitored lines a logical high occurs on the ChangeDetectionEvent internal physical channel. This can, for instance, be used in other tasks as a trigger source. Even though only one task can monitor for change detection at a time, any number of tasks can use the ChangeDetectionEvent as an input signal. 
The Change Detection signal is also available to export through the Export Signal VI.
 
The ChangeDetectionEvent can only be configured by the DAQmx Timing VI as above. If you wish to use the ChangeDetectionEvent line without using the digital edge detection as a sample clock, you must create a "dummy task" that uses Change Detection for its timing. Setup a task on an unused physical channel and configure the timing. Use a DAQmx Read to prevent buffer overflow. Alternatively, configure the DAQmx Read OverWrite property to Overwrite Unread Samples and use the Is Task Complete VI instead of a Read VI. See configuration below.
 

Additional Information

See the Digital Change Detection in NI-DAQmx for more information about Digital Change Detection.

WAS THIS ARTICLE HELPFUL?

Not Helpful