Condition Monitoring Unit CMU 1000
Page 101
V03 R21 - 2020/07/09
HYDAC ELECTRONIC GMBH
Mat.-No.:
669749
7.6 Numerical Conditions
7.6.1 Equals
The
Equals
function compares two numerical input values for
equivalence and outputs a "1" at its Boolean output if the values are
equivalent, otherwise a "0".
With the Precision parameter, you can adjust how precise the
comparison is. For this the following explanation:
In view of the fact that numerical values are presented on computers
as floating point numbers with finite precision, normal comparisons
usually fail. Thus, for example, the finite precision of 2/6 is not
necessarily the same as the result of 1/3. The difference is not to be
found before the 8th decimal place, but nonetheless the two values
are not recognized as being equivalent.
The point at which one needs to break off the comparison of
numbers varies from case to case. It is for that reason that you have
the option of controlling the precision of the comparison.
If you specify 0.01 for precision, for example, then the numbers
12.453 and 12.458 will still be recognized as equivalents to one
another, because the difference is less than 0.01.
Inputs: x
1
: (Numerical)
x
2
: (Numerical)
Outputs: y:
(Boolean)
Parameters: p
1
:
Precision
(Numerical)
7.6.2 Does not Equal
The
Does not equal
function compares two numerical input values
for equivalence and outputs a "1" at its Boolean output if the values
are not equal, otherwise a "0".
For the
Precision
parameter, see the explanation in the
Equals
function (Chapter 7.6.1).
Inputs: x
1
: (Numerical)
x
2
: (Numerical)
Outputs: y:
(Boolean)
Parameters: p
1
:
Precision
(Numerical)