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.
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?
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. 🙂
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).
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!
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.
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.
cant do that. i want that code should start getting max value again from now after i press press any button.