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: 

how to stop a flat sequence (or timed sequence) that is inside of a for loop

Solved!
Go to solution

 

The problem is this, I have a for loop that repeats 10 times and inside of this for loop  I have a flat sequence (or timed sequence) with four frames, each one of this frames evaluate a different condition of a vector that i am introducing.

 

What i woud like for exmaple is the next:

I am in the fith count of the for loop and in the case that the frame 2 does not fulfill the condition, the flat sequence (or timed sequence) stops, and begin again the for loop but this time for the count number 6.

 

 

I would appreciate your answer.

0 Kudos
Message 1 of 4
(10,079 Views)
Solution
Accepted by dafemagu

You cannot stop a sequence structure.  That is the way they are made.

 

What you should consider is getting rid fo the sequence structures and changing to a state machine architecture.  There are lots of examples within LabVIEW and on the Forums.  The big advantage of the state machine is that at the end of each state it examines the conditions and determines which state will execute next. And that is exactly the description of the problem you are having.

 

Lynn

Message 2 of 4
(10,076 Views)

I would ask you to go for a case structure replacing the Flat sequence (State machine) and do the same thing whatever you wanted.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 4
(10,074 Views)

I would also suggest you go for a state machine.

 

Replace your for loop with a while loop, replace your flat sequence with a case strucutre. you have the state machine. refer to the forums and ni examples for simple state machine architecture

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 4 of 4
(10,060 Views)