From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a graph with data

Good day. I would like to know how to create a graph, using data from an array. I have attached my Vi and the data that is collected at the end of the 20 cycles, as viewed on the front panel, I am trying to create a graph that will show a hysterisis loop, using that data. The test is supposed to go 0-200V, then 200V-0V. It is for a free displacement test using an eddy current sensor.

 

Also, I am trying to figure out how to create an indicator that gives a graphical representation of what voltage level the test is at, an animated sort of a thing. I couldn't find anything in my training material. Thank you

0 Kudos
Message 1 of 16
(3,619 Views)

To just show an array of values, you can add a Graph indicator to your Front Panel and then wire the array to the graph.

Which values in your VI, exactly, do you want to graph?

 

As far as "an indicator that gives a graphical representation of what voltage level the test is at", you probably just want to wire your voltage value directly to a Chart indicator.

 

Here is an article about types of graphs in LabVIEW.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 16
(3,600 Views)

@James.M wrote:

To just show an array of values, you can add a Graph indicator to your Front Panel and then wire the array to the graph.

Which values in your VI, exactly, do you want to graph?

 

As far as "an indicator that gives a graphical representation of what voltage level the test is at", you probably just want to wire your voltage value directly to a Chart indicator.

 

Here is an article about types of graphs in LabVIEW.

 

 

 

 

 

Which values in your VI, exactly, do you want to graph? The two columns under the "Displacement" heading.


 

0 Kudos
Message 3 of 16
(3,589 Views)

Did you follow the link I put above? That should help you get familiar with gaphs and charts. This is one of the great things about LabVIEW, you can really easily add a user interface component and wire your data to the indicator. You can create a graph or a chart to display your "Actual" values in plotted form.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 4 of 16
(3,581 Views)

@James.M wrote:

Did you follow the link I put above? That should help you get familiar with gaphs and charts. This is one of the great things about LabVIEW, you can really easily add a user interface component and wire your data to the indicator. You can create a graph or a chart to display your "Actual" values in plotted form.


Did you follow the link I put above? Yes sir, I did. The are easy enough when the data is a direct match. However, I had to use Fract/Exp String to Number's for the "Up values" and "Down Values", then build an array using scaleable numbers, then feed that to the waveform graph but it gives me an incompatability message, when I connect the appended array to the waveform graph.

0 Kudos
Message 5 of 16
(3,566 Views)

@ceilingwalker wrote:

The are easy enough when the data is a direct match. However, I had to use Fract/Exp String to Number's for the "Up values" and "Down Values", then build an array using scaleable numbers, then feed that to the waveform graph but it gives me an incompatability message, when I connect the appended array to the waveform graph.



If you would, please create a subVI of the code you're having trouble with that just does the array operations and outputs the information to a graph. I can't run your VI because I don't have MyDAQ drivers installed, so it would be helpful to have just a subsection of the code to work with. You could also select and create a Snippet of the code you mentioned here for us to see.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 6 of 16
(3,560 Views)

@James.M wrote:

@ceilingwalker wrote:

The are easy enough when the data is a direct match. However, I had to use Fract/Exp String to Number's for the "Up values" and "Down Values", then build an array using scaleable numbers, then feed that to the waveform graph but it gives me an incompatability message, when I connect the appended array to the waveform graph.



If you would, please create a subVI of the code you're having trouble with that just does the array operations and outputs the information to a graph. I can't run your VI because I don't have MyDAQ drivers installed, so it would be helpful to have just a subsection of the code to work with. You could also select and create a Snippet of the code you mentioned here for us to see.


You could also select and create a Snippet of the code you mentioned here for us to see. I have never used Snippet before. For some reason, when I select the part of my Vi to make a snippet it puts indicators and controls all over the place and broken lines. It isn't representing well what I have selected.


0 Kudos
Message 7 of 16
(3,537 Views)

Another problem I am having is making it so that it is displacement over voltage, not over time. I haven't found a way to change it yet. So the graph should make a near oval shape, with sharp ends, if that makes any sense at all.

0 Kudos
Message 8 of 16
(3,521 Views)

Go ahead and make a snippet and a subVI anyways and attach it here. I can try to sort through any broken wires or extra controls. It's easier to at least see what you've tried so far, so I can better tell what you're try to do.

 

You can use an XY Graph indicator to graph the voltage vs displacement. Bundle the X axis (voltage?) array along with the  Y axis (displacement?) array together and write them to an XY Graph.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 9 of 16
(3,509 Views)

@James.M wrote:

 

You can use an XY Graph indicator to graph the voltage vs displacement. Bundle the X axis (voltage?) array along with the  Y axis (displacement?) array together and write them to an XY Graph.


You can use an XY Graph indicator to graph the voltage vs displacement. Bundle the X axis (voltage?) array along with the  Y axis (displacement?) array together and write them to an XY Graph. Okay, I will give it a try.

0 Kudos
Message 10 of 16
(3,460 Views)