07-09-2010 01:16 AM
Hi All,
I have a problem in extracting data from array of cluster to a single cluster. Please have a look at the attachment.I have found the solution but it consumes lot of memory because of shif registers andi am using this many places which is loading to nearly 100% in RT. Please provide an better alternative solution.
07-09-2010 01:30 AM
Try Index Array. 😉
/Y
07-09-2010 01:34 AM
07-09-2010 01:35 AM - edited 07-09-2010 01:37 AM
Hi Geeta,
"i am using this many places"
When you do this operation very often, then why don't you store the data in the correct format?
The conversion from cluster of arrays to array of clusters is much easier (using BuildClusterArray)!
@Yamaeda:
How should an IndexArray help here? Geeta wants to convert an array of clusters to a cluster of arrays containing all values...
07-09-2010 01:42 AM
07-09-2010 01:46 AM
What's wrong with plain auto indexing?
That should give exactly the output you need.
Ton
07-09-2010 01:52 AM
07-09-2010 01:57 AM
07-09-2010 03:30 AM
Hi Geeta,
you can use Tons suggestion as a starting point. It forms your array of clusters into a cluster of array as you wanted.
You only have to add a ReshapeArray for each array to reshape from 2D to 1D after autoindexing!
07-09-2010 06:50 AM
@AutoTEC wrote:
Hi,
No i am almost at the end of coding . If i change the entire architecture affects. Only problem is this logic consumes more time. Pls any other idea...
Standard situation if a propper data management is not done before coding OR lead to the wrong architekture.
Do you use type definitions? Help a lot to avoid the horror of optimizing the datastructure.
Since it is much faster to rebuild a cluster by indexing the elements from your cluster of arrays than generating a cluster of arrays from an array of cluster (Puh!)
AND you have timing problems I see only two solutions : Faster hardware or a reorganisation of your data.
So change the datasturcture , create a subvi 'IndexMyData2Cluster' and whereever you indexed the array of cluster replace it with that vi.
Or run both structures in parrallel (BRRR, race conditions, inconsistent data , uuuaaahhh)