06.08.2013 Views

Technical Manual TNC 360 - heidenhain - DR. JOHANNES ...

Technical Manual TNC 360 - heidenhain - DR. JOHANNES ...

Technical Manual TNC 360 - heidenhain - DR. JOHANNES ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.4 Arithmetic Commands<br />

3.4.1 ADDITION (+) +<br />

Abbreviation for the PLC Editor: + (PLUS)<br />

Logic Byte/Word Double Constant<br />

Execution time [µs] ---- 2.8/2.4 1.8 1.6<br />

Number of bytes ---- 8 4 6<br />

Operands: B, W, D, K<br />

Operation:<br />

With arithmetic functions the operand is firstly expanded to the size of the Accumulator (32 bits).<br />

Then the contents of the operand are added to the Word Accumulator. The result of the operation is<br />

stored in the Word Accumulator and may be processed further.<br />

Example:<br />

A constant and a stored value in Word W6 are to be added. The result is then stored in Doubleword<br />

D8.<br />

Initial state: Constant = 100 000 (dec)<br />

Word W6 = 200 (dec)<br />

Doubleword D8 = ?<br />

In the interests of clarity the contents of the Accumulator and operand are shown in decimal<br />

notation.<br />

The 10 bit wide Accumulator allows the entry of the highest possible Accumulator contents<br />

(2 147 483 647).<br />

Line Instruction Accumulator Contents Operand Contents<br />

x x x x x x x x x x<br />

1 L K100000 1 0 0 0 0 0<br />

2 + W6 1 0 0 2 0 0 2 0 0<br />

3 = D8 1 0 0 2 0 0 1 0 0 2 0 0<br />

Line 1: The Constant is loaded into the Accumulator.<br />

Line 2: The contents of the Accumulator and Word W6 are added.<br />

Line 3: The result is assigned to Doubleword D8.<br />

8/95 <strong>TNC</strong> <strong>360</strong> 3 Commands 7-57

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!