LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

In Range and Coerce

I am having some inconsistencies with the In range and coerce function.  I realize the problems with trying to representing numbers exactly in binary format.
In my main program I get one result, and when I created a test case in a different vi, I get the opposite result.
How can I account for this in my code?
Attached are pictures of both VIs.
Thanks
Download All
0 Kudos
Message 1 of 6
(3,281 Views)
You simply need to increase your tolerance to a level where the results are as desired. 😄

Message Edited by altenbach on 05-17-2006 12:34 PM

0 Kudos
Message 2 of 6
(3,261 Views)
That's part of the problem, I can't.
We are testing whether a measurement is inside a specific interval to determine whether the measurement is in tolerance. 
So we can't widen that interval.
0 Kudos
Message 3 of 6
(3,255 Views)
You only need to widen it by a hair to take care of binary rounding. e.g. try to add 1e-12 to your tolerance. It won't make any real difference to the result.
 
 
0 Kudos
Message 4 of 6
(3,239 Views)
Good idea.  I'll give it a try.
thanks for the suggestion
0 Kudos
Message 5 of 6
(3,231 Views)
Nice suggestion, it worked great!!! Smiley Happy Smiley Happy Smiley Happy
Thanks again
0 Kudos
Message 6 of 6
(3,208 Views)