LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Indices of System Ring programmatically

I am trying to enable/disable indices of a system ring during runtime on checkbox events.

I have included a sample VI with the following:

Front Panel
A "Tools Palette" with 2 button controls with a checkbox and a string indicator corresponding to each button control. 

 

BD

On a checkbox value change event

-The visibility of the corresponding button control is set to the value of the checkbox. 
-The Name of the currently shown item in the ring control is applied to the corresponding string indicator.
-The Value of the currently shown item in the ring control is stored as an ID for the button control. 

 

-If the checkbox is now true, the index of the currently shown item in the ring control should be disabled.

-If the checkbox is now false, the index of the currently shown item in the ring control should be enabled.
/*The enabling/disabling is done by adding/deleting elements from the DisabledItems[] property.*/


The process seems correct, however, I have only been working with LabView since February so I may be doing something horribly wrong.
Transitioning from a C background has been... interesting. 

 

(Also, I am using Local Variables because I don't know how else to work this problem,

so, unless you can explain how to accomplish the same thing without them, please ignore my LabView  no-no)

0 Kudos
Message 1 of 2
(2,346 Views)

Hi goodnaysayer,

 

Welcome to the graphical programming environment. From your sample VI, you seem to have a good handle on the many features available in LabVIEW. For disabling indices of a Ring, the Disabled Items[] property node would be the tool to do that.

 

As in any programming environment, there may be multiple ways to solve a problem. As long as your code meets your requirements, you should be fine. In this instance, an alternative to using local variables could be using shift registers.  

Tunde S.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,316 Views)