This article discusses how to use numeric calculations based on BCD instructions (Binary Coded Decimal) format within the Omron PLC. The instructions covered include BCD addition (+B(404)), BCD subtraction (-B(414)), BCD multiplication (*B(424)), and BCD division (/B(434)). These PLC instructions will be used to perform specific value calculations within the program.
Program Objective

BCD Add Without Carry Instruction: +B(404)
The +B(404) instruction adds two BCD (Binary Coded Decimal) values within the 0000-9999 range. To execute it, three word memory allocations are required (initial value, value to be added, and result storage) along with one input parameter as the instruction trigger.
BCD Subtract Without Carry Instruction: -B(414)
The -B(414) instruction subtracts one BCD value from another within the 0000-9999 range. Execution requires three word memory allocations (value to be subtracted, subtractor value, and result) and one input parameter as the instruction trigger.
BCD Multiply Instruction: *B(424)
The *B(424) instruction multiplies two BCD values within the 0000-9999 range. It requires four word memory allocations (multiplicand, multiplier, and result) and one input parameter as the instruction trigger.
BCD Divide Instruction: /B(434)
The /B(434) instruction divides BCD values within the 0000-9999 range. It needs four word memory allocations (dividend, divisor, and result) Â and one input parameter as the instruction trigger.
*In this program, each instruction has its own trigger and is used to calculate predetermined values.
Testing Video
In the video below, we tested this Omron PLC program and displayed the results.
BCD Add, Subtract, Multiply, Divide

IO Mapping Details
S.No. | Comment | Input (I) | Memory Word |
---|---|---|---|
1 | TRIG(+) | 0.00 | Â |
2 | TRIG(-) | 0.01 | Â |
3 | TRIG(*) | 0.02 | Â |
4 | TRIG(/) | 0.03 | Â |
5 | DATA_1 | Â | D0 |
6 | DATA_2 | Â | D1 |
7 | RESULT(+) | Â | D2 |
8 | DATA_10 | Â | D10 |
9 | DATA_11 | Â | D11 |
10 | RESULT(*) | Â | D12 |
11 | DATA_20 | Â | D20 |
12 | DATA_21 | Â | D21 |
13 | RESULT(-) | Â | D22 |
14 | DATA_30 | Â | D30 |
15 | DATA_31 | Â | D31 |
16 | RESULT(/) | Â | D32 |
Omron PLC BCD Instructions

RUNG 0 (ADD INSTRUCTION BCD)
In this Rung, the +B(404) instruction will add the value in the memory word DATA_1 (D0) with the value in the memory word DATA_2 (D1) memory word when the TRIG(+) (0.00) button is pressed. The calculated result value will be entered into the memory word RESULT(+) (D2).
RUNG 1 (SUBSTRACT INSTRUCTION BCD)
In this Rung, the -B(414) instruction will subtract the value in the memory word DATA_20 (D20) from the value in the memory word DATA_21 (D21) when the TRIG(-) (0.01) button is pressed. The calculated result value will be entered into the memory word RESULT(-) (D22).

RUNG 2 (MULTIPLY INSTRUCTION BCD)
In this Rung, the *B(424) instruction will multiply the value in the memory word DATA_10 (D10) by the value in the memory word DATA_11 (D11) when the TRIG(*) (0.02) button is pressed. The calculated value will be entered into the memory word RESULT(*) (D12).
RUNG 3 (DIVIDE INSTRUCTION BCD)
In this Rung, the /B(434) instruction will divide the value in the memory word DATA_30 (D30) by the value in the memory word DATA_31 (D31) when the TRIG(/) (0.03) button is pressed. The calculated value will be entered into the memory word RESULT(/) (D32).
Read Next:
- Structured Text vs. Instruction List for PLC Programming
- Design a System Architecture in Industrial Automation
- Create a User-Defined Function Block in Codesys Software
- Types of Failures in Industrial Automation Systems
- Allen Bradley PLC to PLC Communication in Studio 5000