Not Equal? Function

Returns TRUE if x is not equal to y. Otherwise, this function returns FALSE. You can change the comparison mode of this function.

If you compare two matrices, the default comparison mode is Compare Aggregates, and this function returns a scalar. You can compare an array or cluster of a data type to a scalar of the same data type and produce an array or cluster of Booleans. The connector pane displays the default data types for this polymorphic function.


icon

Inputs/Outputs

  • cdbl.png x

    xis a value to compare to y

  • cdbl.png y
    y must be of the same type as x
  • ibool.png x != y?

    x!=y? returns the Boolean result of the operation. When you compare arrays, x!=y? is a scalar in Compare Aggregates mode and a Boolean array in Compare Elements mode (default).

  • When comparing VI Server references, this function returns FALSE when the two references refer to the same object, regardless of whether the references have the same capability or the same value. For example, one might be a strict reference to a digital numeric control and the other might be a generic reference but if they refer to the same object, they are equal. To compare the actual values of the references, use the Type Cast function to convert the references to 32-bit signed integers. Then use the Not Equal? function to compare those integers.

    Similarly to the previous situation, if you have a local reference and a remote reference to the same LabVIEW object, this function returns TRUE. However, when two references refer to the same object but one of them is authenticated and the other is not, this function still returns FALSE.

    Note If you compare two inputs with the value not a number, NaN, or one input with the value NaN to an input with another value, this function always returns TRUE. Use the Not a Number/Path/Refnum? function to compare one or more inputs with a value of NaN.

    When you wire matrix data as an input to this function, a VI that includes subVIs that work with the matrix data type replaces the function. The resulting VI has the same icon but contains a matrix-specific algorithm. The node remains a VI if you disconnect the matrix from the input(s). Wire other data types as inputs to restore the original function. If you wire a data type to a function and that data type causes a basic math operation to fail, the function returns an empty matrix or NaN.

    FPGA Module Details

    The following details apply when you use this object in an FPGA VI.

    Note The following details are subject to change with each version of the LabVIEW FPGA Module.
    Single-Cycle Timed Loop Supported.
    Usage If you use this function with the single-precision floating-point data type, refer to the Using the Single-Precision Floating-Point Data Type and Deciding Which Data Type to Use in FPGA Designs topics for resource use, latency, and single-cycle Timed Loop support implications.
    Timing

    Inside single-cycle Timed Loop--When you use Comparison functions inside a single-cycle Timed Loop, the combinatorial logic delay is proportional to the width of the data types you compare.

    Outside single-cycle Timed Loop--When you use Comparison functions outside a single-cycle Timed Loop, each Comparison function takes one clock cycle.

    If you use the Comparison functions with the fixed-point data type, the overflow and rounding modes might impact timing.

    Resources The Comparison functions use FPGA resources in proportion to the width of the data types you compare.

    Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\Comparison\Comparison Functions.vi