LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

test selection

Hi all,
 
My mind thinking of add a model selection of this vi, means that when i choose model 1, some test will be disable and wouldn't allow me to select, same for other models.
Attach with .llb (grab from one of the forum discussion example). Is it possible to do it??
 
regards,
Simon
0 Kudos
Message 1 of 7
(3,492 Views)
Not sure what you mean by 'add a model section' since there already is a model control and selecting model 1 disables certain options. There is nothing in the case statements for models 2 and 3 so something similar to what is in case 1 would have to be added. I would use an event structure instead but that's a pretty simple change.
0 Kudos
Message 2 of 7
(3,481 Views)
Hi Dennis,
 
Thanks to response.
Maybe I will explain more the situation:
Let say i have total 11 tests, and going to choose model 1, but not all test can be select to test, so it will disable some of test items (e.g test no.1,2&3). If going for model 2, only test no 5&6 disable, the user can select rest of the tests and model 3, all tests are selectable. However, i also can choose the allowable test items to be tested.
I still in the iniatial stage of planning my user interface. Attach with test.jpg.
 
regards,
Simon  
0 Kudos
Message 3 of 7
(3,475 Views)
This last image is completely different than the VI you posted. The VI you posted already allows a user to select a model, disables certain tests based on that model, and then allows all or some of the available tests to be selected. The selection of models 2 and 3 is not quite right because as I said, there needs to be some code in those cases. Are you asking for help in how to modify it?
0 Kudos
Message 4 of 7
(3,453 Views)
If i choose model 1, it just disable some of the tests,when i press all select, those disable tests still can be selected ..  Also when choose model 2, the test cannot be recover back to normal (as i haven't put any code inside) or i need to enable back those disable test in model 2 & 3 and disable some tests follow the test.jpg.
The test selection 2 and 3, i still haven't put the code as discover the problem.
Yup, i need help for advice.. or any related examples that i can looking at.
Thanks in advance..
 
regards,
Simon
0 Kudos
Message 5 of 7
(3,447 Views)

Hello Simon,

If I am understanding correctly, you want the item to not be added to the selected listbox if the selection in the first listbox is disabled.  If this is the case, then you will need to check which items are disabled in the listbox before outputting them to be added to the selected listbox.  Right now your code for all will take every value inside the listbox and add it, including the ones that have been disabled.  Disabling the item will just grey it out and not let the user select it, but the item name is still there.  You could just read the disabled items in the case when All is pressed and not include those numbers in the items to be added to the selected listbox.

Also, as Dennis mentioned, you may be better off with an event-based structure, since it would be more efficient and make your code a little easier to understand.  I hope this is helpful.

 

Brian Coalson

Software Engineer
National Instruments
0 Kudos
Message 6 of 7
(3,399 Views)
Hi Brian,
 
Yup you're right. I still work on it using event structure. Thanks for the advice here.
 
regards,
Simon 
0 Kudos
Message 7 of 7
(3,376 Views)