Heidenhain TNC 320: Touch-Probe Cycles

On a Fanuc or Haas you buy a Renishaw macro pack and call G65 P9810…. On the TNC 320 probing is part of the control: press the TOUCH PROBE key, pick a cycle from soft keys, and fill in Q parameters with a help graphic showing each one. This firmware (77185x-18) carries two generations side by side — the classic 4xx cycles and the newer 14xx cycles — plus calibration (46x) and TT tool-measurement (48x) cycles. Results land in globally effective Q parameters and an automatic HTML/ASCII log.

How TNC Probing Differs from G65 Macro Packs

Instead of macro-variable conventions, the TNC uses named cycle parameters that stay consistent across cycles — Q260 is always the clearance height, Q261 the measuring height, Q320 the set-up clearance. Probe behavior lives in the touch probe table tchprobe.tp rather than in macro commons: F probing feed, FMAX positioning feed, DIST maximum travel before the “no contact” error, SET_UP pre-position distance, TRACK spindle orientation per touch (recalibrate after changing it), CAL_OF1/2 center offset, STYLUS SIMPLE or L-TYPE. The probe is linked to its tool-table row via the TP_NO column — the numbers must match.

Three behaviors that trip up Fanuc-trained programmers:

1. Touch-probe cycles are DEF-active. They execute the moment the control reads TCH PROBE 4xx — there is no CYCL CALL. 2. Coordinate transformations must be off. Before 400–499 cycles, Cycle 7 DATUM SHIFT, 8 MIRRORING, 10 ROTATION, 11/26 SCALING must all be inactive; the 14xx cycles tolerate a datum shift but still forbid mirroring and scaling. The 40x–43x cycles also reset an active basic rotation at cycle start. 3. Pre-positioning is automatic. Cycles 400–499 and 1400–1499 use positioning logic around Q260 CLEARANCE HEIGHT; the pre-position distance is ball radius + SET_UP + Q320. Defaults for the recurring parameters can be set once per program with GLOBAL DEF 120 PROBING (Q320, Q260, Q301) and referenced in any cycle as PREDEF.

Manual Probing Functions

In Manual Operation / Electronic Handwheel mode (TOUCH PROBE soft key) the control offers: probe calibration, basic rotation from a line or a plane, preset on any axis, corner as preset, circle center as preset (hole, stud, or model circle with automatic probing routines, 3–8 touch points), and centerline as preset. Measured values can be written to the preset table or a datum table directly from the menu. No electronic probe? The same functions work with a mechanical probe or by touching off with a tool — you trigger each point manually with the actual-position-capture soft key. Manual probing results are logged to TCHPRMAN.html.

Calibration Cycles (46x)

Calibrate at commissioning, after a stylus break or swap, when the probing feed rate changes, and after changing the active tool axis or TRACK. Calibration stores the effective stylus length and ball radius in the probe's tool-table row (L and R) and the center offset in tchprobe.tp (CAL_OF1/CAL_OF2); values take effect immediately, no new tool call needed. Every calibration writes a log to TCHPRAUTO.html.

CycleCalibratesArtifact
461 TS CALIBRATION OF TOOL LENGTHStylus length (probes Z– from current position)Surface of known height (Q434)
462 CALIBRATION OF A TS IN A RINGBall radius, and center offset if the probe can orient 180°Ring gauge (Q407 radius, Q423 = 3–8 points)
463 TS CALIBRATION ON STUDBall radius + center offsetCalibration pin/stud
460 CALIBRATION OF TS ON A SPHERERadius, optionally length (Q433=1), optionally 3D deflection map (Q455 = 1–30 points — requires option 92, 3D-ToolComp)Calibration sphere; required method for L-shaped styli
11 TCH PROBE 460 TS CALIBRATION OF TS ON A SPHERE ~
Q407=+12.5  ;SPHERE RADIUS ~
Q320=+0     ;SET-UP CLEARANCE ~
Q301=+1     ;MOVE TO CLEARANCE ~
Q423=+4     ;NO. OF PROBE POINTS ~
Q380=+0     ;REFERENCE ANGLE ~
Q433=+0     ;CALIBRATE LENGTH ~
Q434=-2.5   ;PRESET ~
Q455=+15    ;NO. POINTS 3-D CAL.

Workpiece Cycles — What Exists on the TNC 320

Verified against the cycle table of this manual (sw 77185x-18). For nearly every 4xx cycle, the manual now recommends its 14xx successor — but both remain available. Note what is not here: Cycle 444 PROBING IN 3-D and the KinematicsOpt 45x cycles are mentioned only in passing and do not appear in the TNC 320 cycle table — do not import them from TNC 620/640 documentation.

CyclePurpose14xx successor
Rotation / misalignment (compensated via basic rotation or rotary-table turn)
400 BASIC ROTATIONAngle from 2 points on an edge1410, 1412
401 ROT OF 2 HOLES / 402 ROT OF 2 STUDSAngle from two hole/stud centers1411 PROBING TWO CIRCLES
403 ROT IN ROTARY AXIS / 405 ROT IN C AXISCompensate by rotating the table14101416 with Q1126
404 SET BASIC ROTATIONSet any basic rotation directly
1410 / 1411 / 1412 / 1416 / 1420Edge / two circles / inclined edge / intersection / plane — the new generation; work with 3D ROT and active kinematics
Presetting (writes display, preset table, or datum table)
408 / 409Slot center / ridge center1404 PROBE SLOT/RIDGE
410413Rectangle inside/outside, circle inside/outside1401 CIRCLE PROBING
414 / 415Corner outside / inside1416
416 PRESET CIRCLE CENTERBolt-circle center from 3 holes
417 / 419Preset in TS axis / in one selectable axis1400 POSITION PROBING
418 PRESET FROM 4 HOLESIntersection of two hole pairs
1400 / 1401 / 1402 / 1404 / 1430 / 1434Position / circle / sphere / slot-ridge / undercut / slot-ridge undercut (1430/1434: L-shaped stylus)
Inspection (measure, tolerance-check, tool compensation)
0 REF. PLANE / 1 POLAR PRESETSingle coordinate / point at an angle → Q parameter1400
420 MEASURE ANGLEAngle of a line vs. main axis1410
421 / 422Hole / circular stud: position + diameter
423 / 424Rectangle inside / outside: position + lengths
425 / 426Slot width / ridge width
427 MEASURE COORDINATEAny coordinate in a selectable axis
430 / 431Bolt-hole circle / plane angle from 3 points
Special
3 MEASURING / 4 MEASURING IN 3-DRaw single-touch building blocks (Cycle 4 probes along any vector); write 4 consecutive Q parameters, 4th = –1 on failure
441 FAST PROBINGGlobal probe settings: positioning feed Q396, angle tracking Q399, auto-interrupt Q400, touch-point-missed reaction Q371
1493 EXTRUSION PROBINGRepeat the touch points of the following cycle along an extrusion direction
620624 VTCCamera-based tool inspection — requires the VT 121 vision system + VTC software

What the 14xx generation adds

Three input tricks, all typed via the ENTER TEXT soft key into the nominal-position parameters (Q1100…, entered as QS strings): semi-automatic mode — prefix ? (e.g. QS1100="?30") when you don't know where the part sits; the cycle stops, you jog the probe near the feature, press NC Start, and it measures from there. Tolerance monitoring — append a tolerance (QS1116="+8-2-1", or DIN EN ISO 286-2 like 10H7); the control classifies the result into Q183 (0 good / 1 rework / 2 scrap) and Q309 decides whether to stop. Actual-position transfer — append @ plus a measured value (QS1100="10+0.02@10.0123"): no probing occurs; the cycle just computes and applies the compensation. Where the 4xx presetting cycles steer output with Q303/Q305 (Q305=0 → row 0 + display; Q305>0 with Q303=1 → preset table, Q303=0 → datum table), the 14xx cycles use Q1120 TRANSFER POSITION and Q1121 CONFIRM ROTATION to correct the active preset, and Q1126 to align a rotary axis.

