LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cumulative subtraction on real time data

Solved!
Go to solution

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!

 

0 Kudos
Message 1 of 5
(2,624 Views)
Solution
Accepted by topic author netra

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:

check.png

The same solution is shown using a feedback node instead...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(2,610 Views)

hello ,

 

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!

 

 

0 Kudos
Message 3 of 5
(2,580 Views)

Hi again ,

 

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!

0 Kudos
Message 4 of 5
(2,574 Views)

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!

 

0 Kudos
Message 5 of 5
(2,565 Views)