7.8.1 GT
Function
Decreasing sequence, when IN1>IN2>....>IN(n-1)>IN(n), OUT outputs 1; otherwise, it outputs 0
LD graphics
Parameter description
| Interface variable | Declaration | Data type | Description |
|---|---|---|---|
| IN1 | Var_Input | ANY_ELEMENTARY | Comparison value 1 |
| IN2 | Var_Input | ANY_ELEMENTARY | Comparison value 2 |
| Function name | Return value | BOOL | Output result |
warning
- ANY_ELEMENTARY contains all basic data types (bit strings, integers, floating point numbers, characters and strings, times and dates)
- Extensible function, inputs can be added by clicking the "+" in the graph
Example
- LD sample animation is as follows:

- ST example is shown in the following code:
OUT:=GT(IN1:=1,IN2:=2);
OUT2:=GT(IN1:=5,IN2:=4,In3:=3,IN4:=2,IN5:=1);