CMP_W |
The CMP_W component compares the magnitude of the values applied to the input pins IN1 and IN2.
The result of comparing is function of the value applied to the qualifier input QLF.
Using this function block you have the possibility to change, during run-time, the logic of comparing simply changing the value applied to the QLF pin.
The function block returns TRUE, on its OUT output pin, if the condition is verified else it returns FALSE
QLF Pin
|
Equation |
Related function |
0 |
IN1 == IN2 |
TRUE when IN1 is equal to IN2 |
1 |
IN <> IN2 |
TRUE when IN1 is different by IN2 |
2 |
IN1 >= IN2 |
TRUE when IN1 is greater or equal to IN2 |
3 |
IN1 <= IN2 |
TRUE when IN1 is less or equal to IN2 |
4 |
IN1 > IN2 |
TRUE when IN1 is greater than IN2 |
5 |
IN1 < IN2 |
TRUE when IN1 is less than IN2 |
If the value applied to the QLF pin is greater than 5 then the function block returns always FALSE.
For supply a constant value to the QLF pin you can use the CONST or the IDENT function blocks.
Net plugs
Plug |
Description |
IN1 |
The first value to be compared should be applied to this pin |
|
|
IN2 |
The second value to be compared should be applied to this pin |
|
|
QLF |
A value, from 0 to 5, applied to this pin selects the appropriate logic equations for the comparing |
|
|
OUT |
The result of the comparing will be available on this pin |
See also : THRESHLD