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: 

restarting vi

Well, what I thought was going to be a very easy procedure in LabVIEW ended
up not being so easy. I am trying to have a button that can close the VI and
start it completely over again. Resetting the positions of all of the
controls to off. But there is no restart VI button. So I thought I'd make a
VI that would call another vi in turn calling the original vi back, but the
LabVIEW realized that I was trying to do a recursion, and didn't like that.
Has anyone made this work before? Thanks!

Charley
0 Kudos
Message 1 of 2
(2,457 Views)
Hi Charles

You need your VI with the Restart button to be in a while loop in another VI.

The Restart button would connect out of the VI and to the while loop condition terminal so the loop will continue if the Restart
button is pressed.

Also, to reinitialize all values to default, you will have to set them to default using the VI server property.

Tim


charles adams wrote:

> Well, what I thought was going to be a very easy procedure in LabVIEW ended
> up not being so easy. I am trying to have a button that can close the VI and
> start it completely over again. Resetting the positions of all of the
> controls to off. But there is no restart VI button. So I thought I'd make a
> VI that would call another vi in turn calling the original vi back, but the
>
LabVIEW realized that I was trying to do a recursion, and didn't like that.
> Has anyone made this work before? Thanks!
>
> Charley
0 Kudos
Message 2 of 2
(2,457 Views)