From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Solved!
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
http://forums.ni.com/ni/board/message?board.id=170&thread.id=359822

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
(2,613 Views)

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.

 

Mike

0 Kudos
Message 2 of 5
(2,605 Views)

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
(2,603 Views)
Solution
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.

 

Mike

Message 4 of 5
(2,596 Views)
Thanks that works great 🙂
0 Kudos
Message 5 of 5
(2,592 Views)