03-05-2025 04:40 AM
Hello NI Community,
I am working on a LabVIEW program using a NI PCI-6224 DAQ to detect digital input changes. My current setup:
port0/line0:15
port0/line29
(configured for rising edge detection)Now, I need to measure the frequency of change detection events (i.e., count the number of rising edges per second).
port0/line0:15
.I have attached my current LabVIEW program for reference. Any guidance, example VIs, or best practices would be greatly appreciated.
Thank you for your support!
03-05-2025 06:21 AM
3. Should I use Tick Count (ms), Elapsed Time VI, or another approach to calculate frequency?
Use another approach. Measure the frequency much more precisely and accurately with a counter task. Do this and the answers to your other questions follow along.
Open up a shipping example "Counter - Read Pulse Width and Frequency (Continuous)". In the example, right-click the 'Frequency Input Terminal' input and select "IO Filtering". Then check the box to "include advanced terminals." Maybe also limit to your desired device. After this, the drop down menu will make available an internal signal called the "Change Detection Event". Select that and start running the example.
Then run your change detection app which will start causing change detection event signals to pulse, and the example will measure the intervals between them and report them out as frequencies.
-Kevin P