LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use checkboxes with numeric inputs ?

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.

 

Capture.PNG

 

 

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

0 Kudos
Message 1 of 8
(3,595 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 8
(3,581 Views)

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.

0 Kudos
Message 3 of 8
(3,564 Views)

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.

0 Kudos
Message 4 of 8
(3,560 Views)

@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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 8
(3,550 Views)

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.

0 Kudos
Message 6 of 8
(3,540 Views)

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.


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 7 of 8
(3,528 Views)

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.

0 Kudos
Message 8 of 8
(3,471 Views)