How Do I Handle Digital Change Detection Events In LabVIEW?

Updated Jun 5, 2018

Reported In

Software

  • LabVIEW

Driver

  • NI-DAQmx

Issue Details

I can set up a digital change detection task with the DAQmx API in LabVIEW, but I do not know how to handle the change detection event in software.

What is the proper way to handle change detection events in LabVIEW?

Solution

The best way to handle a change detection event in LabVIEW is with an event structure. The image below shows how to set up an event structure to execute on a digital change detection event.

Additional Information

Change detection can be described simply as:
  1. Monitor change of state on selected input lines
  2. Change occurs
  3. The device generates an interrupt 
  4. The driver notifies your software
  5. You may read the input lines to determine the current line states

Change notification is still considered unstrobed I/O because the maximum rate of change notification is limited by software response time and varies from system to system.  When the board notifies you of the changes, it does not report which line changed or whether the line rose or fell.  After a change, you can read the input lines to determine the current line states.  Note however that it is possible the state of the lines can change before the software has time to respond

WAS THIS ARTICLE HELPFUL?

Not Helpful