LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to break a flat sequence structure ...??

How to break a flat sequence structure into two flat sequences structures......i am a student learning labview....help me..

0 Kudos
Message 1 of 7
(4,601 Views)

Just delete it and place two indivudual flat sequences in the place of the original frames. 😉

0 Kudos
Message 2 of 7
(4,597 Views)

Well i have 21 steps to perform a one complete process of my requirement in a machine. I am using a flat sequence having 21 blocks. Now i want to continue my process for 'N' no.of times for which i dont want the repeat the first three structues (i.e i need to start from step 4 to 21.)  So, how can i achieve this...???

0 Kudos
Message 3 of 7
(4,590 Views)

Don't use the sequence structure. Convert it into a state machine. It is a much more flexible design and much easier to control, modify and maintain. Start with defining your state machine and processing on paper. Effectively, write a description of each subtask and what events transition you to each task and what decision points are reqauired to exit each subtask. In LabVIEW a state machine is essentially a case statement within a while loop.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 7
(4,584 Views)

I have really less time to submit this sir....i cannot handle the pressure to learn new thing n to it again.....can i get a help in the same flat sequence plz.....i am just a beginner....Plzz... 

0 Kudos
Message 5 of 7
(4,582 Views)

I guess painting yourself into a corner like that was a valuable lesson. 😄

 

Here's what you could do: Take the code from the first three frames and place it outside, now delete the first three frames, Wire everything back up.

0 Kudos
Message 6 of 7
(4,577 Views)

To accomplish what you want you need to basically write some really ugly code. This is a side effect of using the flat sequence structure in the first place. This is exactly why they are not recommended.

 

First and foremost you will need to place your frame structure inside a loop. This will control how many times you execute the code.

 

Now you have a few alternatives to skip the first three steps which are kludging but time is of the essence.

1. Place a case structure around the code within the first three frames. Each frame will have a case structure. You can use the loop count to control only executing the code the first time through the loop.

2. You could combone the code of the first three frames into a single subVI and then use the same approach described above to skip executing that subVI.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 7 of 7
(4,575 Views)