LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Choose elements from a cluster?

Now we are here again 🙂

Here is the problem: We have an array of cluster. In the cluster there is one string-element and one boolean element. The array can be different size depending of the case before. We want to choose from this array of cluster for example a number of strings and then make a new array of theese. The new array could be an array of strings or something... when we choose which element to display we click the boolean element in the cluster. And then when we have decided which one we want we click a boolean to display the array of the choosen strings...

our problem is that we get only the first element. It does not matter if we click for example element number 2 or 10. But if the boolean are false then it is not displayed. We want to see the rest of the elements that we choose too... that is why we asked before for tip how to decrement with one so that we can read the array all the time and then when we click "stop" then we can get which element we have choosen... maybe that is not a good idea?? Any one who might know what we are doing wrong? Best regards.
0 Kudos
Message 1 of 5
(3,330 Views)
Hi,
Reading all that you have told ,i will give you a solution from what i understood plz reply if i am wrong.
You need to build a array of the strings from a array of clusters which has a string and a boolean in it.You need this new array to contain only strings which have a boolean selected.
So for this what you have to do is pass this Array of clusters in a FOR loop,so everytime you will be getting only one cluter ,you have to unbundle this and check the status of the boolean with a case loop it the case is true add the string element in to a null array which is initilazed using a SHIFT Reg,so in the false case you need not add any new element,thus at the end of the loop you have a array which has only strings in which the boolean is true. Sorry when i wrote this reply i did not have LV in that comp,
hope i dint confuse you tooo much.reply if you want more help.
cheers
vicky
0 Kudos
Message 2 of 5
(3,328 Views)
Hello!

We have clusters with strings and boolean elements. Of these clusters we have built an array. That is already done. That is right that we need a new array out of this based on which strings one choose with the boolean. Your suggestion to pass this arrays of clusters into a for-loop we have also done. Then one get one cluster at a time. Then this pass on to a case just as you suggested. Here comes our problem. That is that we only get the first string from the first cluster from the array :-/. Hmm... there maybe a small mistake from us too... but we do not know what we are doing wrong. Thank you for your help 🙂
0 Kudos
Message 3 of 5
(3,323 Views)
Hey ,
by any chance are you wiring something to the N in the forloop ,it is supossed to run as many times as the array size then you will get each and every element inside so from that you can build your array of strings.Make sure the For Loop runs the size of array number of times.
Cheers
vicky
0 Kudos
Message 4 of 5
(3,321 Views)
Hello!

Thank you for your help 🙂 It helped us a lot! Best regards.
0 Kudos
Message 5 of 5
(3,289 Views)