LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stopping the other WHILE loop

Solved!
Go to solution

I have two WHILE loops running independently.

The first one has an Event Structure which monitoring the STOP button for a user click.

The second one is reading a serial port.

When I get an error from the messages coming in on the serial port, I want to cause the other WHILE loop to stop.

 

What is the best way to do this?

 

0 Kudos
Message 1 of 3
(2,410 Views)
Solution
Accepted by topic author nyc_(is_out_of_here)

Connect a case structure to the error wire and write to a signaling value property of the stop button inside the error case.

Message 2 of 3
(2,399 Views)

Another option is to create a User Event that your UI loop can register for.  What this will allow you to do is make another loop that does nothing but handle these errors.  Might not be worth it for a two loop system.  But in larger systems, User Events are quite helpful for broadcasting data, such as errors.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 3
(2,323 Views)