キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

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 件の賞賛
メッセージ1/14
8,078件の閲覧回数
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.
メッセージ2/14
8,072件の閲覧回数
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.
メッセージ3/14
8,067件の閲覧回数
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 件の賞賛
メッセージ4/14
8,061件の閲覧回数

"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 件の賞賛
メッセージ5/14
8,052件の閲覧回数
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 件の賞賛
メッセージ6/14
8,045件の閲覧回数

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 件の賞賛
メッセージ7/14
7,919件の閲覧回数
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"
メッセージ8/14
7,907件の閲覧回数

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 件の賞賛
メッセージ9/14
7,898件の閲覧回数

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 件の賞賛
メッセージ10/14
7,892件の閲覧回数