LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Restart VI with a button

Hello All,

 

is it possible to restart VI with a button/value change...?


For example, I want to press button, and my VI should stop and start again immediately...

I tried this way, but I don't know how to start it again...

11.PNG

Can someone advise please...

 

Best regards.

Milan

 

0 Kudos
Message 1 of 5
(2,194 Views)

Not really.

 

But you can use a State Machine and go back to your first state with a button press very easily.


GCentral
0 Kudos
Message 2 of 5
(2,186 Views)

@cbutcher wrote:

Not really.

 

But you can...


"Could vs Should"

 

Spoiler

 

I was given some code developed by others that had a "restart button". That button invoked a ".bat" file that delayed a short time and then invoked the "exe" of the top-level VI. I had to wonder what type of trouble were they having that they decided to implement a restart of the program? I hope I never find out!

  Smiley Wink

 

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 5
(2,175 Views)

@Ben wrote:

@cbutcher wrote:

Not really.

 

I was given some code developed by others that had a "restart button". That button invoked a ".bat" file that delayed a short time and then invoked the "exe" of the top-level VI.


I knew someone would make me happy I didn't write "no". But let's at least stick with "don't do this!" 🙂


GCentral
Message 4 of 5
(2,173 Views)

OK, I will try with state machine...

I will get back to you..

 

Thanks

0 Kudos
Message 5 of 5
(2,170 Views)