Remainder (Mod) - HEIDENHAIN TNC 415 Technical Manual

Hide thumbs Also See for TNC 415:
Table of Contents

Advertisement

3.4.5 REMAINDER (MOD)

Abbreviation for the PLC-Editor:
Execution time [µs]
Number of bytes
An error condition (Divisor = 0) results in an execution time of 1.0 to 1.8 µs.
Operands: B, W, D, K
Operation:
With arithmetic functions the operand is firstly expanded to the size of the Accumulator (32 bits).
Then the REMAINDER is determined from a division of the contents of the Word Accumulator by
the contents of the operand. The REMAINDER is stored in the Word Accumulator and may be
processed further. If the MOD command is not correctly executed then the Marker M3170 is set,
otherwise it is reset.
Example:
The REMAINDER of a division of the value stored in Word W6 by a constant is to be determined.
The REMAINDER is then stored in Doubleword D8.
Initial state:
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
1
L W6
2
MOD K15
3
= D8
Line 1: The contents of Word W6 are loaded into the Accumulator.
Line 2: The contents of the Accumulator are divided by the constant and the integer
REMAINDER is left in the Accumulator.
Line 3: The REMAINDER is assigned to Doubleword D8.
7-70
TNC 407/TNC 415/TNC 425
MOD (MODULO)
Logic
Byte/Word
----
6.6 to 8.0
----
Word
W6 = 50
Constant
K
= 15
Doubleword D8
= ?
Accumulator Contents
x
x x x
x x x
3 Commands
Double
6.6 to 7.3
18
16
(dec)
(dec)
Operand Contents
x x x
5 0
5
5
Constant
6.3 to 7.8
12
5 0
5
01.98

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 425eTnc 415fTnc 407Tnc 415bTnc 425

Table of Contents