CMP

Compares two values: tells if they are equal, or if the first is less or greater than the second one.
lrsb_cm1
Arguments
VAL1
DINT
Any signed integer value
VAL2
DINT
Any signed integer value
LT
BOOL
TRUE if val1 is less than val2
EQ
BOOL
TRUE if val1 is equal to val2
GT
BOOL
TRUE if val1 is greater than val2
Example
(* FBD program using the CMP block *)
lrsb_cm2
(* ST Equivalence: We suppose CMP1 is an instance of CMP block *)
CMP1(level, max_level); pump_cmd := CMP1.LT OR CMP1.EQ; alarm := CMP1.GT AND NOT(manual_mode);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal