Download Print this page

HEIDENHAIN MANUALplus 620 Technical Manual page 1744

Hide thumbs Also See for MANUALplus 620:

Advertisement

8.34 Constants Field (KF)
Addressing
1744
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:
The control transfers the value of the constant defined by X in the constants
field <Name>.
L KF <Name> [X], with X = –1:
The control transfers the length of the constants field <Name>.
L KF <Name>:
The control 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 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 control checks the access to constants fields in the same way as the write
access for indexed operands. X can assume only positive values from 0 to
<Length of constants field –1>.
HEIDENHAIN Technical Manual MANUALplus 620
STL
L KF VAL_FIELD [X]
= W0
EM
KFIELD VAL_FIELD
K+10
K+1
K$ABC
K–100000
ENDK

Advertisement

loading