From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-29-2007 09:31 AM
05-30-2007 01:22 AM
The problem is due to the fact that events are queued by Labview, so even if lock panel activity is blocked during an event X , new events can occur, and if they involve something on the front panel, theier effect on front panel is forbidden until the event X is finished, but those events stays in queue!
Is it possibile to set a filter event for "Enter key pressed" that DISCARDS itself from the queue UNTIL another event is in progress?!?!
05-31-2007 06:23 AM
Ok,
I have tried one path, but it doesn't work
-> disable the button as first operation in the code of the event "Start button: value changed", then enabling the button as last operation. THIS DOES NOT prevent events to be enqueued, so I still have the bug of my first post.
Now I'm trying this:
1) create a reference to the button that generate the event
2) register the event outside the while loop
3) in the event code (<Test start>: value change), I unregister the event with "unregister for event"
This works in the sense that the button correctly works 1 time only.
Now I need to re-register the button again at the end of the event.
Can this work? Boh...
06-04-2007 02:52 AM
Hi,
I hope that your last attempt has obtained a satisfactory .VI behavior.
If you still have that kind of problems, you should send me a very easy exemple about the manage of this event structure with this "Start button". Moreover I need that you highlight me again your purpose and the problems you have met: I have an unclear idea about your application.
Bye
Riccardo
06-04-2007 04:20 AM
06-04-2007 06:33 AM
I also tried it out even with the Set Cursor Busy function... still the Enter short-cut key configured for that Start button takes effect.
Only way I suppose is to disable that button on the first click or forst hit with Enter key; then do the process inside its event & then return to its normal state of False & enabled...
I ve done without using the Event Structure; I m pretty sure that even with the ES, it ll be the same behaviour.
Please see the attached VI in LV 7.1 & post your feedback here...
06-04-2007 07:48 AM - edited 06-04-2007 07:48 AM
Ok finally found a workaround.
Thanks Partha.
I attached 2 example, one using the disable button property doesn't work, like you suggested
But the set/unset busy works. I still don't understand why but it's ok
Thanks I've found something that works otherways I was thinking about "flush event queue", "unregister/register event manually".... omg!!!
Message Edited by Slyfer on 06-04-2007 07:48 AM
07-13-2007 02:36 AM
Unfortunately I discovered a bug so the problem is not completely solved
Ok, consider the last file attachment "Interface that works.vi" (LV8.2.1).
The bug is that if you HOLD down the enter key for a couple of seconds (and you release it before the test finishes), the test WILL START AGAIN one more time, and this behaviour is unwanted.
Disabling the button DOESN'T solve.
Changing the property of the button into "switch when released" or anything else DOESN'T solve.
A new event "Start test: key repeat?" that discards itself is never generated.
How can I do this?
07-13-2007 04:18 AM
07-13-2007 07:53 AM
Oh my God, I found it by myself...
I post the solution for the community
The key missing code was
1) set focus on toggle (advanced , key navigation, binding key to control options)
2) create another event for that button (F5 button in example attached), that handles the "key repeat?" event, and just discards it
3) wire the 100 ms for timeout
and now the problem is finally f***d
If they find another bug in this I give away my black lotus