04-10-2015 10:02 AM
I have a vi with two event structures however only one of them is running at a time. These are in loops in different states of a state machine. For some reason the second one being in the code is enough to lock up the first one. What could be the reason?
04-10-2015 10:21 AM
Looks like there was a lock front panel checkbox under the events. My question now is whether there is a way to globally unlock all the events.
04-10-2015 10:24 AM
I believe the answer is pretty clear in this Knowledge Base
04-10-2015 12:59 PM
I assume that you have two Event structures in your State Machine because you want to respond to Control 1 in State 1, and to Control 2 in State 2. The simple way to handle this is to set the Disabled property of the Controls that you do not want to trigger an Event in those States where you don't want them, and clear Disabled when you want to use them. This way, you have a single Event loop with all of your Controls inside it, running in parallel with your State Machine, and only those Controls that are appropriate are able to generate Events (with the "appropriateness" controlled by the State Machine). Simpler design, guaranteed to work.
Bob Schor
04-10-2015 01:23 PM - edited 04-10-2015 01:23 PM
@Steve_Block wrote:
I have a vi with two event structures however only one of them is running at a time. These are in loops in different states of a state machine. For some reason the second one being in the code is enough to lock up the first one. What could be the reason?
You need to attach your code, because a verbal description is insufficient.
Looks like your state machine is inside out with loops containing event structures inside states. This will not work. Remember that event structures queue up events even if they cannot execute due to dataflow constraints. Also, by default, events lock the front panel until the event completes. This cannot happen if the evet structure is not in the current code path and the code locks up forever.
04-11-2015 01:42 AM