Constants Field (Kf); Addressing - HEIDENHAIN TNC 426 PB/M Technical Manual

Table of Contents

Advertisement

7.12 Constants Field (KF)

Addressing

December 2001
You can use the constants-field data type to access one of several constants,
defined in tabular form, depending on the value of the index register X. You
address it with KF <Name>[X], where <Name> is a label indicating the
beginning of the constants field. Constants fields must be introduced with the
label KFIELD <Name>. This is followed by any quantity (other than zero) of
constants and the end label ENDK. Constants fields can only be programmed
where the program has previously been concluded with an EM or JP
statement. The name of constants fields corresponds to the rules for naming
labels.
Types of addresses:
L KF <Name> [X], with X ≥ 0:
n
The TNC transfers the value of the constant defined by X in the constants
field <Name>.
n
L KF <Name> [X], with X = –1:
The TNC transfers the length of the constants field <Name>.
n
L KF <Name>: The TNC transfers the absolute address of the constants
field <Name>. This is only worthwhile in conjunction with modules
(e.g. Module 9200). You can also use this addressing in a constants field.
Example:
Function
Access value field with X = [0 to 3].
Assign one of the constants to word W0.
End of the main program.
Define the constants field.
Constant to be loaded with X = 0
Constant to be loaded with X = 3
End of the constants field.
The TNC checks the access to constants fields in the same way as the writing
access for indexed operands. X can assume only positive values from 0 to
<Length of constants field –1>.
Constants Field (KF)
STL
L KF VAL_FIELD [X]
= W0
EM
KFIELD VAL_FIELD
K+10
K+1
K$ABC
K–100000
ENDK
7 – 169

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 430 pa/mTnc 430 mTnc 426 cbTnc 430 caTnc 426 pbTnc 430 pa ... Show all

Table of Contents