LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure counting

How can I add a repeat step to the sequence structure. I have this attached event structure working. I wont to add a repeat control (not wired yet) to steps 2 through 5. This would allow for repeating any step (except the first one) a set number of times then go to the next step. Any ideas?
0 Kudos
Message 1 of 2
(2,594 Views)

I had a very brief look at your code.

If I was coding the solution and keeping it simple, I would have the top look handle user events (Event Structure) and a second loop that has a state machine.  The state machine would consider both internal state chanegs as well as any state change from the Event handler (above loop).  Data would be sent from the Event loop to the state machine loop via Queue because it may contain instructions such as "run" or "repeat", etc.

There is a template for the architecture that I describe under the File Menu > New > From Template > Producer / Consumer Design Pattern (Event).  You would have to change the bottom loop to a state machine. 

RayR

0 Kudos
Message 2 of 2
(2,586 Views)