Where the Results Go — Q-Parameter Map

All result parameters are global. Units follow the main program; automatic logs go to the NC program's directory (4xx inspection cycles: e.g. TCHPR421.TXT, selected with Q281) or to TCHPRAUTO.html (14xx and calibration cycles).

ParameterMeaning
All generations
Q115Q119Raw touch point in X / Y / Z / 4th / 5th axis (no stylus radius or length compensation)
Q198Number of the last active touch-probe cycle
4xx workpiece cycles (420–431 and presetting)
Q150Q160Actual values: Q150 angle, Q151/Q152 center in ref./minor axis, Q153 diameter, Q154/Q155 pocket sides, Q156 length, Q157 centerline, Q158/Q159 projected A/B angles, Q160 coordinate of the measuring axis
Q161Q167Deviations: Q161/Q162 center error, Q163 diameter error, Q164/Q165 side-length error, Q166 length error, Q167 centerline error
Q170Q172Determined spatial angles A / B / C (Cycle 431)
Q180 / Q181 / Q182Status flags: good / rework required / scrap (set even without tolerance inputs)
14xx cycles
Q950Q958Measured points P1–P3 in main / minor / tool axis
Q961Q963Measured spatial angles SPA / SPB / SPC (in WPL-CS)
Q964 / Q965Measured basic rotation / table rotation
Q966 / Q967Measured diameters 1 and 2
Q980Q988, Q994Q997Deviations of the above (relative to the mean tolerance if one was programmed)
Q183Workpiece status: –1 undefined, 0 good, 1 rework, 2 scrap (3 = stylus did not move, with Cycle 441/Q371)
Tool measurement (TT)
Q115 / Q116Length / radius deviation from nominal after tool measurement
Q1990 = within tolerance, 1 = worn (LTOL/RTOL exceeded), 2 = broken (LBREAK/RBREAK exceeded)

TT Tool-Measurement Cycles

Enabled by the machine manufacturer (a table-mounted TT probe must be configured). Each cycle exists twice: old format 30–33 and new format 480–483 — functionally identical, but only 48x exist as G480–G483 in ISO, and 48x report status in the fixed parameter Q199 where Cycle 31–33 let you choose the result parameter. TOOL.T must be active, and the tool needs approximate L, R, CUT, and DIRECT entered before first measurement. R-OFFS/L-OFFS position the tool over the probe contact (drills: R-OFFS 0; end mills: offset by tool radius).

CycleFunction
30 / 480 CALIBRATE TTCalibrates the TT with a cylindrical calibration tool; measures its center offset by a 180° spindle turn
31 / 481 CAL. TOOL LENGTHLength: rotating tool, stationary tool (drills, ball mills), or individual teeth (Q341=1, up to 20 teeth)
32 / 482 CAL. TOOL RADIUSRadius: rotating, optionally per-tooth via oriented spindle stops
33 / 483 MEASURE TOOLLength + radius in one cycle
484 CALIBRATE IR TTCalibrates a tool touch probe with wireless transmission (e.g., an infrared TT)

Q340 decides what happens with the measurement: 0 write L/R and zero the deltas, 1 compare and store the difference as wear DL/DR (locking the tool with status L if LTOL/RTOL/LBREAK/RBREAK are exceeded — deviation also lands in Q115/Q116), 2 just report into Q115/Q116, touch nothing. Rotating-tool speed and feed come from machine parameters (maxPeriphSpeedMeas, measureTolerance1, probingFeedCalc).

11 TOOL CALL 12 Z
12 TCH PROBE 481 CAL. TOOL LENGTH ~
Q340=+1    ;CHECK -- store deviation as wear DL ~
Q260=+100  ;CLEARANCE HEIGHT ~
Q341=+1    ;PROBING THE TEETH

