7 – 148 HEIDENHAIN Technical Manual TNC 426, TNC 430
7.8 INDEX Register (X Register)
You can use the index register for:
n Data transfer
n Buffering results
n Indexed addressing of operands
The index register is 32 bits wide. However, the TNC uses only the lower 16
bits for indexed addressing.
You can use the X register anywhere in the program. The TNC does not check
whether the current content is valid. Exception: During indexed write
accessing the TNC checks whether the amount of available address space is
exceeded.
Example: = B100[X]
If the permitted addressable storage is exceeded, the TNC issues a blinking
error message: PLC: index range incorrect. Acknowledge the error
message by pressing the END key. After restarting the TNC you must not
acknowledge the POWER INTERRUPTED message. Go into the PLC editor,
where you will be shown the error line.
The following addresses are valid:
n Mn[X]
n In[X]
n On[X]
n Cn[X]
n Tn[X] Operand number = n+X
n Bn[X] Operand number = n+X
n Wn[X] Operand number = n+2*X
n Dn[X] Operand number = n+4*X
n BTX Content of index register =
operand
n BCX Content of index register =
operand
n BSX Content of index register =
operand
n Sn[X] String number = n+X
n S#Dn[X] Dialog text number = n+X
n S#En[X] Error text number = n+X
n S#An[X] ASCII code +X
n Sn^X Substring from X-th character
of the n-th string
The types “S”, K, and K$ cannot be indexed.
Note
At the beginning of the PLC cycle the TNC sets the index register to 0.
Assign the index register a defined value before using it in your program.
Note
If you address S#Dn[X] or S#En[X], the TNC loads the sequence
<SUB>Dnnn or <SUB>Ennn in the string accumulator, where nnn is the
modified string number.