09-21-2009 01:34 AM
Hi
We all know that if we have to buid an array of some elements, then we can use the BUILD ARRAY vi.
What if we have to separate out the individual elements from the array? Discard the INDEX ARRAY option, as that will give only the element specified.
I did this by using ARRAY TO CLUSTER and then UNBUNDLE CLUSTER . The problem with this is that the unbundled elements are only 8 in number and it is always this number only!!!
Also, the indicators and controls have to be created by the user only. So, how can i display the individual elements from the array?
09-21-2009 01:54 AM
The OpenG toolkit has a function called 'Index Array Elements':
Here you can get the elements in the position and order you want them.
To get more elements from an 'Array to Cluster', right click and select 'Number of elements'. However this is not the function you are looking for.
Somil wrote:Also, the indicators and controls have to be created by the user only. So, how can i display the individual elements from the array?
I'm sorry I don't understand what you actually want. You can use an array display to display multiple elements (and you can resize the control to change the number of elements shown).
Could you specify a little bit more?
Ton
09-21-2009 02:31 AM
Hi
Just see this VI. What is happening in this VI is that i am first generating a Random array, and then extracting the array elements individually.
This is for some specific array size (7*1). I know that there are 7 elements in the array, so there are 7 indicators.
If there are are some "n" number of elements, how to extract array elements?
09-21-2009 03:38 AM
09-21-2009 04:13 AM
haha,
There is no problem in keeping the elements in the array itself.
I was just EXPERIMENTING!!!!!:mantongue:
09-21-2009 08:16 AM
See these examples LV 8.6.1, hope this helps.
09-21-2009 09:56 PM
hi
Thanks rob!!!!
The problem with my VI was that i was not knowing how to increase the size of the Unbundle function. Just i had to select the size of the ARRAY TO CLUSTER functio. This will help.
Now, should i mark the solution to your answer???
09-07-2016 10:31 PM - edited 09-07-2016 10:32 PM
Is there any other way to extract elements from array besides converting it to cluster then unbundle?
Because I do find it unconvenient if the element of the array is too big and if we were to do some kind of operations on the extracted elements.
Thank you in advance 🙂
09-08-2016 12:09 AM
Array to Cluster then Unbundle is completely the wrong way to get elements from an array.
Index Array is the proper method.
I regret that this thread even exists and the original poster's message gave you the impression to use Array to Cluster. The fact that the original poster suggesting this was an NI employee is even worse.
I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
09-08-2016 04:05 AM
Whats the reason behind converting Array to Cluster and then to individual elements?
Why not based on Index values?