Showing results for 
Search instead for 
Did you mean: 

how to get and display max number

Go to solution



i want to get and display max number if i move slider up/down and should be reset if i press button.



0 Kudos
Message 1 of 14

Max number of what?  Two values? An array?

On array palette, there is an Array Max & Min VI.

On the comparison palette, there is a Min/Max function for comparing two numbers.


Can you be more specific?  Show some code.

LabVIEW 2017
LabVIEW Programming
0 Kudos
Message 2 of 14

Show us the code that you have so far for this.  Show us the slider along with its range.  Show us your approximate front panel layout. 


This is a learning/teaching experience and not just a free code sight.  Are those your only requirements?  How quickly should it read the slider value?  How will this code exit as the requirements so far, only offer a reset option and not a Stop?

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 3 of 14

LOL this is the way he operates.  Extracting info is like extracting a tooth.  I have my own idiosyncrasies when asking a question:  Like I always have incredible amounts of info - except what the forum needs to t-shoot the problem.  Go figure.


Soon enough, we will have something to work with.  🙂

(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 14
  • I have done this just want more that indicator should be reset when i press momentary button.
0 Kudos
Message 5 of 14

When you press the button, the loop stops.  So after the loop, you can write a value to the indicator or you can create an invoke node for the indicator (Reinit to Default).

LabVIEW 2017
LabVIEW Programming
0 Kudos
Message 6 of 14

Hi Asif,


display max number if i move slider up/down and should be reset if i press button.

All you need are:

- a shift register

- the MinMax function

- a select function, connected to your "reset" button

- a numeric constant to set the default max value




Just saw your latest message: You're half way done!


You might have a look at the Pt-By-Pt-MinMax function!

Best regards,

using LV2020 on Win8.1+cRIO
0 Kudos
Message 7 of 14

Then add the button and use a Select? function to set the max to 0 when the button is TRUE and keep the max value when FALSE.  You could also use a Case Structure so that the Max & Min is not ran at all when the button is TRUE and you just wire the current value through for the max value.

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 8 of 14

If by "reset the indicator" you mean to reset the state of the button (on or off), change the mechanical action of the button to be a latch rather than a switch.  This is done on the front panel by right clicking the button.

LabVIEW 2017
LabVIEW Programming
0 Kudos
Message 9 of 14

cant do that. i want that code should start getting max value again from now after i press press any button.



0 Kudos
Message 10 of 14