01-04-2012 01:31 PM
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.
Solved! Go to Solution.
01-16-2012 02:30 PM
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.
01-23-2012 02:18 PM
Hi jjgors, your pieces of advice were so helpful. 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.