02-10-2016 02:50 AM
I have to take input from a cluster of numeric inputs corresponding to the checkbox value.
for eg, where ever the checkbox is ticked I want that value to be stored in an array.
The reason why I am unable to do this is :
I take all the values from this cluster, store them into an array and then delete the values where checkbox isn't ticked.
In this process, the code always takes the initial array and it doesn't take the new array(with the deleted element).
In short, I am unable to replace the array with the deleted index.
If you are not able to understand the above stated reason, kindly help me with the problem itself. THANKS
PLEASE HELP
02-10-2016 02:56 AM - edited 02-10-2016 02:57 AM
Without reading all the text of your post:
Why don't you create a cluster with a checkbox (bool), Start and Stop (both numeric) which represent the state/configuration of one item. Then create an array of that cluster.
Norbert
02-10-2016 03:41 AM
What will I achieve out of it ?
I will receive all boolean values and start and stop values.
That is not what i am looking for, I just want start and stop for the ones checkbox is ticked.
02-10-2016 03:48 AM
I tried to use your method, I couldn't change it to an array as there are three types of elements.
If I choose to unbundle then I have to select 20 * 3 options manually and add them to an array, which is not what I would prefer.
Please help me find another method, maybe reading my query might help.
02-10-2016 04:13 AM
@gauraangKhurana wrote:
What will I achieve out of it ?
[...]
Sorry to say that but obviously you could greatly improve your knowledge about clusters and arrays (and their combination).
If you state that Start and Stop are only valuable if the checkbox is marked, it is mandatory to treat these three items as ONE DATASET.
Example:
Start 7 and Stop 7 are only valuable to you if Bool 7 is checked, the three items belong together.
You do know that you can create an array of clusters?
Norbert
02-10-2016 04:45 AM
Yes, you are right. I don't have much knowledge about LabView but I am learning.
Can you please tell me how to bind the chechboxes with the numeric inputs. You are right, I want to take values only when the corresponding checkbox is selected.
How can this be done ? If you could guide me a little, it would be great.
02-10-2016 05:32 AM
As Norbert was saying, you need to redo your data structure. Since the checkbox, start, and stop all correlate to each other, they belong together as a cluster. Since you have multiples of these data sets, you can put the cluster inside of an array. So you should end with an array of clusters.
02-10-2016 12:05 PM
The For Loop is going to give you two nice features. It will do auto indexing for you (use the array element by element until it reaches the end) and has a conditional output, so you can make it output only the array elements which have your TRUE boolean.