LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop and resume a subVI from the main VI?

I am trying to write a test sequencer, I need to start a subVI (which is a test sequence) from my main VI, I'd like to control the execution of subVI by pressing the 'stop' 'resume' 'jump step' button in the main VI. Does anyone have any idea how to implement this in LV?

Thank you.
0 Kudos
Message 1 of 3
(2,724 Views)
This sounds like a perfect application for a state machine. In LabVIEW a state machine is usually implemented as a case statement inside a while loop. Look at examples and search for "state machine."

Lynn
0 Kudos
Message 2 of 3
(2,724 Views)
Yay for State Machine!! I would actually recommend the State Machine Using Events design pattern. Taking advantage of the Event Structure will allow you to replace the "Idle" state in the traditional state diagram design pattern. Instead, we are not waking LabVIEW to handle particular events on the front panel.

More information regarding the State Machine design pattern as well as design patterns in general are available:
NIDZ Tutorial: Changing the Face of Design Patterns with LabVIEW 7 Express Event Structure
NIDZ Tutorial: Applicati
on Design Patterns: State Machines

LabVIEW Application Design Patterns

Good luck. 🙂
0 Kudos
Message 3 of 3
(2,724 Views)