Testing A String Parameter - HEIDENHAIN TNC 640 User Manual

Hide thumbs Also See for TNC 640:
Table of Contents

Advertisement

10

Testing a string parameter

The INSTR function checks whether a string parameter is contained
in another string parameter.
Select Q-parameter functions
Press the FORMULA soft key
Enter the number of the Q parameter for the
result and confirm with the ENT key
The control saves the place at which the text
to be searched for begins. It is saved in the
parameter.
Shift the soft-key row
Select the function for checking a string
parameter
Enter the number of the QS parameter in which
the text to be searched for is saved. Confirm
with the ENT key
Enter the number of the QS parameter to be
searched for by the control, and confirm with the
ENT key
Enter the number of the place at which the
control is to start search the substring, and
confirm with the ENT key.
Close the parenthetical expression with the ENT
key and confirm your entry with the END key
The first character of a text string starts internally at the
0-position
If the control cannot find the required substring, it
will save the total length of the string to be searched
(counting starts at 1) in the result parameter.
If the substring to be searched for appears multiple
times, then the control returns the first place at which it
finds the substring.
Example: Search through QS10 for the text saved in parameter
QS13. Begin the search at the third place.
N37 Q50 = INSTR ( SRC_QS10 SEA_QS13 BEG2 )
440
Programming Q Parameters | String parameters
HEIDENHAIN | TNC 640 | ISO Programming User's Manual | 10/2017

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 640 5e

Table of Contents