LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure front panel lock

hi, I have a mouse down event for pushbutton on the front panel to trigger an event. The event structure is under a while loop. However, I checked 'lock FP during the process' but the pushbutton actually registers the mouse click. i.e. once i click the pushbutton during the event(which is supposed to be locked), the event will be triggered again automatically after the current round.

Does anyone know how to fully lock the button? I even add in property node to disable the button in the beginning of the event case but it doesn't work as well.

 

 

Thanks a lot.

 

Cheers,

SSR 

0 Kudos
Message 1 of 6
(4,009 Views)

Hi SSR,

 

usually it's not a good design when the event structure locks the frontpanel longer than a user needs to click more than once...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(3,999 Views)
It is possible for you to post your code and explain what you want to get done?
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 3 of 6
(3,995 Views)

Hi SSR,

 

Maybe what would work better would be to not use the mouse down event at all. Use a Value Change event and in that event disable the button with a property node. Then enable it again when you want to accept user input.

 

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 4 of 6
(3,991 Views)

Hi,

 

The option is to 'Lock the front panel until the event case for this event completes'. If you have this checked, then all other controls are locked until the event triggered by the mousedown completes.  It does not prevent the event from registering in the first place. The mousedown will still register and it's event code will execute regardless if this checkbox setting (unless another event is being processed at the time).

 

Mousedown also registers if you disable the control either programatically or via the menus - you need to change the event to 'Value Change' instead of Mouse Down. If you do this and programatically alter the enabled stated of the control, you can control whether the event is processed or not.

 

HTH

 

Steven

 

edit: stevem181 beat me to it and in fewer words too Smiley Happy

Message Edited by Steven_G on 11-02-2009 10:33 AM
0 Kudos
Message 5 of 6
(3,974 Views)

Disabling the button wont help if the event trigger is mouse down. The mousebutton will still be pressed and generate more events.

 

Use Value Change event for the button, it's alot easier. 🙂

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 6
(3,969 Views)