04-23-2020 04:48 AM
I'm having trouble obtaining the correct behavior when sampling Digital Input lines following an edge detection event. VI attached. DAQmx19.1, LabVIEW 2018, Win7 Pro, PCI-6515.
NI knowledge base articles suggest you need to read the port and mask for the bits your interest in. If I select "1D U8" in the DAQmxRead.vi it always returns zero. I'm running out of ideas of changes to make.
Solved! Go to Solution.
04-27-2020 04:59 AM
Hi bmann2000,
When our code doesn't produce the output that we expect, generally a good troubleshooting method is to compare the code with a known working example if possible.
I would recommend copying the code in this tutorial, knowing that it's an NI approved example for change detection. Using this as a base, it can help to decipher what exactly might be going wrong in the code that you attached.
04-27-2020 05:14 AM
I've added a circuit to clean up the edge of the Digital Signal. Now I'm seeing Events on P1.0 but not on P1.1. Should the PCI-6515 detect change on any pin on Port0, or only the pin denoted by the Task?
The question is more about what behavior I should expect. It would appear that I'm now not missing any edges but occasionally seeing an extra edge.
I've looked but failed to find a manual that explains the internal hardware components used for edge detection and how these are configured by the software.
04-27-2020 06:19 AM
Each line is monitored for a change individually. When a change is detected, a sample is take on all the channels defined by the task. This is explained here.
Page 1-4 of the NI 651x User Manual shows a high level block diagram of the hardware that is responsible for Change Detection.
Furthermore, page 2-3 goes into a bit more detail about how the Change Detection works. Specifically, an input change generates an interrupt and the device's driver notifies the software.
Ellin A.
NI Technical Support Engineer