LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Will this always work?

Solved!
Go to solution

I'm a little worried there could be some case where this wouldn't come out to true. If so, is there a better way to do it? Just noticed if ucrrent min = value to check it will say new min even if there isn't, so I will account for that. But I'm more concerned about the equal comparison between value to check and min

 

 

0 Kudos
Message 1 of 6
(2,242 Views)

@for(imstuck) wrote:

I'm a little worried there could be some case where this wouldn't come out to true. If so, is there a better way to do it? Just noticed if ucrrent min = value to check it will say new min even if there isn't, so I will account for that. But I'm more concerned about the equal comparison between value to check and min

 

 


From your post, I'm not certain whether your concerns mimic mine, but I'd be a little worried about comparing two floating point values.

Bill
CLD
(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 2 of 6
(2,234 Views)
Solution
Accepted by topic author GregFreeman

If you have concerns, why not ValueToCheck<CurrentMin and use the output for NewMin and an input select ?

(Sorry, no LV on this PC)

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 3 of 6
(2,222 Views)

If it directly copies the value coming in when ValueToCheck is the new minimum, I don't think there are any concerns. I am assuming it does this. But, then I believe -0 and 0 are the only things I'd have to worry about.

 

For this particular min max comparison, there isn't much of an issue because if it's off due to rounding, it doesn't matter from my point of view. They will just get a min with a new timestamp of the time the min occured at. Not really a big deal. More for my own knowledge.

0 Kudos
Message 4 of 6
(2,221 Views)

Why not check to see if the value to check is less than the current minimum?

Message 5 of 6
(2,219 Views)

@Henrik_Volkers wrote:

If you have concerns, why not ValueToCheck<CurrentMin and use the output for NewMin and an input select ?

(Sorry, no LV on this PC)

 


Doh. It's Monday...

0 Kudos
Message 6 of 6
(2,218 Views)