![HEIDENHAIN TNC 407 User Manual Download Page 213](http://html1.mh-extra.com/html/heidenhain/tnc-407/tnc-407_user-manual_2118718213.webp)
TNC 426/TNC 425/TNC 415 B/TNC 407
7 - 2 4
7
Programming with Q Parameters
Measuring with the 3D Touch Probe During Program Run
Example for exercise: Measuring the height of an island on a workpiece
Coordinates for pre-positioning the 3D touch
probe
Touch point 1:
X =
20 mm
(Q11)
Y =
50 mm
(Q12)
Z =
10 mm
(Q13)
Touch point 2:
X =
50 mm
(Q21)
Y =
10 mm
(Q22)
Z =
0 mm
(Q23)
Part program
%S717I G71 * ............................................................ Start of program
N10 D00 Q11 P01 +20 *
N20 D00 Q12 P01 +50 *
N30 D00 Q13 P01 +10 * ............................................ Assign coordinates to the parameters for pre-positioning
N40 D00 Q21 P01 +50 * ............................................. the touch probe
N50 D00 Q22 P01 +10 *
N60 D00 Q23 P01 +0 *
N70 T0 G17 *
N80 G00 G40 G90 Z+100 M06 * ................................ Insert probe
N90 G55 P01 10 P02 Z– X+Q11 Y+Q12 Z+Q13 * ..... Probe in negative direction; store Z coordinate in Q10 (first
point)
N100 X+Q21 Y+Q22 * ............................................... Intermediate positioning for second measurement
N110 G55 P01 20 P02 Z- X+Q21 Y+Q22 Z+Q23 * .... Probe in negative direction; store Z coordinate in Q20 (second
point)
N120 D02 Q1 P01 +Q20 P02 +Q10 * ........................ Measure height of island and assign to Q1
N130 G38 * ................................................................. Program stop; Q1 can be checked (see also page 7-13)
N140 Z+100 M02 * ..................................................... Retract in the infeed axis and end the program
N99999 %S717I G71 *
Y
X
Z
1
2