6.1.3.4.4 MUL
Function
Multiply ( * ), multiply the value of input IN1 by the value of input IN2, and output OUT (OUT:=IN1 * IN2)
LD Graphics
Parameter description
| Interface variable | Declaration | Data type | Description |
|---|---|---|---|
| IN1 | Var_Input | ANY_NUM | Multiplier 1 |
| IN2 | Var_Input | ANY_NUM | Multiplier 2 |
| OUT | Var_Output | ANY_NUM | OUT:=IN1*IN2 |
Example
The result obtained by multiplying the value of variable a by the value of variable b is given to variable c through the MUL instruction, as shown in the figure below: three INT type variables are defined, and the SUB instruction is executed by compiling, downloading, and realizing c:=a*b

warning
- MUL is an extensible function, and inputs can be added by clicking the "+" in the LD graph