Arithmetic commands, Addition (+), 4 arithmetic commands 3.4.1 addition (+) – HEIDENHAIN TNC 306 Technical Manual User Manual
Page 346

7-56
TNC 416/TNC 406/TNC 306
Commands
3/2000
3.4
Arithmetic commands
3.4.1 ADDITION (+)
+
Abbreviation for the PLC-Editor:
+ (PLUS)
Logic
Byte/Word
Double
Constant
Execution time [µs]
----
2.8/2.4
1.8
1.6
Number of bytes
----
8
4
6
Operands: B, W, D, K
Operation:
With arithmetic functions the operand is firstly expanded to the size of the Accumulator (32 bits).
Then the contents of the operand are added to the Word Accumulator. The result of the operation is
stored in the Word Accumulator and may be processed further.
Example:
A constant and a stored value in Word W6 are to be added. The result is then stored in Double word
D8.
Initial state:
Constant
= 100 000
(dec)
Word
W6 = 200
(dec)
Double word D8 = ?
In the interests of clarity the contents of the Accumulator and operand are shown in decimal
notation.
The 10 bit wide Accumulator allows the entry of the highest possible Accumulator contents
(2 147 483 647).
Line Instruction
Accumulator contents
Operand contents
x
x x x
x x x
x x x
1
L K100000
1 0 0
0 0 0
2
+ W6
1 0 0
2 0 0
2 0 0
3
= D8
1 0 0
2 0 0
1 0 0
2 0 0
Line 1:
The Constant is loaded into the Accumulator.
Line 2:
The contents of the Accumulator and Word W6 are added.
Line 3:
The result is assigned to Double word D8.