LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

property nodes to disable item

I have an enumerator with a list of channel numbers (1,2,3,4,etc).  It's a custom control and is used in 6 different locations on my front panel.  When i make a channel selection in one, i want that channel number to be disabled in the others.  I'm using property nodes and it works but it looks like it can get messy quick with all 6 controls.  Is there a beter way to do this?  THANK YOU!

0 Kudos
Message 1 of 18
(3,394 Views)

It would help if you posted your actual code. It is hard to suggest improvements without seeing what you have already done. I could simply answer your question with as vague an answer by saying you should write more generalized and efficient code. However since that answer is all but worthless it will be about the best you will get without more information from you.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 18
(3,382 Views)

Tried the attached.  The except input is just the label of the enum that you do not wish to disable.  Let me know if this is what you want.

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 3 of 18
(3,374 Views)

I forgot to mentioned, the attachment is meant to go into a subvi.  

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 4 of 18
(3,370 Views)

Thanks for the information.  Unfortunately, we are using LabVIEW 2009 cannot open attachment.  I am trying to move and modify some code (part of a larger vi) showing what i would like to do with disable enable.  Hope to send it soon.

0 Kudos
Message 5 of 18
(3,362 Views)

I saved it in 2009, see attached.

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 6 of 18
(3,357 Views)

Thanks!  I opened it.  Very interesting.  I keep learning good stuff. ....but what i am trying to do is disable particular item in a enumerater based on selections made in another enumerator. (Like control 1,2,3 and 4 are enumerators with items CH1, CH2, CH3, CH4, CH5 in each of them, in control 1  I selected CH1, now in control 2,3, and 4 CH1 is disabled.)

0 Kudos
Message 7 of 18
(3,352 Views)

I use a GUI Controller to handle things like that. I have an albumn here showing the code used in a couple of my apps.

 

The GUI Controllers are generally variations on Action Engines that cache references and/or screen states and allow me to "poke at the GUI" from sub-VIs.

 

If the functionality is used more than one place then I add an action just to do that work. It would use the cached refs and disable each instance.

 

have fun,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 18
(3,344 Views)

I can't say I particularly like my solution (nested loops and cases) but I think this is what you are looking for. Hopefully a knight will come up with something better!

 

I did it for 3 controls but it is easily expendable by adding more references to the value change event.

 

Ben64

0 Kudos
Message 9 of 18
(3,343 Views)

Thanks so much!!!  With all your ideas, I came up with a sub vi that is similar.  It works pretty good. The sub vi is in a vi that is a producer/consumer-events pattern.  So when a channel selection is made it will go to this sub vi.  If it is a channel change, it remove the old channel first then add the new.  It's attached if anyone is interested.  THANKS!

0 Kudos
Message 10 of 18
(3,313 Views)