Example Code

3-State Logic Compare

3-State Logic Compare.vi

DESCRITION

This VI compares inputs X and Y and returns X<Y, X=Y, or X>Y.

ERROR HANDLING

This VI passes through errors.  If an error is passed into the VI will it will still compare X and Y. If a negative number in passed into this VI by means of inputs X and Y, the VI will generate an error.

Front Panel

3-State Logic Comparep.png

Block Diagram

3-State Logic Compared.png

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.