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

 

Currently the Waveform chart looks like this and what I want is throttle percentage on the x axis and thrust on the y axis. Is it possible to do that or do we need to use a different chart?

AJcpt_0-1700934389213.png

 

0 Kudos
Message 11 of 23
(770 Views)

Hi AJ,

 

use a XYgraph instead…

Best regards,
GerdW


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

When I try that I get an error that says, so I'm not sure how to fix it. Any suggestions? 

AJcpt_0-1700935322874.png

 

0 Kudos
Message 13 of 23
(764 Views)

Hi AJ,

 

open the context help and place the mouse pointer over the graph to see the supported data types.

There also is an example VI that shows how to use different types of graphs...

Best regards,
GerdW


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

What it says is that:

 

The XY graph accepts three data types for displaying multiple plots. The XY graph accepts an array of plots, where a plot is a cluster that contains an x array and a y array.

The XY graph also accepts an array of clusters of plots, where a plot is an array of points. A point is a cluster that contains an x value and a y value. The XY graph also accepts an array of clusters of plots, where a plot is an array of complex data, in which the real part is plotted on the x-axis and the imaginary part is plotted on the y-axis.

 

So I'm guessing I have store my values into an array first, but with auto indentation. Any suggestions on how to do this, its all confusing me?

0 Kudos
Message 15 of 23
(756 Views)

Hi AJ,

 


@AJcpt wrote:

So I'm guessing I have store my values into an array first, but with auto indentation. Any suggestions on how to do this, its all confusing me?


Yes, you need to build some arrays from your samples.

As this is basic LabVIEW knowledge (that confuses you) you should take those Training resources, offered at the top of the LabVIEW board!

Best regards,
GerdW


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

If you just want to read one file and graph evenly spaced interpolated points on an xy-graph, here's one possibility (of course since the x-values are now evenly spaced, we could also use a plain waveform graph with correctly adjusted x0 and dx). Basically, we use a ramp from 0...100% throttle and get the corresponding values from the other columns. Can we assume that the throttle values are sorted?

 

.

altenbach_0-1701103244871.png

 

 

0 Kudos
Message 17 of 23
(670 Views)

Yes the throttle values are sorted

 

Is it possible to make the VI use a throttle lever as this is a requirement of my project, if not I'll figure out a different way, also the more advanced VI where I have calculate thrust, propulsive efficiency and TSFC using equations. So these aren't from an excel spreadsheet. Can I do something similar as you did before but with calculated values.

 

I'll attach it below

0 Kudos
Message 18 of 23
(663 Views)

Hey

 

I am new to LabView and I need some help. I have this VI where I calculate thrust, propulsive efficiency and TSFC with changing altitude. I want to be able to plot these calculated data points against throttle percentage. Meaning I want a graph with throttle percentage as the x axis and Thrust for the Y axis and when I set a new altitude I want it to plot a new line on the same graph. This will allow the user the visualize the effect of altitude change on thrust, prop efficiency and TSFC. How can I do this with an XY plot?

 

I will attach my VI below

0 Kudos
Message 19 of 23
(675 Views)

Forgot to attach before  

0 Kudos
Message 20 of 23
(664 Views)