08-13-2014 09:26 AM
Hey guys, it's me again...
I'm close to finish my program, but I still need some help.
This time, I collect data in the inner for loop, decode it and put them in a nice array and save it to a file.
I added a second loop to collect some more of data to get a bigger scale on the XY-Graph.
The problem is now to get the data out of the loop to the graph.
I'm using a auto index tunnel. The result is an 2D array that contains 10 1D arrays containing the clusters...
Now I want to reshape this 2D array back to the origin shape to display it on the graph.
I'm not sure how to do this... I can index the 1D arrays out, but how to put them back together?!
Thanks!
08-13-2014 09:33 AM
Not sure if I get your question but I think an indexing tunnel would resolve your problem. Right click on the tunnel >>> tunnel mode >>> concetanating.
08-13-2014 09:34 AM
Why don't you make the inner loop run longer?
08-13-2014 09:34 AM - edited 08-13-2014 09:35 AM
Hallo Steffen,
in an older LabVIEW version you would reshape your 2D array of 10×6 clusters to an 1D array of 60 clusters…
You didn't get the point on using shift registers in favor of local variables so far, don't you?
08-13-2014 10:01 AM
What version of LabVIEW are you using?
Your problem is that you need to build the clusters OUTSIDE BOTH loops. You need to build the arrays inside of the outter loop. If you have 2012 or later, you can configure the ouput tunnels to be "concatinating". Use that for the outer loop to build your arrays. Once the outter loop is done, build up your clusters, build the array, and write to your graph.
08-14-2014 02:40 AM
First thanks for your answers!
I'm using labview 2014, but the german version.
So, I didn't find "concentrating", but it might be "verknüpfen" in german.
@ nyc the value of the inner loop is fixed
@ GerdW I need to give a preconfigured value to the variables. I couldn't get this working, when I'm simply shift the values.
@ crossrulz I tried that before and build the clusters outside. It didn't work, but I will try it again. Maybe there was another mistake
08-14-2014 05:09 AM
Thanks for your answers!
I want to collect the data in the outer loop the same way I do it with the inner loop.
Thats why a concetanating loop doesn't work.
I think it will put out the actual value every time it loops.
Index tunnel gives me what I want, but I will get an 2D array.
@ GerdW I will try to replace the variables with shift registers...
@ nyc the inner loop size is fixed
08-14-2014 08:31 AM
I still have no luck after some hours of trying.
Maybe the solution is simple xD
I try to explain the problem again:
The loop will deliver a 2D array that should look like this:
[1,2,3,4,5,6][1,2,3,4,5,6][1,2,3,4,5,6]...[1,2,3,4,5,6]The numbers 1...6 are the channels (clusters of XY-values) and I got 10 of them.Length is shown as [10,6].I like to resharp it suitable for the XY-Graph.
I think I can do it as the attatched file shows, but it doesnt work...
08-14-2014 08:36 AM - edited 08-14-2014 08:39 AM
Hi Steffen,
the German LabVIEWForum is operational again, so we could discuss this in German again…
You surely want your data
[1,2,3,4,5,6][1,2,3,4,5,6][1,2,3,4,5,6]...[1,2,3,4,5,6]
converted to
[1,1,1,…][2,2,2,…] … [6,6,6,…]
Just reshaping your array will produce a graph with 60 plots while you want a graph with 6 plots…
As suggested before you should build up the arrays inside the inner FOR loop instead of reordering cluster arrays later on.
Attach a VI (LV2011 preferred) instead of images as we can't debug them (so far)…
08-14-2014 08:36 AM