LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

calculate differential

hello guys,
I am a newbie in labview, so please help me with this problem:
I measure a given parameter and visualise it in real time. That works.
What I want to do now is to visualise in real time the speed of change
of that parameter,
i.e. the differential.
I managed to take the current measurement number (call it "n") and of
course I can have the "n-1", and then it must have been easy to
calculate Y(n)-Y(n-1).
However, for some reason this doesn't work. I am using the "index
array" block, but something is wrong -- I start the program and I put
probes on the inputs of that block and they change accordingly but the
output doesn't change after the first one or two points.
What's wrong ?

Thank you very much in advance !

R.

0 Kudos
Message 1 of 7
(3,037 Views)
It is hard to say what the problem is without seeing your code.

Possibly you have the array in a differnt dimension that you think it is (3 x 14 insterad of 14 x 3).  Maybe you are running the loop too quickly and the computer cannot compute all the calulations before the next iteration occurs.

here is a quick vi that I mad ein LV8 to show a differential calc.  I do not know if this is similar to how you are doing it or not.

Kenny
Kenny

0 Kudos
Message 2 of 7
(3,027 Views)

Any gurus there ?

Please help.

0 Kudos
Message 3 of 7
(3,008 Views)
No need of gurus. The obvious suggestion is to post your code. I think you will receive an answer very soon.

Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 7
(3,007 Views)
If you have the advanced analysis library, use the derivative VI.  It implements a simple linear interpolation of the closest points.  A more robust method is to use Savitzky-Golay filtering, but you will need to roll this one yourself.  See Numerical Recipes in C, second edition or better, by Press et. al. for details.  That is too much info for this message board.  LV has all the building blocks to make it easy.  It did it once many years ago, when I was at a different company.  I was using LV 5.0.  I don't have the code any more.  Good luck.
0 Kudos
Message 5 of 7
(2,989 Views)

Well, I guess this is too difficult to be done in Labview

0 Kudos
Message 6 of 7
(2,934 Views)
It's easy to do in LabVIEW and based on your brief description, it should be working but it's impossible to say what is wrong with your code without looking at it. You've been asked a couple of times to post it. Is there some reason you can't?
0 Kudos
Message 7 of 7
(2,922 Views)