Hi there,

I tried out your problem and it does seem peculiar.  At first I thought you
were getting the anomaly due to you not placing the boolean control within
the event state, but that wasn't the case.  Observing what happens first
hand, it seems to me the user interface thread is overloaded with user
events that it simply locks the UI out.  When a lockout occurs, it's simply
LabVIEW (or the OS?) trying to limit the amount of events coming in from the
UI thread.  I learned about this back in the LV 6.1 days.  Seeing your
design work makes sense in my head why it would lock you out... And it's all
due to user events timing... Too many get queued up before the Event
Structure can handle them fast enough.

Maybe you can consider placing the event structure in a separate loop?  This
might seem too much... But at least have the "Boolean: Value Changed" event
trigger another 'mirror' indicator "Status".  Then, have State 1 review the
state of the "Status"... This way, you're separating your UI from your
Process threads and you shouldn't have a lockout state.

Good luck!

-------
Juan Carlos Flores
ArchonWest Technologies
telephone: 888.824.2320
mobile: 323.620.1548
http://www.archonwest.com

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of E. Blasberg
Sent: Thursday, June 10, 2004 2:13 AM
To: [EMAIL PROTECTED]
Subject: Event Structure locking front panel control


Hi All,

I discovered something unusual (at least to me) about the Event 
Structure in a State Machine which I don't entirely understand.  I've 
verified that it works the way I will describe below in both LabVIEW 
6.1 and 7.0 (under Windoze XP).

1) Make a Boolean on the front panel (NOT Latched)
2) Make a State Machine with the following states: Poll, 1, 2.
3) In Poll, make an Event Structure with no Timeout and only one 
event: Boolean Value Changed
4) If the Boolean changes, send the State Machine to state 1 (I put 
Wait 200 ms in States 1 & 2)
5) In State 1, if Boolean = True, stay in State 1.  If False, go to State 2

What I found is that I can get the code to go to State 2 just fine (I 
see it looping with the lamp on) when the Boolean is set to False. 
However after that, I cannot click on the Boolean on the front panel 
any more- it seems to be locked!  State 2 was supposed to send the 
state machine back to Poll when the Boolean went True, but there's 
just no way to click on the Boolean.

Emperically I guess this is the way it's supposed to be, but I don't 
understand why.  My guess is that the Event Structure is somehow 
trapping changes to the Boolean and then freezing it but, again, I 
have no idea why this should be.

I expect many of you will reply "Why in the world do you want to do 
this (especially since the above logic probably seems pointless)?" 
I'd prefer to put that question off for now.  Suffice it to say that 
I needed this functionality and the only way to make it work was to 
no longer have the Event Structure track changes to the Boolean (the 
original program would go to State 1 for 30 seconds, unless the 
boolean was hit again before the time was up, at which point it would 
go to State 2 until it was turned back on when it would go back to 
State 1 until the full 30 seconds was up).

So, to be slightly more concise: any idea why an Event Structure is 
locking a front panel control when the software is in a state in a 
State Machine in which it (the Event Structure) is not being called?

Much thanks in advance for any enlightenment on this...
E. Blasberg
iDAQ Solutions Ltd





Reply via email to