Table Of Contents

To Unsigned 16-bit Integer (G Dataflow)

Version:
    Last Modified: March 31, 2017

    Converts a number to a 16-bit unsigned integer in the range 0 to 65,535.

    connector_pane_image
    datatype_icon

    number

    An input to this operation.

    This input supports waveforms and any data type that contains only numbers, such as scalar numbers, arrays or clusters of numbers, and arrays of clusters of numbers.

    Data Type Changes on FPGA

    When you add this node to a document targeted to an FPGA, this input has a default data type that uses fewer hardware resources at compile time.

    datatype_icon

    unsigned 16-bit integer

    Result of the conversion.

    This output assumes the same data type structure as number.

    Rounding Behavior for Floating-Point Values

    This node rounds all floating-point numeric values to the nearest integer. If the fractional part of the floating-point value is .5, the node rounds the value to the nearest even integer. For example, the node rounds 13.5 to 14 and rounds 14.5 to 14.

    Rounding Behavior for Out-of-Range Values

    If this node receives an input that falls outside the range of values that the output can represent, the node rounds the value to the closer end of the range. This differs from the out-of-range behavior for nodes that convert values to signed integers.

    number unsigned 16-bit integer (range: 0 to 65,535) Comments
    -100 0 number undershoots the allowable values, so the node rounds the output to the lower end of the range.
    -1 0 number undershoots the allowable values, so the node rounds the output to the lower end of the range.
    0 0 number is within the allowable range, so no value change occurs.
    1 1 Same as above.
    ... ... ...
    65,534 65,534 Same as above.
    65,535 65,535 number is the maximum allowable value, so no value change occurs.
    65,536 65,535 number exceeds the maximum allowable value by 1, so the node rounds the output to the upper end of the range.
    13.7 14 The node rounds 13.7 up to 14 because 14 is the nearest integer.
    13.5 14 The node rounds 13.5 up to 14 because 14 is the nearest even integer.
    14.5 14 The node rounds 14.5 down to 14 because 14 is the nearest even integer.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics