Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop multi-while loop without delay in cRIO

Solved!
Go to solution

Dear all,

the VI in cRIO has a big while loop, it contains 4 small while loop working parallel. In each small while loop, they have a stacked sequence with many frame.
I want to stop all with only one STOP button from my host Vis. But when I press STOP, I have to wait all the small while loops finished their tasked and finally the big one can stops. Are there any solution to stop all immediately? 


Thanks so much

0 Kudos
Message 1 of 3
(3,225 Views)
Solution
Accepted by topic author d4nvjpl0ng4n

@d4nvjpl0ng4n wrote:

the VI in cRIO has a big while loop, it contains 4 small while loop working parallel. In each small while loop, they have a stacked sequence with many frame.
I want to stop all with only one STOP button from my host Vis. But when I press STOP, I have to wait all the small while loops finished their tasked and finally the big one can stops. Are there any solution to stop all immediately?


1. You should not have the large While Loop.  That is just adding unneccessary complexity.

2. You are hitting the major issue with Stacked Sequence Structures: everything must run through before it is complete.  The solution is to use a State Machine.


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
0 Kudos
Message 2 of 3
(3,217 Views)

Thanks for your reply, I am trying to work with state machine.

0 Kudos
Message 3 of 3
(3,175 Views)