LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to store interpolated values from a while loop into and array and then create a graph

I have created an interface where excel data is extracted and the data is interpolated within a while loop. I then output that interpolated data. I now want to store the interpolated data into an array to plot a XY graph.

How do I do this?

 

I have attached a section of the interface below

0 Kudos
Message 1 of 23
(1,029 Views)

There is nothing attached.

0 Kudos
Message 2 of 23
(1,009 Views)

should be attached now

0 Kudos
Message 3 of 23
(980 Views)

A picture of a tiny truncated section of code is not helpful at all!

 

Please attach your VI (or a simplified version of it). I assume there is probably an outer loop and you have arrays of x values somewhere. Are the x-values for the upper and lower interpolation the same or different?

 

Maybe this can give you some ideas....

0 Kudos
Message 4 of 23
(963 Views)

I have attached a simple version below, the previous method you had stated did not seem to work.

 

What I am trying to do is plot a graph of each combination of throttle position and Thrust. Also I want it to plot multiple plots on a single graph as later versions of the interface have changing environmental conditions.

 

Thank you

0 Kudos
Message 5 of 23
(931 Views)

Hi AJ,

 

you still didn't provide any code!

(We cannot edit/debug/run images in LabVIEW. Please attach real VI files!)

 

Why do you need to read the sam Excel file in a loop?

Why do you need 4 IndexArray nodes when one would be enough? (They are resizable!)

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 23
(921 Views)

This the first time I have used LabVIEW and I don't know how everything works. I just constructed this VI from watching videos and reading posts. I have been constantly making changes to my VI to make them better. If you have any suggestions that make my VI better please let me know, it will be much appreciated?

 

I have attached my VI below 

0 Kudos
Message 7 of 23
(918 Views)

Hi AJ,

 

many of us still don't use the latest LabVIEW versions, so could you please downconvert your VI (File->Save for previous) and attach again?

I prefer LV2019…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 23
(914 Views)

 I have now saved it as 19.0 version which I think is for LV2019. Please Let me know if this is not correct

0 Kudos
Message 9 of 23
(910 Views)

Hi AJ,

 

thanks for conversion.

 

Suggestion:

You don't need additional indicators for gauges: enable/show their digital display!

Place a wait inside loops waiting for user actions…

Place constant code outside of loops…

 

I used a simple chart to display your data. Try for yourself…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 23
(893 Views)