[CMP_R] Compare of real values

Function block CMP_R compares two real values and supplies a Boolean value at the output.

CMP_R compares two real values and supplies a Boolean value.

Functioning

CMP_R compares the two input values [In1] and [In2] and sets the outputs [Gt], [Ge], [Eq], [Le] to either 1 or 0 in dependence of the result.

 

Result

Condition

Gt

Ge

Eq

Le

Lt

In1 > In2

1

1

0

0

0

In1 = In2

0

1

1

1

0

In1 < In2

0

0

0

1

1

Pins

Input

Description

Data type

Default value
Value range

In1In2

Input 1Input 2

Real

0.0

 

Output

Description

Data type

Default value
Value range

Gt

In1 greater than In2

Boolean

0

0 - In1 is less than or equal to In2.
1 - In1 is greater than In2.

Ge

In1 greater or equal to In2

Boolean

1

0 - In1 is not greater or equal to In2.
1 - In1 is greater than or equal to In2.

Eq

In1 equals In2

Boolean

1

0 - In1 is unequal to In2.
1 - In1 is equal to In2.

Le

In1 less than or equal to In2

Boolean

1

0 - In1 is not smaller or equal to In2.
1 - In1 is less than or equal to In2.

Lt

In1 less than In2

Boolean

0

0 - In1 is greater than or equal to In2.
1 - In1 is less than In2.