LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graphing two inputs

What does the actual data look like? Somewhere towards the end of the data set you have points with x = 0 and y =0.
0 Kudos
Message 11 of 18
(1,052 Views)
OK, but I ask again: have you taken a look at the actual data that you're getting out of the DAQ Assistant block for each iteration? The graph is most likely graphing exactly what it is receiving.
0 Kudos
Message 12 of 18
(1,051 Views)
I looked at each individual output and the array outputs and they all hold a steady value when everything is held constant.  They change as the two input voltages are changed and there is never any indication of two zero voltages.  Here is a graph of the new data.  If the pressure is changed fast, there are only a few lines back to the origin.  The slower the line is created the more lines there are back to zero.
0 Kudos
Message 13 of 18
(1,036 Views)
You keep putting up images of the graphs, which doesn't help in this case. What is the raw data? In other words, what's the array that gets fed to the graph at the first iteration, and what is the array that gets fed to the graph at the second iteration?
0 Kudos
Message 14 of 18
(1,031 Views)
The raw data is a series of voltages that come from the DAQ assistant.  The first iteration should be zero from both inputs.  The next iteration should be data containing a new set of voltage data plus the data from the first iteration and so on.  The array being fed to the graph should be the series of values from all iterations so that it can graph a line from one iteration to the next which remains on the graph as the input voltages are varied.
0 Kudos
Message 15 of 18
(1,028 Views)
But you're trying to plot one voltage vs another, which implies that one is your independent variable and the other is the dependent variable. I have to admit a little confusion on my part at this point. From an earlier post you mentioned:
The two inputs are from a linear potentiometer which reads a voltage between 0 and 5 and the other is from a pressure sensor.  The voltage from the pressure sensor is being amplified through differential amplifier.  The voltage from the pressure sensor also remains constant.
Does this mean that the signal from the linear pot is the independent variable (X), and the signal from the pressure sensor is the dependent variable (Y)?
Later on you said
I looked at each individual output and the array outputs and they all hold a steady value when everything is held constant.  They change as the two input voltages are changed and there is never any indication of two zero voltages.  Here is a graph of the new data.  If the pressure is changed fast, there are only a few lines back to the origin.  The slower the line is created the more lines there are back to zero.
Now it seems that you're saying the pressure is changed, so what are you actually changing?

Let's tackle this a different way. Attached is a VI that displays the raw data as it's being collected, and even saves it to disk. I believe I correctly copied the code you posted in the screenshot, but please verify it. You will need to modify the DAQ assistant to reflect your setup, as I used it with a simulated device. Run it for a few iterations, and then upload the data file.
0 Kudos
Message 16 of 18
(1,021 Views)
I should have been clearer on that sorry.  The independent variable is from the linear poteniometer and the dependent variable is the voltage from the pressure sensor.  After I tested the set up with the build XY circuit, the graph was behaving as I have wanted it to.  I rewired the circuit I had made in the same way that I had been doing and my circuit then also produced the correct graph.  I am not sure what I changed but everything now works fine.  Thank you for your patience and help!
0 Kudos
Message 17 of 18
(989 Views)
OK. Too bad we couldn't figure out the exact problem, but the important part is you got it working. Smiley Wink
0 Kudos
Message 18 of 18
(987 Views)