LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I rerun the VI without starting and stopping?

Solved!
Go to solution

I have a VI that processes incoming data. I would like to clear the shift registers and be able to process (1) the same data file, over my user-selected interval OR (2) a new, user-selected data file. Problem is, I don't know how to rerun the vi AND I don't know how to clear the shift registers. I'll keep searching the forums and looking through the help topics, but so far I haven't found anything that has worked properly with my program.

 

Thanks,

 

Em

0 Kudos
Message 1 of 9
(4,344 Views)

Could you post an example of your code for us to look at it is hard to tell you how to fix a problem if we can not see what you are doing.

 

If if you are having to restart your vi everytime I would expect that you need to place it in a while loop.

 

All you have to do to clear the shift register is to attach a blank control to the shift register.

 

If you give an example of your code I can help a little mnore.

Tim
GHSP
Message 2 of 9
(4,338 Views)

Oops, forgot to load the image.. Sorry for the size. Any smaller and I can't really follow the code.

block diagram1.png

block diagram2.png

0 Kudos
Message 3 of 9
(4,330 Views)

here is how you clear a shift register

 

 

 

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 4 of 9
(4,326 Views)

Thank you for that information. Robot Happy

 

Can you (or anyone, really) give me a tip on how to restart (-run, -initialize) my VI without Quitting and Rerunning my VI? My end goal is to have a VI that both re-process data from the same data file or a new user-specified file without starting and stopping the VI. Now that I can clear the shift register, how do I tell my VI to start all over (or from last file)?

 

Thanks.

0 Kudos
Message 5 of 9
(4,297 Views)

It looks like you are using a state machine so maybe if you could have the operator control the state of your machine that may work?

 

 

and if you want the program to keep running in a loop all you have to do is use your state machine's enum to make it run in that loop

Message Edited by Harold Timmis on 08-26-2009 02:36 PM
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 6 of 9
(4,293 Views)

I have tried wiring it that way. So far I've been unsuccessful in having my VI run properly.

 

Thanks though.

0 Kudos
Message 7 of 9
(4,290 Views)
maybe this will help
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 8 of 9
(4,282 Views)
Solution
Accepted by topic author Em1234

I didn't use that method; however I was able to get the VI to re-run. I ended up putting another while loop around the whole VI with just the filepath shift-registered to the loop. I then wired the "Next Run" button to the "Stop" on the interior while loop signaling that loop to end and the filepath to return to the begining of the external while loop and re-run the VI. I wired the old "Quit" button to the new "Stop" on the external while loop. It's probably not the most eloquent way to work the VI, but it runs how I want it.

 

Thanks for the help though!

Message 9 of 9
(4,254 Views)