LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Integration on XY Graph (Min and Max X Scale)

Forewarning: I'm fairly new to LabVIEW but still know the basic ins and outs...

 

I'm attempting to integrate under a curve and I need my program to set the range of the integration to the minimum and maximum of the x scale. I have a slider and numeric controls set up in an event structure that let the user decide the min and max of the X scale. How would I program the integration to adjust the range when the user changes the range?

 

Thank you!

0 Kudos
Message 1 of 4
(1,042 Views)

Hi edowker,

 


@edowker wrote:

How would I program the integration to adjust the range when the user changes the range?


By choosing the correct subset of your (plot) data using an ArraySubset function…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(1,040 Views)

That makes sense...however I'm still a bit confused on how you would use the numeric integration function to read both the subarray x data as well as the y data from the XY graph. I'm sure there's a simple answer but I'm just not seeing it, so thank you for helping!

0 Kudos
Message 3 of 4
(1,030 Views)

It makes a tremendous difference if your array consists of samples (equally-spaced Y values with a constant "dt" (or "dx") value between points along the X axis, or if it consists of a set of x-y pairs where both X and Y can vary independently.  You neither showed us your code, nor your data.

 

Suppose you didn't have a computer.  Further suppose you've never had a Calculus class, but did have a set of data points.  Is there a way, with pencil and paper, you could "integrate" these data?  Then that's your Algorithm, translate it into LabVIEW.  See GerdW's suggestion about isolating a "subset" of the data (which I assume is held in an Array) ...

 

Bob Schor

0 Kudos
Message 4 of 4
(1,009 Views)