06-08-2013 02:42 AM
Hi,
I'm new to LabVIEW and have got a basic question here. I am acquiring frequency data from a QCM which I want to process in order to display the mass change on a chart in real time!
I've got a formula which says f1-f2 = const*dm (dm is change in mass)
so I want to calculate f1-f2, f2-f3, f3-f4 and so on.. I know the concept of shift registers but am not able to implement it in my circuit
I've attached the VI. Please guide me.
Thanks in advance!
Solved! Go to Solution.
06-08-2013 04:30 AM - edited 06-08-2013 04:31 AM
Hi netra,
"circuit" is called "block diagram" in LabVIEW terms! It's a programming language and no electronic circuits designer...
In your VI I don't spot any "f", "mass", "frequency", or "QCM" indicators. It's really hard to follow your VI when your description doesn't provide any useful information.
Create a shift register in your while loop. Store the current value in the shift register. Use a subtract to calculate the difference of current and previous value:
The same solution is shown using a feedback node instead...
06-10-2013 07:39 AM
hello GerdW,
Thank you very much for the help. I have implemented it in the block diagram and its working fine..
After you gave such an easy solution the problem looked very silly so really thanks a lot.
I have another doubt now..
i'm getting the frequency in real time.. and there is no problem with it but i also want to display the mass i calculate (using the feedback loop you suggested) after each cycle.
i've calculated the delay needed between two mass readings (i.e. time between two cycles) and a local variable 'delay' is available. but i dont understand how to put this delay there since i want delay only between the mass readings and not freq.
i have tried putting a for loop but its not working. you see, i want values of mass only after 'delay' and frequency continuously.
Sorry if my explaination isn't clear.
I have attached the VI.
you must be finding this too basic but i could really use your help 🙂
Thanks in advance!
06-10-2013 08:11 AM
Hi again GerdW,
Another problem in the VI that I've attached in the previous post is that dueto the for loop and the delay, the frequency readings have become really slow!
I tried taking the for loop out of the case structure, but the readings are still slow
Thanks in advance!
06-10-2013 08:55 AM
I also tried using 'elapsed time' and it is still not working.
I have attached the VI.
Please have a look at it and guide me!
Thanks in advance!