3 multiplication, 3 multiplication (x) x – HEIDENHAIN TNC 335 Technical Manual User Manual

Page 438

Advertising
background image


8/95

TNC 360

3 Commands

7-59

3.4.3 MULTIPLICATION (x)

x

Abbreviation for the PLC Editor:

x (MULTIPLY)

Logic

Byte/Word

Double

Constant

Execution time [µs]*

----

10.2/9.4

---

9.8

Number of bytes

----

14

10

14

* Only a maximum processing time can be entered with the arithmetic operations X, / and MOD.

The processing time may be shorter, depending on the operands.

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 multiplied with the contents of the Word Accumulator. The
result of the operation is stored in the Word Accumulator and may be processed further. If the result
of multiplication causes an overflow, Marker M3168 is set, otherwise it is reset.

Example:
A Constant and a value stored in Word W6 are to be multiplied. The result is then stored in
Doubleword D8.

Initial state

Constant

= 100

(dec)

Word

W6 = 20

(dec)

Doubleword D8

= ?

In the interests of clarity the contents of the Accumulator and the 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 K100

1 0 0

2

x W6

2

0 0 0

2 0

3

= D8

2

0 0 0

2

0 0 0

Line 1:

The Constant is loaded into the Accumulator.

Line 2:

The contents of the Accumulator are multiplied by the contents of Word W6.

Line 3:

The result is assigned to Doubleword D8.

Advertising