MUL — Multiply

Description
Section titled “Description”MUL (Multiply) writes the product of Source A and Source B to Dest every scan its rung is true. It is an output instruction with no state and no status bits. Use MUL to scale a reading by a gain, convert units, or turn a count of containers into a count of pieces. Do not use MUL for a scale that also needs an offset; SCP does the whole linear conversion in one instruction, and CPT handles anything longer.
Operands
Section titled “Operands”| Operand | Type | Format | Valid Range | Required | Description |
|---|---|---|---|---|---|
| Source A | Any numeric tag, member, element or bit, or a literal | Tag, Tag.Member, Tag[n], Tag.bit, or a literal |
Any resolvable numeric reference | Yes | The first factor. |
| Source B | Same as Source A | Same | Any resolvable numeric reference | Yes | The second factor. |
| Dest | A writable numeric tag, member or element | Tag, Tag.Member, Tag[n] |
SINT, INT, DINT or REAL; not a literal, not an input pin | Yes | Where the product is written. |
Literals may be whole numbers (25, -3, 0x1F) or decimals (0.0625). A BOOL source reads as 0 or 1.
Dest type. Products outgrow an INT quickly: 200 × 200 is already past 32767, and the result wraps silently with no flag and no fault. Use a DINT Dest for anything but small factors, and a REAL Dest when a factor has a fraction.
Scan Behavior
Section titled “Scan Behavior”Prescan
Section titled “Prescan”Nothing. Dest keeps its power-up value.
Rung-condition-in is false
Section titled “Rung-condition-in is false”The instruction does nothing. Dest holds its last value.
Rung-condition-in is true
Section titled “Rung-condition-in is true”Both sources are read, multiplied, and the product is written to Dest every scan the rung is true.
Postscan
Section titled “Postscan”Nothing.
Example
Section titled “Example”Scenario: A palletiser counts boxes. Each box holds a fixed number of pieces, and the order system wants pieces.
Tags:
Calc— Compute pieces, BOOLBoxes— Boxes counted, INTPer_Box— Pieces per box, INTPieces— Total pieces, INT
Rung 1:
—] [Calc———[MUL Boxes Per_Box Pieces]———Scan 1 — Calc = 0. Boxes reads 12 and Per_Box reads 24. The rung is false: Pieces holds 0.

Scan 2 — Calc = 1. 12 × 24 is written: Pieces reads 288.

An INT Dest is fine here because the largest order is a few thousand pieces. A line that counts to a hundred thousand needs Pieces declared as a DINT.
See Also
Section titled “See Also”- DIV — Divide
- SCP — Scale with Parameters (gain and offset in one instruction)
- XPY — X to the Power of Y
- CPT — Compute
- Compute Instructions — Category index
Percent scaling. MUL Raw 0.1 Value into a REAL keeps the tenths. The same instruction into an INT Dest truncates them away.
Sign. A negative factor gives a negative product; nothing is clamped.
The block never colours. Watch the rung wire and the Dest value line.
Applies to LadderIDE >=1.2.2 · Last reviewed 2026-09-11 · Screenshots verified 2026-09-11