Incoherent Behavior of the In Range and Coerce function

Updated Oct 8, 2018

Reported In

Software

  • LabVIEW

Operating System

  • Windows
  • Linux

Issue Details

I am using the In Range and Coerce function but the output result doesn't match my lower and upper limits and is incoherent with regards to my input command.

Solution

The In Range and Coerce function is more sensitive to input and output LabVIEW coercion dots. A typical behavior when having coercion dots in the In Range and Coerce function would be to have constrained output matching the upper limit even though the input is closer to the lower limit.

To avoid this kind of unwanted behavior, you have to make sure that all your inputs are using the same numeric representation.

The sample code below shows the different results when using the In Range and Coerce function in both cases, one in which coercion dots have been dealt with and the other one where LabVIEW is left automatically managing numeric representations:

WAS THIS ARTICLE HELPFUL?

Not Helpful