04-13-2023 01:52 PM
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?
Solved! Go to Solution.
04-13-2023 01:54 PM
You need to use XY graph. Lookup XY graph in LabVIEW examples.
04-13-2023 02:41 PM
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.
04-14-2023 08:43 AM
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?
04-14-2023 09:16 AM - edited 04-14-2023 09:20 AM
@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.
05-18-2023 11:58 AM
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.
05-26-2023 07:39 AM
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.
05-26-2023 08:13 AM
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.