LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reinitializing values in block diagram

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?

 

 

 

 

0 Kudos
Message 1 of 7
(3,261 Views)

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.

 

Message 2 of 7
(3,256 Views)

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)

 

 

 

 

0 Kudos
Message 3 of 7
(3,248 Views)

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)

Message 4 of 7
(3,239 Views)

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.

0 Kudos
Message 5 of 7
(3,230 Views)

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?

 

0 Kudos
Message 6 of 7
(3,226 Views)

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.

Message 7 of 7
(3,205 Views)