Copying a substring from a string parameter, Programming: q parameters 9.10 string parameters – HEIDENHAIN TNC 640 (34059x-02) ISO programming User Manual

Page 294

Advertising
background image

Programming: Q Parameters

9.10

String parameters

9

294

TNC 640 | User's Manual for DIN/ISO Programming | 5/2013

Copying a substring from a string parameter

The

SUBSTR function copies a definable range from a string

parameter.

Show the soft-key row with special functions

Select the menu for defining various plain-

language functions
Select string functions

Select the STRING FORMULA function

Enter the number of the string parameter in which

the TNC is to save the copied string. Confirm with

the ENT key
Select the function for cutting out a substring

Enter the number of the QS parameter from which

the substring is to be copied. Confirm with the

ENT key

Enter the number of the place starting from which

to copy the substring, and confirm with the ENT

key

Enter the number of characters to be copied, and

confirm with the ENT key

Close the parenthetical expression with the ENT

key and confirm your entry with the END key

Remember that the first character of a text sequence

starts internally with the zeroth place.

Example: A four-character substring (LEN4) is read from the
string parameter QS10 beginning with the third character (BEG2)

N37 QS13 = SUBSTR ( SRC_QS10 BEG2 LEN4 )

Advertising