Comparator

This function block compares the two input values INP1 and INP2 according to the selected relation.

The following comparison relations are available: <>; <=; <; >=; >; =.

The result will be given at the binary output OUT.

Parameters

The parameter dialog can be used to select a data type and the desired comparison relation.

Signals

Name I/O Type(s) Function
INP1 I BYTE, UCHAR, WORD, LONG, LONGLONG, FLOAT, DOUBLE Input value 1
INP2 I BYTE, UCHAR, WORD, LONG, LONGLONG, FLOAT, DOUBLE Input value 2
OUT O BIT Result

Visualization

The currently selected relation will be displayed in the symbol.

If the result is true and the output is set to HIGH, the symbol will be highlighted.

Comments

If no connection exists, another data type can be assigned by creating a new connection.

If the data type is changed by the parameter dialog, all invalid connections will be deleted.

The data type BYTE is used as unsigned.