Worked example — basic rotation from two holes (from the manual)

Probe two holes, compensate the misalignment by rotating the table (Q402=1), zero the rotary-axis display (Q337=1), then run the part program:

0 BEGIN PGM TOUCHPROBE MM
1 TOOL CALL 600 Z                      ; call the touch probe
2 TCH PROBE 401 ROT OF 2 HOLES ~
Q268=+25   ;1ST CENTER 1ST AXIS ~
Q269=+15   ;1ST CENTER 2ND AXIS ~
Q270=+80   ;2ND CENTER 1ST AXIS ~
Q271=+35   ;2ND CENTER 2ND AXIS ~
Q261=-5    ;MEASURING HEIGHT ~
Q260=+20   ;CLEARANCE HEIGHT ~
Q307=+0    ;PRESET ROTATION ANG. ~
Q305=+0    ;NUMBER IN TABLE ~
Q402=+1    ;COMPENSATION -- rotate the table ~
Q337=+1    ;SET TO ZERO
3 CALL PGM 35                          ; run the part program
4 END PGM TOUCHPROBE MM

And the measure-and-rework pattern with an inspection cycle — Cycle 424 measures a roughed stud, the measured side-length errors Q164/Q165 shrink the finish dimensions, and tool monitoring via Q330 can write the deviation straight into the milling cutter's DR column:

8  TCH PROBE 424 MEAS. RECTAN. OUTS. ...
9  Q1 = Q1 - Q164                      ; correct length X by measured deviation
10 Q2 = Q2 - Q165                      ; correct length Y
12 TOOL CALL 25 Z S8000                ; finishing tool
14 CALL LBL 1                          ; re-run the stud cycle with corrected Q1/Q2

Common Gotchas

GotchaDetail
DEF-activeThe cycle runs when its definition is read. Position before the TCH PROBE block, and always program a TOOL CALL for the probe first to set the probe axis.
TransformationsCycles 7/8/10/11/26 must be reset before 4xx cycles; 8/11/26 and TRANS MIRROR before 14xx. 40x–43x also clear an active basic rotation at start; 400–405 do not work with 3D ROT (use 14xx).
Semi-automatic modeRuns only in machine modes (not Test Run), and it ignores Q1125 = 1/2 — retract to a safe height yourself after each touch.
Uncalibrated / stale calibrationRecalibrate after stylus change, feed change, tool-axis change, or toggling TRACK. L-TYPE styli must be calibrated with 460/461 and probed at the calibration feed rate.
Tool number vs. probe numberThe probe's row in TOOL.T must reference the right row of tchprobe.tp (TP_NO) — mismatches give wrong compensation in every cycle.
Undefined preset columnsWhen a presetting cycle writes the preset table, undefined fields behave differently from 0: activating a preset keeps the old value for undefined fields but overwrites with 0-fields. Check all columns.
Feed override & limitsProbing feed F is capped by machine parameter maxTouchFeed (no. 122602); the feed potentiometer can be live during probing depending on OEM setup.
Not on this controlCycle 444 PROBING IN 3-D and the KinematicsOpt 45x cycles are absent from the TNC 320 cycle table; VTC cycles 620–624 need the VT 121 camera; 3D calibration in Cycle 460 needs option 92 (3D-ToolComp); TT cycles must be enabled by the machine manufacturer. Cycles 1, 3, and 4 are Klartext-only (no ISO syntax; Cycle 0 exists in ISO as G55).

References

  • HEIDENHAIN, TNC 320 Programming of Measuring Cycles for Workpieces and Tools, NC software 77185x-18, 10/2023, ID 1303435-20.
  • HEIDENHAIN, TNC 320 User's Manual for Setup, Testing and Running NC Programs, NC software 77185x-18, 10/2023, ID 1263173-21 (manual probing, touch probe table, preset management).

Have a question or want to contribute?

Contact us with corrections, additions, or topics you'd like covered.

Get in Touch