LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need versatile way to pass data to graph

Solved!
Go to solution

Hi,

I have a sub-vi that does some data analysis. I output the results through a type def. I want this type def to include the data needed to plot the results in a XY-graph.

 

My problem is that the data will sometimes contain only 1 data series and sometimes multiple ones. i.e. sometimes the output should be a cluster of two 1D-arrays, sometimes it should be an array of clusters. Is there a good way to achieve this?

 

Skärmklipp.JPG

vs

Skärmklipp2.JPG 

0 Kudos
Message 1 of 4
(3,188 Views)

Dulpicate Post,

please maintanin single thread

http://forums.ni.com/t5/Getting-Started-on-the-NI/Tips-for-Posting-Code/td-p/3250924

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 4
(3,183 Views)

You can try using for loop with indexing enabled so that you will come to know how many coulumns you have during run time and cluster them and then index out so that you will have array of clusters always.

Thanks
uday
Message 3 of 4
(3,175 Views)
Solution
Accepted by topic author HenrikOlsson

@udka wrote:

You can try using for loop with indexing enabled so that you will come to know how many coulumns you have during run time and cluster them and then index out so that you will have array of clusters always.


You are on the right track.  Just need a little bit before the loop to transpose the array (to make the indexing work properly) and remove the X-axis data.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 4
(3,162 Views)