Addition [ ] (+[ ]) - HEIDENHAIN iTNC 530 HSCI Technical Manual

Hide thumbs Also See for iTNC 530 HSCI:
Table of Contents

Advertisement

9.8.43 ADDITION [ ] (+[ ])

1802
+[ ] (PLUS[ ])
Syntax:
None
Operands:
Action:
Use parentheses together with arithmetical commands only for word
processing. By using parentheses you can change the sequence of processing
in a statement list. The opening-parenthesis command puts the content of the
word accumulator onto the program stack. This clears the accumulator for
calculation of intermediate results. The closing-parenthesis command gates
the buffered value from the program stack with the content of the word
accumulator. The iTNC saves the result in the accumulator again. Maximum
nesting depth: 16 parentheses. If an error occurs during calculation, the iTNC
sets the marker M4201.
Example:
Example for the commands ADD [ ], SUBTRACT [ ], MULTIPLY [ ], DIVIDE [ ],
REMAINDER [ ].
Divide a constant by double word D36, add the result to double word D12, and
assign the result to double word D100.
Initial state:
Constant
= 1000 (dec)
Double word D12
= 15000 (dec)
Double word D36
= 100 (dec)
Double word D100
= ?
Function
Load the double word D12
into the word accumulator.
Opening parenthesis: Buffer
the accumulator content onto
the program stack.
Load the constant K1000 into
the word accumulator
Divide the word accumulator
by the content of the double
word D36.
Closing parenthesis: Gate the
accumulator content with the
program stack (+[, –[ .....).
Assign the result of the total
operation to double word
D100.
M4200
Overflow during multiplication
M4201
Division by 0
M4202
Incorrectly executed modulo
M4203
Error status for PLC module
STL
Accumulat
or content
L D12
15000
+[
L K1000 1000
/ D36
10
]
= D100
15010
HEIDENHAIN Technical Manual iTNC 530 HSCI
Operand content
15000
100
15010
Set
Reset
NC
PLC
NC
PLC
NC
PLC
NC
NC/PLC

Advertisement

Table of Contents
loading

Table of Contents