simply connect one Array (that you got from first anlog input) to the X array, at the cluster bundle (to create a XY graph), and the same procedure to second Array, to the Y array, and 'walla', it works fine.
I appreciate that you responded so quickly. Your answer makes sense, however, I am brand new at LabVIEW, so I don't know where to begin to get the x array and y array. In the end I want to plot one voltage from an analog input channel versus another voltage from a second analog input channel. I hope you can help. Thank you again for your time. --Greg
How are you acquiring the data and what functions are you using? If you acquire both channels over time, the AI function will automatically create a 2D array. You can use an index array function to get channels 1 and 2 data. Each of these should be a 1D array that you use for the x and y inputs to the xy graph.
Hi Greg, Here is an example VI, because you are using LabView Ver. 6.1 and I'm using Ver 7.0. I can't save the Analog Input VI, but I wrote you the name of the VI, that you can use.
I appreciate the response once again. I will try the file you sent me tomorrow. Is it just the Plot XY.VI? or is it more than that? I am just curious. Thanks again, Greg
I have a NI-DAQ and an switch. two channels (4 pins) are being used. The correct voltages are coming out because I am able to get the data to excel using the built in data logger.vi. I just really need to get the x and y data to plot on an x-y plot in labview while the voltages are being sampled. I don't know what functions are to used to be honest in order to acquire the two separate channels into two separate arrays. Thanks again. Sincerely, Greg
The above example is OK but it won't give you live updates. Take a look at the diagram attached.
Using build array like this is not efficient memory use but it depends on how much data you will be collecting. I've used this technique at 20 scans a second for several minutes without any problems.
By the way the switch used for the reset needs it's Mechanical Action set to Latch When Released.
Look at the shipping example called XY Chart if you wnat to display data real time. The normal XY graph takes arrays post-acquisition and displays them but the example should do what you want without needing to build arrays.