LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Exclusion of undesirable segments of splitted series

Dan07,

 

Your VI has event cases with no events defined for them.

 

What you want is very similar to what you have except that you want a state machine rather than the event structure.  Unfortunately, there may not be any easy way to convert.

 

Replace the event structure with a regular Case structure.   Add a shift register for the state signal (preferably a type def enum).  Look at the help and examples for "State machine" for more information.

 

I would probably create a duplicate of Events.vi and call it States.vi or something meaningful .  I would create the State control enum.  It would have states like: Load File, Sample Rate, Interpolate, Segment, Build Graph, ... These names are guesses based on the first few event cases. It needs an entry for each state (case).  Remove the event structure and put a case structure in its place.   Connect the state control to initialize the state shift register and the left terminal of the shift register to the Case structure selector terminal.  Then Create Case for every value.  You should now have a while loop with a case structure where the event structure was in Event.vi.

 

Now the tedious part.  Open both Event.vi and States.vi.  Copy the code from the Timeout case Event.vi to the Load File case of States.vi.  Connect wires.

 

Repeat for all cases.

 

Lynn 

0 Kudos
Message 41 of 42
(640 Views)

John

 

Thank you very much for your answer. I think that your idea will help me a lot. I will try to do what you said, and if I have any problem I ask you.

 

thanks again

 

Dan07

0 Kudos
Message 42 of 42
(605 Views)