LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
fabric

Allow "In Range and Coerce" to accept unwired limits

Status: New

Currently, the "In Range and Coerce" function requires that the upper and lower limits be wired. Often I am only interested in coercing at one end of the range. It seems crazy to wire "-2147483648" to the lower limit of an I32 just to ignore that input and coerce the maximum...

 

I'd like to propose that this function allow unwired limits, and that unwired limits assume the maximum or minimum allowable values for the given datatype:

coerce.png

13 Comments
PhillipBrooks
Active Participant

>   It shold default to +Inf and -Inf for floating point numbers or the equivalent value for integers.

 

How should it behave if Include Upper Limit is False (default)? Anything except 255, 64545, +Inf ? 

 

I've been burned by the Include Upper Limit default by my own hand as well as others who didn't even know it existed.

 

There are two outputs, the value (coerced if specified) and in range. I use the In Range often, coerce not so much...

Intaris
Proven Zealot

I just tried to use this function with one unwired input yesterday and initially couldn't work out why my code was giving weird results....

 

Regardless of the details fo the implementation, this seems like a logical extension of the functionality.

Petru_Tarabuta
Active Participant

Implementing this idea would partially alleviate the pain point illustrated by the idea above. One could more easily select the MinValue or MaxValue that they are looking for, and wire it to the input.