LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I would like to create a reset button

Solved!
Go to solution

I would like to create a reset button for a counter on my vi. I have tried many methods as seen in the forums but my latest one will reset to 0, but as soon as the button is released the number that was displayed when the button was pressed can be seen back in the counter box.

 

As you can tell I am a very new newbie.

 

Any help would be greatly appreciated!! 

0 Kudos
Message 1 of 6
(3,222 Views)

First, there is no reset button on your diagram. If you mean the cancel indicator it is simply connect to zero if the case is true and to the shift register if not. The case doesn't reset anything.

You might consider to replace the shift register by a feedback node that acts on an indicator and a local variable.

 

Cheers

Edgar

0 Kudos
Message 2 of 6
(3,217 Views)

I find the Select function a lot more readable in these situations.  Also, the value you are writing to your indicator should also be wired to the add that is going into the shift register.  Basically, you are not resetting the count stored in the shift register.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 6
(3,201 Views)

Hi thank you for the quick reply. I have done some of what you have said but do not understand the final bit. Sorry to be so useless, I have been given this assignment with an hours introduction to labview! In addition to this I have been watching videos/tutorials etc but still struggling!

 

Thanks again

 

Stuart

0 Kudos
Message 4 of 6
(3,184 Views)
Solution
Accepted by topic author Stueylar

You are so close.  Wire the output of the Select to your indicator.  Also wire that output to the wire directly above it.  Remove the "short circuit".

 

The shift register on the left should only be going to the Select function.  The output of the Select should be going where you put the wire from the shift register (the add function on the right).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 6
(3,178 Views)

Thank you!!! Smiley Happy 

0 Kudos
Message 6 of 6
(3,173 Views)