Showing results for 
Search instead for 
Did you mean: 

max and min values won't maintain their correct values tia sal22

Go to solution

max and min values won't maintain their correct values  tia sal22

Greetings all

I'm having a little trouble getting the max and min value to stay at their correct max and min values.
Their values keep changing (going up and down) Trying to get the max value to only show the max value at any given time and the same for min value.  I looked up max and min examples and it looks like it should be in a while loop

but should I add another while loop and if so do I place this in the for loop? or is there a better way to do it.

tia sal22

0 Kudos
Message 1 of 5

Hi sal22,

what have you done so far? You can use the Max & Min function. Store the max result in a shift register and use it also as an input in the next iteration. If you need it from an array, then you can use the Array Max & Min function before.



0 Kudos
Message 2 of 5

I'm not sure what you mean what have I done so far?  I posted the vi and a jpg image with the max and min function going to the array I just don't know how to get the max value to only go up and the min value to only go down.  It just shows every value.  By that I mean the Max shows every value greater than 0 and the Min shows every value less than 0


tia sal22

0 Kudos
Message 3 of 5
Accepted by topic author sal22

Hi sal22,

i thought it was only an example which you found somewhere, because it's called coq rouge. See the attched example.



Message 4 of 5
Thanks that works great 🙂
0 Kudos
Message 5 of 5