GE
Function Name |
GE (Greater Than or Equal To) |
---|---|
Description |
Outputs a True value when Input 1 is greater than or equal to the other inputs. |
Arguments |
Input 1 to Input n {ANY} For more information on the data types for the inputs and outputs, see Data Type Hierarchy. |
Returns |
Output {BOOL} The output is True only if Input 1 is greater than or equal to the other input values. If Input 1 is less than any of the other inputs, the GE function outputs a False value. |
Example:
Function Block Diagram - GE:
A GE function has 2 inputs (in this case, 2 constant values). Input 1 is has a value of 4 and Input 2 has a value of 2. The GE function outputs a True value as Input 1 is greater than the other inputs.
If Input 2 was changed to have a value of 4, the GE function would output a True value as Input 1 would be equal to Input 2. If Input 2 was changed to 5 instead of 4, the GE function would output a False value as it would not be greater than or equal to Input 2.
ST Program - GE:
The syntax for a GE function in an ST Program is:
- Output := GE (Input 1, Input n)
Where Output, Input 1 and Input n are defined as variables earlier in the ST program. Each input is separated by a comma and is a Boolean. The Output value is also a Boolean.
Alternatively, you can use an operator:
- Output := (Input 1 >= Input n);