Integer to Fixed-Point Cast Function
- Updated2025-01-28
- 3 minute(s) read
Integer to Fixed-Point Cast Function
Scales the integer input to produce an output with the requested fixed-point type. This function is the equivalent of an arithmetic shift of the input with configurable overflow handling, constrained so that the least significant bit of the input becomes the least significant bit of the output.

Inputs/Outputs
![]() fixed-point type is the fixed-point data type to which you want to convert the integer data. You can configure the fixed-point data type in the Data Type page of the Properties dialog box. LabVIEW ignores any data in the constant or control that you wire to fixed-point type. You also can leave this input unwired and configure the output data type in the Output Configuration page of the Properties dialog box. ![]() integer is the data you want to scale. integer can be any integer data type. ![]() fixed-point is the input data scaled to the requested fixed-point data type. |
If the word length of integer is greater than or less than the word length of fixed-point type, LabVIEW first converts integer to the integer word length of fixed-point type before casting integer to the requested fixed-point type. The least significant bit of integer becomes the least significant bit of fixed-point, so rounding is never necessary.
To override the default behavior of this function, right-click the function and select Properties from the shortcut menu to display the Output Configuration page of the Properties dialog box. You can use this dialog box to configure the output settings of this function.
FPGA Module Details
The following details apply when you use this object in an FPGA VI.
The Fixed-Point functions do not support array inputs. However, you can pass array data to these functions element-by-element if you meet the following criteria:
- You place the function inside a For Loop within a single-cycle Timed Loop
- You enable auto-indexing on the For Loop tunnels
- You use the function with other supported functions
- You do not include shift registers or Feedback Nodes
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\Numerics\Fixed-Point Cast.vi