From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Return to run the program again

Solved!
Go to solution

Hello all!

 

I'm wondering if it is possible to return to the last step of the program to run it again in labview.

 

For example, a vi doing computation, if the final result doesn't satisfy a certain standard, I would like that a one button diagram shows out saying "the

 

program should run again", and when I click the "OK" the program automaticly re-run.

 

Please let me know how could I realize this. Thanks in advance!

 

Chao

0 Kudos
Message 1 of 4
(2,329 Views)

Sounds like a state machine.  Possibly with an event structure that looks for a button press.  When you press the button the event is generated and then the state machine goes into the state that does the work you want.  LabVIEW comes with several examples of state machines and there are a few white papers.

 

http://www.ni.com/white-paper/3024/en/

0 Kudos
Message 2 of 4
(2,296 Views)
Solution
Accepted by topic author jcraffael

Hi Chao,

 

that sounds even more simple than a StateMachine: all you need is to put a while loop around your VI with a button "Continue" (or "Stop") connected with the loop conditional terminal…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 4
(2,288 Views)

Hi Gerd,

 

That works! Thank you very much!

 

Chao

0 Kudos
Message 4 of 4
(2,279 Views)