LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reseting controls & indicators when execution stops

halo everyone

I was working with a project that also using the boolean indicators along with it. my prob is when i terminate the execution using the stop button available in the panel,the boolean indicator remains in the same state as it in run mode.In case of off state there will not be any prob but in case of ON state it remains glown even after i terminate.Is there any solutions for this.... 

0 Kudos
Message 1 of 10
(4,228 Views)

Scan the stop button key press event. Create a local variable and give a false constant when stop button press occurs.

 

Hope this helps?

Mathan

Message Edited by Mathan on 09-24-2009 04:03 AM
0 Kudos
Message 2 of 10
(4,227 Views)
Wire a NOT gate function between the Stop button in the panel & the local variable of the Boolean indicator, kept outside the loop after the execution gets finished.
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 3 of 10
(4,216 Views)

The local variables are a good way to go, but if you have lots of things to "reset", try the code in the picture. This'll set Everything back to the default value after stopping.  This will work for you if your indicators are False by default (which they probably are).

 

This is an Invoke Node set to Class VI Server > VI > VI and Method set to Default Values > Reinitialize All To Default.

 

 

resetAll.gif

Message Edited by Broken Arrow on 09-24-2009 07:27 AM
Richard






Message 4 of 10
(4,200 Views)

And if you were to use the correct mechanical action (Latch When Released), you would not need any locals or property nodes. If you have this and are using an event structure, you just have to place the indicator inside the event.

 

Note: if you right click on the termination terminal and select Create Control, you automatically get a Boolean with the correct mechanical action.

0 Kudos
Message 5 of 10
(4,195 Views)

Dennis Knutson wrote:

And if you were to use the correct mechanical action (Latch When Released), you would not need any locals or property nodes. If you have this and are using an event structure, you just have to place the indicator inside the event.

 

Note: if you right click on the termination terminal and select Create Control, you automatically get a Boolean with the correct mechanical action.


 

Dennis,

It depends on how you interperet the OP's post, but I think he's referring to just having some bool indicators that don't get reset, not so much the fact that the Stop button itself isn't getting reset. Maybe we'll find out....

Richard






0 Kudos
Message 6 of 10
(4,186 Views)
thank u all but wat i actually meant is the abort execution buttonabort.GIF is there any choice for that
0 Kudos
Message 7 of 10
(4,136 Views)
No. The abort button should never be used as a normal way to stop your program. You can avoid the temptation by going to VI Ppoperties>Window Appearance>Customize and uncheck the 'Show Abort Button'.
0 Kudos
Message 8 of 10
(4,132 Views)

siddhu@sands wrote:
thank u all but wat i actually meant is the abort execution buttonabort.GIF is there any choice for that

 

"O... K... "

Richard






0 Kudos
Message 9 of 10
(4,127 Views)

Rush,

I had something similar to what you described in an earlier version of a subroutine. I was able to generate some values after running the subroutine, push them to the main program, and re-initialize the subroutine when done. I used a flat sequence (re-initilize in the last frame). I am trying to use the same subroutine in an updated version of the main program and I'm finding that the values put out from the subroutine are always the default values, i. e., the subroutine is calculating the values I need but it is re-initializing before sending the values out.

 

I'm using the same techinique with another subroutine and it is working fine.

 

Any suggestions to what might have caused this.

 

Note: The original software was developed in 8.6 and now I'm using 2009.

 

Thanks

0 Kudos
Message 10 of 10
(3,704 Views)