Index-register, 16 index-register – HEIDENHAIN TNC 306 Technical Manual User Manual
Page 398

7-108
TNC 416/TNC 406/TNC 306
Commands
3/2000
3.16 INDEX-Register
Under the control of the PLC programmer this register can be used for data transfer, intermediate
storage of results and for indexed addressing of operands. The register is 32 bits wide but only the
lower 16 bits are used for index addressing. The X register can be used anywhere in the program —
there is no contents validity check — however there is a check for address space overflow with
indexed write accesses.
Example: =
B100[X]
If the address space is overshot the error message PLC: index range incorrect flashes in the
display. Reset with END to display the error line in the PLC Editor.
Before using a command with the index-register it must be assigned a defined value. At the
beginning of each PLC cycle the index register is set to 0.
The following operands can be addressed.
Mn[X]
In[X]
On[X]
Cn[X]
Tn[X]
Operand number = n+X
Bn[X]
Operand number = n+X
Wn[X]
Operand number = n+2*X
Dn[X]
Operand number = n+4*X
BTX
Contents of index register = operand
BCX
Contents of index register = operand
BSX
Contents of index register = operand
Commands for operating the Index Register:
The following commands have been introduced to permit data interchange between the Word
Accumulator and the Index Register or between the Stack and Index Register:
LX
(Load Index to Accu)
Index Register --> Word Accumulator
=X
(Store Accu to Index)
Word Accumulator --> Index Register
PSX
(Push Index Register)
Index Register --> Stack
PLX
(Pull Index Register)
Stack --> Index Register
INCX
(Increment Index Register)
DECX
(Decrement Index Register)