LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

writing array to cluster

Solved!
Go to solution

we have an input array which we want to map to cluster for which we are using bundle by name function, the input array has some empty strings and if there is no empty strings between values at two indices then those values should get append in the same array and if there is empty string before any string, it should build new array of that value.

 

I have tried something but not getting correct logic for this, below i am attaching the vi with the expected output and the output coming.

 

Thankyou

0 Kudos
Message 1 of 7
(2,776 Views)
Please attach your sub vi also.
Thanks
uday
0 Kudos
Message 2 of 7
(2,739 Views)

Thanks Udka for reply,

 

sorry by mistake i fodgot to attach that subvi, now i have made some changes to the vi, below i am attaching the latest vi.

 

Thankyou

0 Kudos
Message 3 of 7
(2,729 Views)

For small arrays it does not make much difference but for large arrays the use of Array Subset to obtain a portion of an array is much faster than Reshape Array.  With arrays of 1E7 elements and the output array nearly half the size of the input array Array Subset is about ten times faster than Reshape Array.  I think it is also more obvious what is being done when using Array Subset.

 

Lynn

0 Kudos
Message 4 of 7
(2,715 Views)

Thanks Johnsold for your reply,

 

i tried array subset also, as far as speed is concerned it might be good i was not knowing this, thanks for telling this but the output is still coming same, i am not able to get the output as expected.

 

Thankyou

0 Kudos
Message 5 of 7
(2,693 Views)

You have more "groups" in your input array than you do scripts/tests.  What should limit the size of your output array?  If the input array, then what should the rest of the cluster have in it?


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
0 Kudos
Message 6 of 7
(2,661 Views)
Solution
Accepted by RChoudhary

It gets easier if you decouple the processing of the input array from bundling of the cluster values.

 

See if the attached file does what your looking for.

 

steve

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
Message 7 of 7
(2,658 Views)