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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.4.4 DIVISION (/) /<br />

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

Logic Byte/Word Double Constant<br />

Execution time [µs] *) **) ---- 20.2/19.8 --- 19.8<br />

Number of bytes ---- 16 14 16<br />

*) see Multiplication<br />

**) An error in division and modulo (divisor = 0) results in a execution time of 3.8 µs.<br />

An error condition (Divisor = 0) results in an execution time of 1.0 to 1.8 µs.<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 Word Accumulator are divided by the contents of the operand. The result<br />

of the operation is stored in the Word Accumulator and may be processed further. If division by 0 is<br />

attempted, the Marker M3169 is set, otherwise it is reset.<br />

Example:<br />

A Constant is to be divided by the value stored in Word W6 . The result is then assigned to<br />

Doubleword D8.<br />

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

Word W6 = 20 (dec)<br />

Doubleword D8 = ?<br />

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

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

contents (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 K100 1 0 0<br />

2 / W6 5 2 0<br />

3 = D8 5 5<br />

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

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

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

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

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

Saved successfully!

Ooh no, something went wrong!