From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using conversion functions

When using the numeric conversion functions, such as to I16, what determines whether a number greater than the upper limit is coerced to the upper limit or is wrapped around from the lower limit?
0 Kudos
Message 1 of 2
(2,211 Views)
> When using the numeric conversion functions, such as to I16, what
> determines whether a number greater than the upper limit is coerced to
> the upper limit or is wrapped around from the lower limit?
>

In general, LV will coerce the way that the CPU does. Integers to
integer will take the lower portion, performing a modulo operation.
Float to integer will pin, typically to the correctly signed maxInt.

If it is important to your algorithm, build a quick test VI.

Greg McKaskle
Message 2 of 2
(2,211 Views)