12-15-2011 11:18 AM
Hello,
I was wondering if someone can help me out on combining a cluster of one element and a cluster of two elements on the same xy graph. I've attached a jpg.
Thanks
12-15-2011 11:26 AM
You have to be consistent in your cluster data type. The XY Graph is a 1D array of Clusters, each containing an X array and Y array. So to make it work, you have to put the single points into arrays first.
12-16-2011 08:31 AM
The problem with that is I cannot inclube my buffer which. I need a way to inlcude the buffer data from the daq and the data from the spreed sheet or an array into one xy graph?
12-16-2011 08:35 AM
Can you expand on that a little?
I just don't get what the problems you are confronting actually is.
Ben
12-16-2011 10:21 AM
What I'm trying to do is place a temperature plot on a xy graph using x and y data from a spreadsheet and using DAQ with a thermal couple and manually controlling the temperature to follow the plot. The problem that I'm having is getting the buffered DAQ data cluster with the spreadsheet cluster data.
12-16-2011 10:31 AM
using Codeman's example as a guide attachk htat top wire going into your build array. Once you get the the top wire the same as the bottom it should work.
Hint:
TUrn on your help window and float over your wires with the wire spool. the help will tell what is in the wire.
Ben
12-16-2011 11:30 AM
The problem with Codemans example is its not possible to do that with the buffer. The buffer is just a shift register. What I need to do is convert the cluster of 2 elements coming from my x y spreadsheets to a cluster of 1 element equal to what is coming out of the buffer. I need that data to be on the graph at the first run of the loop because it is my plot to follow the temperature. This is my dilemma.
12-16-2011 11:33 AM
Look in the Cluster palette for Index and Bundle Cluster Array. Put that on your lower wire, and that should give you a similar datatype as to what is coming out of your buffer VI.
I would also recommend taking the Read from Spreadsheet Files and moving them outside the loop. Is there a reason to reread the files on every loop iteration? Also, what are the file names to be read?
Right now you are going to get a pair of file dialog boxes popping up on every loop iteration.
12-16-2011 11:37 AM
What you described does not mathc up with the code image you posted (where are the shift register you are talking about?). Please post images of the code you are describing since all you need is a couple of build arrays to convert the flaots to arrays and match up with what is alrady correct for the XY graph.
12-16-2011 12:21 PM
I think I might follow: You want to display the known plot coming from the file alongside the plot that you are generating as your program runs; is that correct? First, presuming that the data from file is not changing, you would probably want to read it from file outside the while loop. After that, its just a question of whether you want your x/y plots represented as a cluster of arrays or an array of clusters, either would work.