Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 227
Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Chapter 5
Function Block
FBD_COMPARE Structure
Description: Use the EQU instruction to compare two numbers or two strings of ASCII
characters. When you compare strings, note the following:
· Strings are equal if their characters match.
· ASCII characters are case sensitive. Upper case ‘A’ ($41) is not equal to
lower case ‘a’ ($61).
Arithmetic Status Flags: Not affected
Fault Conditions: None
Execution:
Operand Type Format Description
EQU tag FBD_COMPARE Structure EQU structure
Input Parameter Data Type Description
EnableIn BOOL Enable input. If cleared, the instruction does not execute and outputs are not updated.
Default is set.
SourceA REAL Value to test against SourceB.
Valid = any float
SourceB REAL Value to test against SourceA.
Valid = any float
Output Parameter Data Type Description
EnableOut BOOL The instruction produced a valid result.
Dest BOOL Result of the instruction. This is equivalent to rung-condition-out of the relay ladder
EQU instruction.