Multiply
The content of the accumulator is multiplied by the result of the expression in the following brackets. The result is transferred to the accumulator.
Valid operands for this operator must be of one of the following data types: (INT, DINT, UINT, UDINT, REAL)
Operator only available in IL programming language.
All input and output variables used for programming this function have been declared in the POU header.The same POU header is used for all programming languages.
LD |
var_1 |
(* Load var_1 in accu *) |
(* Since bracket expression follows, save content of accu; process expression in brackets first *) |
||
MUL( |
var_2 |
(* load var_2 in accu *) |
ADD |
var_3 |
(* Add var_3 to accu; store result in accu *) |
) |
(* Get saved accu content and multiply by actual content of accu; store result in accu *) |
|
ST |
var_4 |
(* Store accu in var_4 *) |