11-20-2008 05:48 AM
I am using Labview 8.2
After a VI is stopped, I need to reinitialize the front panel values to default.
This can be done from the edit menu but I want to do this in the block diagram itself after the VI finishes executing.
How to do it?
11-20-2008 06:15 AM
Create an invoke node on your block diagram, select a class of "VI" and then call the "Reinitialize all to Default" method.
Use data flow (the error in and error out connectors) to control when this is performed.
I would suggest calling this as the first step when running a VI rather than the last step; otherwise you can't easily see the contents of your indicators (outputs) while debugging.
11-20-2008 06:45 AM
I also wanted to know the way to flush the memory contents used by the VI after it we click on the stop button. (Labview 8.2)
11-20-2008 07:12 AM
stop button in the VI itself, or the abort execution button at the top?
If the stop button is in the VI, you can add the "Request Deallocation" VI, found in application controls to the end of your VI.
If you meant the abort execution button, I recommend adding a way to stop your VI with it's own button, and using the above method. (abort execution is not the best way to stop a VI)
11-20-2008 08:09 AM
Hello Philip,
I am completely new to Labview. If you could help me out with a block diagram attachment , it will be really great.
I got to know where the invoke node VI is but I am clueless about selecting a class and then using the reinitialize to default method.
Sorry for the inconvienience.
11-20-2008 08:13 AM
The problem which I am having is that the feedback node contents appear in the next VI run after I stop it.
Would the method you mentioned clear the feedback node contents too?
11-20-2008 09:50 AM
On most feedback nodes, there is a terminal for initialization. You could set that terminal to any value to start the process off...
Example attached.