MUL Multiply
Also called: multiplication, product, times, ×
OUT := IN1 × IN2 when the rung is 1.
What it does
The MUL block multiplies two values and writes the result into OUT.
When to use it
For scaling, unit conversion, a total price.
Operands
| European mnemonic | American mnemonic | Name | Data type | Direction | Required | Meaning |
|---|---|---|---|---|---|---|
| EN | EN | Enable | BOOL | Input | Yes | Rung condition: the computation runs only when power flow is 1. |
| IN1 | IN1 | Source A | INT, DINT, REAL | Input | Yes | First operand. |
| IN2 | IN2 | Source B | INT, DINT, REAL | Input | Yes | Second operand. |
| OUT | OUT | Destination | INT, DINT, REAL | Output | No | Result (variable). Not changed while the rung is 0. |
| ENO | ENO | Enable out | BOOL | Output | No | 1 when the computation ran without error. |
| Mnemonic | Name | Data type | Direction | Required | Meaning |
|---|---|---|---|---|---|
| EN | Enable | BOOL | Input | Yes | Rung condition: the computation runs only when power flow is 1. |
| IN1 | Source A | INT, DINT, REAL | Input | Yes | First operand. |
| IN2 | Source B | INT, DINT, REAL | Input | Yes | Second operand. |
| OUT | Destination | INT, DINT, REAL | Output | No | Result (variable). Not changed while the rung is 0. |
| ENO | Enable out | BOOL | Output | No | 1 when the computation ran without error. |
| Mnemonic | Name | Data type | Direction | Required | Meaning |
|---|---|---|---|---|---|
| EN | Enable | BOOL | Input | Yes | Rung condition: the computation runs only when power flow is 1. |
| IN1 | Source A | INT, DINT, REAL | Input | Yes | First operand. |
| IN2 | Source B | INT, DINT, REAL | Input | Yes | Second operand. |
| OUT | Destination | INT, DINT, REAL | Output | No | Result (variable). Not changed while the rung is 0. |
| ENO | Enable out | BOOL | Output | No | 1 when the computation ran without error. |
Example
When S1 is 1, V3 := V1 × V2.
Try it in the simulatorThe example opens in the free simulator; your own program stays as it was.
Behaviour in detail
- Runs on every scan where the rung is 1.
- Integer overflow: the result wraps around (keeps the low bits), without error.
- Types: INT, DINT, REAL.