beautypg.com

5 remainder [ ] (mod[ ]) – HEIDENHAIN TNC 407 (243 020) Technical Manual User Manual

Page 547

background image


7-86

TNC 407/TNC 415/TNC 425

3 Commands

01.98

3.7.5 REMAINDER [ ] (MOD[ ])

Abbreviation for PLC Editor:

MOD [ ] (MODULO [ ])

Logic

Byte/Word/Double

Execution time [µs]

-----

6.5 to 7.5

Number of bytes

-----

14

In the event of an error (Divisor = 0) in the Division and MODULO functions, the execution time will
be in the range 0.9 to 1.3 µs.

Operands: none

Function of Parentheses with Arithmetic Commands:
With arithmetic commands, only word execution comes into question. The execution sequence in a
ladder may be altered by the use of parentheses. The "open-parentheses" command loads the
content of the Word Accumulator onto the Program Stack. Then the Accumulator is available for the
calculation of intermediate results. The "close-parentheses" instruction initiates the gating of the
buffered value from the Program Stack with the content of the Word Accumulator. The result is
again loaded into the Accumulator. The maximum nesting level is 16 parentheses.

Marker M3170 is set if an error occurs.

Example for the commands ADD [ ], SUBTRACT [ ], MULTIPLY [ ], DIVIDE [ ], DIVISION
REMAINDER [ ]
The following example demonstrates how parentheses influence the result of the operation.

Initial state:

Constant

= 1000

(decimal)

DoublewordD12

= 15000

(decimal)

DoublewordD36

= 100

(decimal)

DoublewordD100 = ?

The specification of Accumulator and operand contents is given in decimal notation. The ten-place
Accumulator thus permits the maximum possible Accumulator content of (2 147 483 647).