Input Parameter
Data Type
EnableIn
BOOL
SourceA
REAL
SourceB
REAL
Output Parameter
Data Type
EnableOut
BOOL
Dest
BOOL
Description:
Arithmetic Status Flags:
Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ)
Function Block
Operand
Type
GRT tag
FBD_COMPARE
FBD_COMPARE Structure
Description
Enable input. If cleared, the instruction does not execute and outputs are not updated.
Default is set.
Value to test against SourceB.
Valid = any float
Value to test against SourceA.
Valid = any float
Description
The instruction produced a valid result.
Result of the instruction. This is equivalent to rung-condition-out for the relay ladder
GRT instruction.
The GRT instruction tests whether Source A is greater than Source B.
When you compare strings, note the following:
· The hexadecimal values of the characters determine if one string is less than
or greater than another string. For the hex code of a character, see the back
cover of this manual.
· When the two strings are sorted as in a telephone directory, the order of
the strings determines which one is greater.
L
e
s
s
e
r
Not affected
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Format
Structure
ASCII Characters
1ab
1b
G
r
A
e
a
t
AB
e
r
B
a
ab
Chapter 5
Description
GRT structure
Hex Codes
$31$61$62
$31$62
$41
$41$42
AB < B
$42
a > B
$61
$61$62
235