Greater than
The content of the accumulator is compared with the expression in the following brackets. If the accumulator is greater, TRUE is stored in the accumulator, otherwise FALSE.
Valid operands for this operator must be of one of the following data types: (ANY)
The result of the operation is of data type BOOL.
Operator only available in IL programming language.
var_1 and the result of the expression in brackets can be of any standard data type. var_4 has to be of type BOOL.
Since in this example the expression in brackets contains an ADD command, var_2 and var_3 have to be of a numeric type (INT or REAL type). This also determines that the data type required for var_1 be of this same type.
LD |
var_1 |
(* Load var_1 in accu *) |
(* Since bracket expression follows, save content of accu; process expression in brackets first *) |
||
GT( |
var_2 |
(* Load var_2 in accu *) |
ADD |
var_3 |
(* Add var_3 to accu; store result in accu *) |
) |
(* Get saved accu content and compare to actual content of accu; store result in accu; if saved accu > actual accu, TRUE is stored in accu, else FALSE *) |
|
ST |
var_4 |
(* Store accu in var_4 *) |