Remainder [ ] (mod[ ]), 5 remainder [ ] (mod[ ]) mod – HEIDENHAIN TNC 306 Technical Manual User Manual
Page 364
![background image](https://www.manualsdir.com/files/815307/content/doc364.png)
7-74
TNC 416/TNC 406/TNC 306
Commands
3/2000
3.7.5 REMAINDER [ ] (MOD[ ])
MOD [ ]
Abbreviation for PLC Editor:
MOD [ ] (MODULO [ ])
Logic
Byte/Word/Double
Execution time [µs] *) **)
-----
20.6
Number of bytes
-----
14
*) See Multiplication
**) See Division
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.
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)
Double word
D12
= 15000
(decimal)
Double word
D36
= 100
(decimal)
Double word
D100
= ?
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).