LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable/Lock Front Panel Programmatically

Hello

I have a huge project with a bunch of boolean controls. Each boolean triggers an event. So when an event is triggered, I disable all other booleans to avoid any event lock up.

There are cases where I have to disable ALL the boolean, for ex. when saving, I disable all controls till a report is generated. Is there anyway I can lock or disable the front panel programmatically rather than use property nodes to disable them ? I am losing a lot of my real estate and VI becomes really huge (1.41 MB so far, just the top level 😞 )

Thanks !!

Kudos are the best way to say thanks 🙂
0 Kudos
Message 1 of 14
(7,968 Views)
One of the options in the event structure is "Lock front panel until event case for this event completes".  Make sure it is checked and that will disable all the controls until the event completes.
Message 2 of 14
(7,962 Views)
You can also move the property nodes to a subVI. You pass a reference of the control or an array of references to the subVI.
Message 3 of 14
(7,957 Views)
Lazy method...make a transparent boolean to cover real estate to 'lock'.  Condition which disables controls makes this boolean 'visible'...and user can't get to other controls.  To enable other controls, make covering boolean 'invisible'.  No loops, no fuss.
0 Kudos
Message 4 of 14
(7,951 Views)

"Maximus00" <x@no.email> wrote in message news:1163002210366-438369@exchange.ni.com...
Hello I have a huge project with a bunch of boolean controls. Each boolean triggers an event. So when an event is triggered, I disable all other booleans to avoid any event lock up. There are cases where I have to disable ALL the boolean, for ex. when saving, I disable all controls till a report is generated. Is there anyway I can lock or disable the front panel programmatically rather than use property nodes to disable them ? I am losing a lot of my real estate and VI becomes really huge (1.41 MB so far, just the top level 😞 )Thanks !!


Hi,


The quick and dirty "old school" method: create a transparent button, and hide it to enable everything. Show it to disable everything under it.


It doesn't disable tabbing though...


Regards,


Wiebe.
0 Kudos
Message 5 of 14
(7,942 Views)
Evan

that's how I had it initially. If you have few menus and controls enabled and the particular event has ""Lock front panel until event case for this event completes" ON, and click one of those ... for some reason it queues the event for that control and executes it after your current event is complete ....

Thanks

Kudos are the best way to say thanks 🙂
0 Kudos
Message 6 of 14
(7,935 Views)

Maximus00, like you, I have a huge VI (complex UI with controls/indicators), It is now 2.5 MB in LabView 8.20 (in 6.1, it is about 5mb).  I'm looking for the same thing, that is how to disable the Event Structure "locking front panel".   Currently, I disable all 50 events for this feature, but this is cumbersome, tedious, and should be a better way.  I came across your post and wish LV had a way to programattically disable it, via a property node.    The VI I am working is large, and will most likely be used be maintained by multiple developers so it is critical that there is some way to inhibit the "locking front panel", anytime they add or edit an event.   It is definitely NOT a good thing to have the VI lock up!  By Programmatically disabling all of the event structure's locking front panel, this would protect the VI code from locking up, if a new developer is unfamiliar with the code.

If anyone knows a way to Disable/Lock Front Panel Programmatically let us know!!

-crazycliffy

- crazycliffy
0 Kudos
Message 7 of 14
(7,809 Views)
The way that I have learned to do this is to set the cursor to busy when you need it to lock the front panel this way no events register and set it to regular when the event is done. I have done it this way ever since I learned it from one of Jim Krings post. It works and is not hard to code.
 
 
 
oops I did not realize this thread wad that old. OH WELL!!!

Message Edited by Jhoskins on 04-17-2007 02:09 PM




Joe.
"NOTHING IS EVER EASY"
Message 8 of 14
(7,797 Views)

Yes the busy cursor is definitely a good idea.  I haven't tried messing around with them yet,

But how do you handle cases where let say you want to "Start" continuously acquire data, and have to push a certain button top "Stop" data acquisition?  If cursor is set to busy state, then you will be locked out ! 

- crazycliffy
0 Kudos
Message 9 of 14
(7,788 Views)

Its usually a good idea to place your daq and user events in seperate threads for this exact reasom.  You want to lock the user events without screwing with your daq timing.  This is especially true with complex large interfaces like you describe.  I would use the disable property in your situation, this way you can disable all or some of the controls at any given moment.

 

Paul

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