L9E_CMPIF: Integer-Floating Point Comparison
(Original Document)
Naming
Name in LL984 Editor
Function Block Name
name of legacy 984 instruction
name in other tools and editors like:
  • Type Library Browser
  • Data Editor
  • Animation Tables
  • Search Results
Function Description
The L9E_CMPIF DFB compares an integer value and a floating point value and indicates their relationship in 2 output parameters (GRTH, LESSTH).
Representation
Parameters
Input Pin
Name
Data Type
Address Range
Meaning
Top
ENABLE
ON = initiates comparison
Node
Node Type
Name
Data Type
Address Range
Meaning
Top
IN
VALUE1
ARRAY[1...2] OF UINT
%MW
integer value
VALUE1 stores the double precision value to be compared.
Middle
IN/OUT
VALUE2
ARRAY[1...4] OF UINT
%MW
floating point value
Word 1 and 2 store the floating point value to be compared.
Word 3 and 4 are reserved.
Output Pin
Name
Data Type
Address Range
Meaning
Top
OUT
BOOL
ON = operation successful
Middle
GRTH
BOOL
Please see the table named GRTH and LESSTH below. That table indicates the relationship created when L9E_CMPIF compares the two values.
Bottom
LESSTH
BOOL
Please see the table named GRTH and LESSTH below. That table indicates the relationship created when L9E_CMPIF compares the two values.
GRTH and LESSTH
When the L9E_CMPIF compares the two values, the combined states of GRTH and LESSTH indicate their relationship:
GRTH
LESSTH
Relationship
ON
OFF
VALUE1 > VALUE2
OFF
ON
VALUE1 < VALUE2
ON
ON
VALUE1 = VALUE2