LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with "In Range and Coerce" Vi

Solved!
Go to solution

 

I am trying to use, in range and coerce vi to determine if the measured time  was 10 ms within the range. The VI work fine except when the lower limit equal the measure time.  or when the measured time equal the upper limit. 
How do you include the lower limit and upper limit ? 
 

I am trying to use, in range and coerce vi to determine if the measured time  was 10 ms within the range. The VI work fine except when the lower limit equal the measure time.  or when the measured time equal the upper limit. 
How do you include the lower limit and upper limit ?  

 

0 Kudos
Message 1 of 13
(5,289 Views)

right clink on the node and select to include the lower/upper limit


Paul
0 Kudos
Message 2 of 13
(5,287 Views)

This is, of course, explained in the LabVIEW Help for that function. Did you read it?

0 Kudos
Message 3 of 13
(5,274 Views)

While Paul's suggestion above is a good one, you are probably not quite there yet.

 

Because of the inherent limits of the internal DBL representation, you might still get some unexpected results.

 

Where is the data coming from?

0 Kudos
Message 4 of 13
(5,271 Views)

 


@smercurio_fc wrote:

This is, of course, explained in the LabVIEW Help for that function. Did you read it?


 

read help?  who does that? Smiley Wink

 

More to the point.  there are a lot of configuration items that are accessible through the right click context menus.


Paul
0 Kudos
Message 5 of 13
(5,270 Views)

 


@altenbach wrote:

While Paul's suggestion above is a good one, you are probably not quite there yet.

 

Because of the inherent limits of the internal DBL representation, you might still get some unexpected results.

 

Where is the data coming from?


 

To Altenback's point.  Typically when I use this function I will round the number up or down to the next increment of the precision I have the indicator.

For example.  Lower limit of 4.2, actual measurement 4.19998765.  This fails, but when looking at the results in an indicator, typically you would see 4.2 and not understand why it is failing.  So when the function returns a fail AND my indicator is set to show two decimal places, I will round the result down to 4.19 so it is obvious.  But when storing the date to file or a database, I write the full 4.19998765


Paul
0 Kudos
Message 6 of 13
(5,263 Views)

Apparently, he's dealing with "measured time", and I don't really know exactly what this means in this context (Measured how? ticks, timestamps, GPS, NTP, atomic clock, pendulum, etc...).

 

Personally, I would probably keep things as integer in milliseconds to remove all ambiguity. I love blue wires!

Message 7 of 13
(5,249 Views)
thank for all the suggestions i already right click and including all the lower and upper levels. Can you please try the suggested values and tell me if it works on your pc.
0 Kudos
Message 8 of 13
(5,229 Views)
Solution
Accepted by topic author sticyfinger

Same old story:

 

Make sure you display enough digits to see what is going on:

 

0.011000000000000001100000 lower limit

0.010999999999999999400000 value <---out of range!

 

(See attached examples)

 

Add a small increment to the limit (e.g. 0.0001) and you should be OK

Download All
0 Kudos
Message 9 of 13
(5,219 Views)

i am dealing with time in ms but i represent it with second. nothing complex.  i can  not afford to round the time up or down because time need to be accurate. 

 

any other suggestion. ? maybe i can just minus .0001 from top level and buttom  level. 

0 Kudos
Message 10 of 13
(5,205 Views)