LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable/Lock Front Panel Programmatically

I agree with him on that you should definitely put your DAQ in a seperate loop. I would try a producer consumer architecture with events and queus. This way you can seperate everything out.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 11 of 14
(1,296 Views)
That would work if you have to disable all the items on your VI.

However, if you had a stop button that you want to activate while it's running and not have control on any others, then sadly all you can do is use property nodes or some complex state machine.

Kudos are the best way to say thanks 🙂
0 Kudos
Message 12 of 14
(1,279 Views)
Can you put all the controls you want to disable in to one (or a or a small number) queue? Then you could just disable the queue and leave the stop button enabled.

Sometimes a fresh look at your front panel is warranted when things start to get so messy. Are there so many controls that the user is overwhelmed? Can the be logically grouped, perhaps using a tab control, popup VIs, or subpanels so that only a modest number of controls need to be managed at any one time?

Lynn
0 Kudos
Message 13 of 14
(1,271 Views)

You do not have to deactivate all buttons at once, I use a subvi which takes a reference to a vi and a string array.  The subvi will loop over the controls[] array property of the vi, and for each control, if the lable (name of the control) is in the array of controls to deactivate (compare the lable of each control to the string array) then set the enable to 1 else do nothing.  Make a second version to enable a list of controls.   This will allow you to turn on and off lists of controls with minimal work.  There is a slight overhead but if you have it in a GUI loop only, you dont have to worry about this.  This is why multithreading user events and DAQ is important.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 14 of 14
(1,259 Views)