GE¶
Returns TRUE if the first input is greater than or equal to the second.
Signature¶
┌─────────┐
IN1 ─┤ │
│ GE ├─ OUT
IN2 ─┤ │
└─────────┘
FUNCTION GE : BOOL
VAR_INPUT
IN1 : ANY_ELEMENTARY;
IN2 : ANY_ELEMENTARY;
END_VAR
END_FUNCTION
Returns BOOL. GE accepts SINT, INT, DINT, LINT,
USINT, UINT, UDINT, ULINT, REAL, LREAL. Both
inputs must share the same type.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
The first value to compare. |
|
|
The second value to compare. |
Outputs
Name |
Type |
Description |
|---|---|---|
Return value |
|
TRUE if IN1 is greater than or equal to IN2, otherwise FALSE. |
Description¶
Returns TRUE if IN1 is greater than or equal to IN2, FALSE
otherwise. GE(a, b) is the functional form of the >= operator:
a >= b. Both forms are equivalent.
Example¶
result := GE(10, 5); (* result = TRUE *)
result := 10 >= 5; (* result = TRUE, operator form *)
result := 5 >= 5; (* result = TRUE *)
See Also¶
References¶
IEC 61131-3 §2.5.1.5.4