From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measure Frequency

Solved!
Go to solution

Hi, first of all, happy new year!!

 

I have two problems and I hope someone can help me. Well, I need to measure the frequency of not well defined but periodic signals (filtered biopotentials) and I have to do it with a DAQ USB-6008. The measurement is based on a threshold, the idea is that when the signal crosses the threshold in a rising transition a timer catch, with shift registers, the instant period. It seems not very difficult but it doesn't work correctly.

 

Also, I need to graph the "actual frequency" vs. the "previous frequency", I can do it using an XYgraph but I'd like to know how to hold all the dots in the plot (it refresh by default).

 

Beforehand thank you for your time and attention.

 

pd1. Please see my VI file attached.
pd2. Sorry for my English, I'm not very good but I do my best.

 

0 Kudos
Message 1 of 3
(2,347 Views)
Solution
Accepted by topic author smarcial

The first issue I see with your code is catching the threshold.  The chances that your analog data ever matches up exactly with your threshold value is very slim.  With just a couple minor changes to your code, you can check if the value is greater than th threshold.  Put that boolean into your shift register and check for current condition is TRUE and previous condition is FALSE.

 

In order to store multiple points on an XY graph, you will need to build an array of the X and Y values you want to display and input the entire array of data points on the graph.

0 Kudos
Message 2 of 3
(2,264 Views)

Hi jjgors, your pieces of advice were so helpfulSmiley Happy. For store all the points on the XY Graph I opened the "Build XY Graph Properties" and disable "Clear data in each call", that was all.

 

Thank you very much. Have a good day.Smiley Very Happy

0 Kudos
Message 3 of 3
(2,231 Views)