LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graphing Two Numeric values

Solved!
Go to solution

Hello, I have two numeric values that I get from a non-NI DAQ. The data is continuously gathered under a while loop. One data is displacement the other is force. I want to graph these two data as they come in, in a Force vs Displacement graph. I tried to build an array with two of the values and had the array connected to a waveform chart but t won't graph the values versus each other. only in two different plots. How do I go about getting to graph displacement vs force? 

0 Kudos
Message 1 of 8
(1,123 Views)

You need to use XY graph. Lookup XY graph in LabVIEW examples.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 2 of 8
(1,122 Views)

Waveform graphs are for equally spaced x values (which is of course a possibility if you setup the experiment accordingly!). In that case, all you need is define x0 and dx for the x-axis and only graph the displacement.

 

If the x-axis values are spaced randomly, you need an xy graph. See if this can give you some ideas.

 

altenbach_0-1681414845839.png

 

Message 3 of 8
(1,104 Views)

This worked, but I can't seem to flip the axis, I want the force to be on the Y axis and DIsplacement to be on the X axis. I swapped the wire into the build array wire, but it did nothing. How do I flip the axes? 

0 Kudos
Message 4 of 8
(1,045 Views)

@YPWORK wrote:

This worked, but I can't seem to flip the axis, I want the force to be on the Y axis and DIsplacement to be on the X axis.

You need to swap the wires going into the RE/IM to complex.

 


@YPWORK wrote:

 I swapped the wire into the build array wire, but it did nothing. How do I flip the axes? 


That would only change the order of elements in the array. When building arrays, you should always append and the end (as I do). If you swap the input, you are prepending, which is significantly harder on the memory manager.

 

I would assume that you know the number of points before the start of the experiment, so an in-place solution would be even more efficient.

0 Kudos
Message 5 of 8
(1,040 Views)

I don't understand. I have values that come in on a numeric indicator, the values change as the machine is run. I have this all inside a while loop for continuous data acquisition. I want a real-time display of the Force vs Displace values. All graphs I've tried seem like they need an array to work, which I don't know how to make or even if you can make, inside of the while loop. 

0 Kudos
Message 6 of 8
(950 Views)
Solution
Accepted by YPWORK

I used a Shift Register to store the value and added the new value to an array which then I could graph after each interaction. Thank you all for the replies. 

0 Kudos
Message 7 of 8
(931 Views)

For you to plot XY graph, you need to bundle the arrays. Now in your case, since you want to plot as the data comes in, you can create 2 shift registerr with 1D  array each, every time a new data comes in you add that into the array and bundle both to plot on the XY. 

ROtakeCanada_0-1685106651042.png

 

0 Kudos
Message 8 of 8
(924 Views)