LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

differentiation

Hi

I need some help getting the derivative of an analog signal. What I want is the inclination between two points. I found this example VI (attached file) here at dicussion forum, programed by Mark (hope you dont mind me using it and changing it a little bit Mark). The problem is that I dont know how to get the time between the samples. I also whant to be able to choose how many samples there should be between the two points the calculation includes. Is there any one who can help me modify this example (LV 6.0) for my needs?

Thanks
-Dawe-
0 Kudos
Message 1 of 2
(2,845 Views)
According to example VI the timing information is suppose to be passed to the VI in the data array. The second index, if I understand it correctly, works out to be time (he gets a delta between two points from the first index (index 0, call it dX) and then a delta between two point from the second index (index 1, call it dT), he then divides these two (dX/dT), looks an awful lot like a derivative to me).

If you are getting data from an AI Read call, that would indicate you have set up some sort of continuous sampling with AI Config and AI Start. If so, you told it what rate to sample at, and thus you already know the time between samples. Just divide the dX (from above) by the sample rate.
0 Kudos
Message 2 of 2
(2,845 Views)