Fixed-Point to Integer Cast Function

LabVIEW 2018 Help


Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)


LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help
LabVIEW 2020 Help

Owning Palette: Fixed-Point Functions

Requires: Base Development System

Scales the fixed-point input to produce an integer output. This function is the equivalent of an arithmetic shift of the input, constrained so that the least significant bit of the input becomes the least significant bit of the output.

Details  Example

fixed-point is the data you want to scale. fixed-point can be any fixed-point data type.
integer is the input data scaled to the smallest compatible integer type that prevents overflow. This output discards the overflow status.

Fixed-Point to Integer Cast Details

If fixed-point is a signed number, LabVIEW sign-extends the input data as necessary to ensure that the input and output data are always the same sign.

Note  The Fixed-Point to Integer Cast function combines elements of the Scale by Power of 2 function and the Type Cast function. The Fixed-Point to Integer Cast function performs an operation that reinterprets the bits, like a cast, but also implements an arithmetic shift with sign extension, similar to the Scale by Power of 2.

Example

Refer to the Fixed-Point Cast VI in the labview\examples\Numerics directory for an example of using the Fixed-Point to Integer Cast function.

WAS THIS ARTICLE HELPFUL?

Not Helpful