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 mnemonicAmerican mnemonicNameData typeDirectionRequiredMeaning
ENENEnableBOOLInputYesRung condition: the computation runs only when power flow is 1.
IN1IN1Source AINT, DINT, REALInputYesFirst operand.
IN2IN2Source BINT, DINT, REALInputYesSecond operand.
OUTOUTDestinationINT, DINT, REALOutputNoResult (variable). Not changed while the rung is 0.
ENOENOEnable outBOOLOutputNo1 when the computation ran without error.
MnemonicNameData typeDirectionRequiredMeaning
ENEnableBOOLInputYesRung condition: the computation runs only when power flow is 1.
IN1Source AINT, DINT, REALInputYesFirst operand.
IN2Source BINT, DINT, REALInputYesSecond operand.
OUTDestinationINT, DINT, REALOutputNoResult (variable). Not changed while the rung is 0.
ENOEnable outBOOLOutputNo1 when the computation ran without error.
MnemonicNameData typeDirectionRequiredMeaning
ENEnableBOOLInputYesRung condition: the computation runs only when power flow is 1.
IN1Source AINT, DINT, REALInputYesFirst operand.
IN2Source BINT, DINT, REALInputYesSecond operand.
OUTDestinationINT, DINT, REALOutputNoResult (variable). Not changed while the rung is 0.
ENOEnable outBOOLOutputNo1 when the computation ran without error.

Example

European style
American style

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

See also