08-26-2009 11:47 AM
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
Solved! Go to Solution.
08-26-2009 12:06 PM
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.
08-26-2009 12:33 PM
Oops, forgot to load the image.. Sorry for the size. Any smaller and I can't really follow the code.
08-26-2009 12:50 PM
here is how you clear a shift register
08-26-2009 01:27 PM
Thank you for that information.
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.
08-26-2009 01:31 PM - edited 08-26-2009 01:36 PM
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
08-26-2009 01:34 PM
I have tried wiring it that way. So far I've been unsuccessful in having my VI run properly.
Thanks though.
08-26-2009 01:44 PM
08-26-2009 03:55 PM
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!