LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

If I want to create a Listbox to run multple tests, how can I create a check all and clear all button for selection/deselection of all the tests

I created a Listbox with "Selection Mode" of "0 or More".

Next, create a Property Node for the Listbox. You will need two:

Item Names - Read
Value - Write

I will explain the technique but you'll have to figure out the rest:

Get the ARRAY SIZE of Item Names. Create a FOR loop based on the value from ARRAY SIZE. Take the output for the FOR loop and wire it into the Value. This will give you the select all feature.

To clear the Listbox, wire in ARRAY SIZE + 1.

I hope that helps. Regards,

Shan Pin Koh
Message 2 of 12
(4,266 Views)
Hi,

Here is another method using the property node too, but with the properties NumRows and Value.
I created 2 buttons, "check all" and "clear all", and wired them to a case selector so that I update the Value (array) of the listbox when they are pressed (empty array for clear,...).

It's pretty simple,
i hope it will help you.

-julien
Message 3 of 12
(4,266 Views)

Hi,

I saw ur question and its quite similar to mine. I am working on a project now and I think the listbox is possible to be implement in mine. The question is how can i modify the vi by julien so that once i click the list, let say input 1, the waveform from input 1 will be shown at the graph? My input is from the DAQ Assistant. Thanks.

Cheers.

0 Kudos
Message 5 of 12
(3,959 Views)
Hi Arien,
 
Start a fresh thread hereafter to ask anew...
It s a 7-yr-old thread & many people wont be available to answer you, if you continue posting your query in it.
 
What you need to do is, keep your Listbox datatype as Scalar, instead of Array, as in that original example. Then, wire its value to the case structure input terminal. As, per the selected item's value, each case will pass the data coming out of the DAQ Assistant to the waveform graph, thats it...
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 6 of 12
(3,944 Views)
Hi Parthabe,
 
I've tried your method. I used many cases, and for each case I get my graph values, but then is it possible to make the algorithm simpler instead of doing 80 cases as i have 80 channels to deal with. In addition , is it possible for me to for an example, if i click channel 1 and 2, both the waveforms appear on the graph simultaneously, because now i can only click on one value only. Thanks Parthabe. Sorry i just started using labview 🙂
 
0 Kudos
Message 7 of 12
(3,924 Views)
Hi Arien,

Parthabe is right, next time, try to create a new thread.
So when others try to search for a topic, they can actually find it.

I developed this example code that you can take a look at.

It's using property nodes of the chart to control which plot to show and to force invisible




Message Edited by Van_L on 03-06-2008 07:19 PM
Van L
NI Applications Engineer
0 Kudos
Message 8 of 12
(3,906 Views)

Van,

Always place a small Wait inside the while loop; else, it ll consume 100% CPU unnecessarily.

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 9 of 12
(3,893 Views)

Hi Van and Parthabe,

 

I've tried your method Van. I've managed to make selection but there is a problem. I've connected to my DAQ Assist to the waveform instead. However, when i run the file, the waveform starts to run even though I've never click any of those buttons. What is the underlying problem?

0 Kudos
Message 10 of 12
(3,883 Views)