LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make "Enum Control" disabled during run-time of an executable application, and make it enabled when application is stopped/aborted?

Solved!
Go to solution

Hello,

 

I'm using an "Enum Control"  on Front Panel of an executable application built with application builder of LabVIEW 2013 full professional development system. I want  Enum Control to remain enabled before execution of that application so that I can select any value from the available list of numerical values, but when I run that application; Enum Control should become disabled so that user can not select any other value from the list of given values while application is running so that pre-selected value remain unchanged during execution of that application. Enum Control should also become enabled when application is stopped/aborted so that user can select any value.

 

Could anyone pls suggest a solution to this problem?  If I select Enabled state" to "Disabled" from Appearence tab then all listed values become disabled.

 

 

Regards

 

 

Jamal

 

0 Kudos
Message 1 of 18
(5,253 Views)

Hi Jamal,

 

This is how you disable and enable a control (grayed out is a preference of mine, so the user doesn't think something is frozen up):

 

disable control.png

 

However, there is certainly a better way to perform user interface interlocks. It may take a little more effort, but a good application should close when the user stops it, and the user should not have to use it in a sort of "developer" mode. If you are running a test, you can have the the Enum grayed out when the user hits "Start Test" and have it enabled again when the test completes, for instance.

Message 2 of 18
(5,242 Views)
Solution
Accepted by topic author Mr_Engineer

I would suggest using the Disabled property node.  You can then disable the enum at the start of the program and then enable it as part of the shutdown.


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
Message 3 of 18
(5,235 Views)

Thank you for response. I am using Enum Control inside a case structure which is nested in the while loop. Could you pls explain the purpose of wait function used in the 2nd frame of flat sequence structure?  Could you pls suggest  " better way to perform interlocks on controls of the front panel of an executable application".

 

Regards.

 

Jamal

 

 

0 Kudos
Message 4 of 18
(5,220 Views)

The wait function was just so that you could see it disable for a second and then enable again (to simulate your program running). Generally I avoid sequence structures unless error wires are unavailable.

 

If your program is working for you, then you can stick with that for now. When you want to look into creating more responsive user interfaces, you can research the event structure, which you can tell to respond to different events. The events can be a button press, for instance, so that something happens as soon as the user presses a button.

Message 5 of 18
(5,214 Views)

Thank you for response.  I mean when I run executable application; Enum Control automatically become disabled, and when I stop/abort application; Enum Control become enabled so that I could select any of its given values.

 

Regards,

 

Jamal

 

0 Kudos
Message 6 of 18
(5,212 Views)
Solution
Accepted by topic author Mr_Engineer

Yes, then you will want to put the disable at the beginning of your diagram (often far left), and the enable at the end. The sequence structure is one way to do this. You would make it larger and put your program inside the middle frame. A better way is to take the error wire from the property node and wire it to your while loop (which I understand keeps your entire program running). You would want the "enable" property node to wait for an error out from your while loop, but then right click the property node and select "ignore errors..." to make sure the property node executes.

Message 7 of 18
(5,202 Views)

I want to keep Enum Control disabled as long as application is in running, and I want to keep it enabled as long as I do not hit run button to run application.

 

Regards,

 

Jamal

0 Kudos
Message 8 of 18
(5,200 Views)

As I mentioned in my previous reply; I am using Enum Control Inside the case structure which is nested within the while loop. So the Enum control is also inside the while loop. Could you pls suggest how to do that? 

 

Thanks for response.

 

Regards

 

Jamal

0 Kudos
Message 10 of 18
(5,189 Views)