07-05-2013 03:13 PM
Hi everyone,
I have two while loop with exactly the same code and a user event structure inside each loop,
They are both doing the same thing which is too run until recording to clicks(a line) on an IMAQ image control.
I used a flat sequence to manage the execution order.
The problem is when I use only one loop (putting the other one in a disable diagram) the front panel respond perfectly and the program does what it should, But when I enable both loops it gets stuck in timeout event....
I don't understand what is happening I cannot do any front panel activity that would be registred, you'll find enclosed a copy of the VI (you might require NIVision to run the vi).
Any Idea? Is this a bug or did I do something wrong?
Thanks a lot,
Best regards,
Solved! Go to Solution.
07-05-2013 03:23 PM - edited 07-05-2013 03:27 PM
This is not a bug, but expected behavior. You cannot sequence event structures like that, they both need to be ready to react. Use a single event sutructure and a state machine architecture. You have about 4 copies of basically the same event handling code. Try to combine them all into one!
What is happening in your case?
Answer: Both event structures will start immediately queueing up events, but the second event structure cannot react to them because it is inaccessible due to dataflow. In addition, the second event structure is set to "lock front panel until event completes". Since the event cannot complete as explained above, the front panel locks up forever.
07-05-2013 03:36 PM
Ok thanks altenbach,
Have a great day