LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure cases are not working (probably front panel is disabled

Solved!
Go to solution

Please find the attached VI, I was trying to update and inlcude feature to a previously released code. And it ends up in a non-responsive event structure.

 

Is it a bug (related to setting 'Windows run transparently' property) or am I missing something...??


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 1 of 4
(2,977 Views)

First, don't have two event structures on the same block diagram -- the second one isn't needed.

Second, for the key down event to work, the front panel can't be transparent.

Third, what is the timeout event for?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 4
(2,960 Views)
Hi Mike,
Thanks for your reply, I'll check the code once I'll login from desktop. Your suggestions are correct, however I just wanted to know why the event cases aren't executing. As I already specified the intended value of timeout is 50ms, I kept it -1 just to have infinite timeout and the intension is to have emphasis only on the other two cases of event structure.

I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 3 of 4
(2,947 Views)
Solution
Accepted by topic author moderator1983

You have your events set to lock the front panel until complete.  If you have a keydown event, the 2nd event structure captures it as well and locks the front panel.  You might think you have a timeout, but that loop doesn't get the timeout value until the first while loop completes.  Your second loop is dependent on the completion of the first loop.

 

If you don't hit the combination just right with a keydown event (or mouse leave or mouse enter and the other events that would lock the front panel) that also causes that first while loop to stop.  You've locked up your program.

 

As Mike said, don't have 2 event structures on a block diagram when you don't understand how event structures work.

 

I'd recommend reading Caveats and Recommendations when Using Events in LabVIEW.    That document has a few more items that I think it should mention.  But it is a good start.

Message 4 of 4
(2,938 Views)