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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Front panel does not respond (2 exact same while loop in flat sequence) ???LabVIEW BUG???

Solved!
Go to solution

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,

0 Kudos
Message 1 of 3
(2,705 Views)
Solution
Accepted by topic author Olivioloyer

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.

Message 2 of 3
(2,701 Views)

Ok thanks altenbach, 

 

Have a great day

0 Kudos
Message 3 of 3
(2,689 Views)