Exporting machine parameters, Converting a numerical value to a string parameter, Converting a string parameter to a numerical value – HEIDENHAIN TNC 320 (340 551-01) User Manual
Page 365: Reading a substring from a string parameter
HEIDENHAIN TNC 320
365
1
0
.1
2
S
tr
in
g
P
a
ra
m
e
te
rs
Exporting machine parameters
Because of the organization of the configuration data, access to
machine parameters is possible only by designating the key, tag and
attribute by using string parameters. Use the CFGREAD function.
Example: Import a machine parameter
Converting a numerical value to a string
parameter
The TOCHAR function converts a numerical value to a string
parameter. The value to be converted can be entered as a number or
a Q parameter. Also, you can enter the number of decimal places of
the string parameter output.
Example: Convert parameter Q50 as string parameter QS11
Converting a string parameter to a numerical
value
The TOCHAR function converts a string parameter to a numerical
value. The value to be converted should be only numerical.
Example: Convert string parameter QS11 to a numerical
parameter Q82
Reading a substring from a string parameter
With the SUBSTR function you can import a certain range from a string
parameter.
Example: A four-character substring (LEN4) is read from the
string parameter QS10 beginning with the third character (BEG3).
37
QS20 = CFGREAD( KEY_QS10 TAG_QS11 ATR_QS12 )
37
QS11 = TOCHAR( DAT+Q50 DECIMALS4 )
37
Q82 = TONUMB( SRC_QS11 )
37
QS13 = SUBSTR( SRC_QS10 BEG3 LEN4 )