LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

gradient/difference calculation

Hi All
 
I managed to display two input readings on an X-Y graph. I have one analogue voltage reading for my Y-axis and also counter input from my encoder for the X-axis. Now I am trying to calculate angle of change in anologue voltage reading with respect to counter reading. For this I am using inverse tangent of change in Y-axis divided by change in X-axis. My question is how can I dynamically  find the change in analogue and counter input values so that I can feed it into my formula VI to calculate the angle. I tried to use shift register but no success. Please find the attached VI. Any help is greatly appreciated.
 
Thanks
 
Duran
0 Kudos
Message 1 of 2
(3,254 Views)
Try this.  It uses shift registers to get the old data from the last iteration with the new data just acquired.  I can't test it, and I don't usually use dynamic data types so it's possible the math operations won't work right.  But this should give you the idea.
0 Kudos
Message 2 of 2
(3,231 Views)