Based on the common TNC 620 / 320 / 128 syntax; soft keys and cycle numbers vary by model/software version – follow your machine’s manual.
1. Program structure: the recommended 8-step layout
- Call tool, define tool axis
- Retract the tool (to a safe height)
- Pre-position in the working plane near the contour start
- Move along the tool axis above the part or to depth (switch on spindle/coolant if needed)
- Approach the contour (APPR)
- Machine the contour
- Depart the contour (DEP)
- Retract, end program (END PGM)

2. Most-used blocks
| Block | Example | Purpose |
|---|---|---|
BEGIN PGM | BEGIN PGM NAME MM | Program start, name, unit |
BLK FORM 0.1 | BLK FORM 0.1 Z X+0 Y+0 Z-40 | Blank: spindle axis + MIN point |
BLK FORM 0.2 | BLK FORM 0.2 X+100 Y+100 Z+0 | Blank: MAX point |
TOOL CALL | TOOL CALL 5 Z S5000 | Call tool 5, axis Z, 5000 rpm |
L | L X+90 Y+90 R0 F200 | Straight line to target |
CC | CC X+50 Y+50 | Arc centre / polar pole |
C | C X+.. Y+.. DR+ | Arc: end point + centre |
CR | CR X+.. Y+.. R+10 DR+ | Arc: end point + radius |
CT | CT X+.. Y+.. | Tangential arc |
RND / CHF | RND R5 / CHF 2 | Corner rounding / chamfer |
APPR | APPR LT ... / APPR LCT ... | Approach the contour |
DEP | DEP LT ... | Depart the contour |
CYCL DEF | CYCL DEF 200 DRILLING | Define a fixed cycle |
CYCL CALL | CYCL CALL / CYCL CALL PAT | Call a cycle / at a pattern |
PATTERN DEF | PATTERN DEF POS1(...) | Define a hole pattern |
LBL / CALL LBL | LBL 1 / CALL LBL 1 | Label / call a subprogram or repeat |
END PGM | END PGM NAME MM | Program end (name must match) |
3. Motion element reference
| Element | Value | Meaning |
|---|---|---|
| Radius comp. | R0 / RL / RR | None / left / right |
| Arc direction | DR+ / DR- | Clockwise / counter-clockwise |
| Feed | F200 / FMAX | Feed per minute / rapid |
| Incremental | IX / IY / IZ | Move this much from the current point |
| Spindle/coolant | M13 / M9 | Spindle+coolant on / coolant off |
4. Common M codes
| M | Function |
|---|---|
M0 | Program stop (unconditional pause) |
M2 | Program end |
M3 / M5 | Spindle clockwise / spindle stop |
M13 | Spindle clockwise + coolant on |
M9 | Coolant off |
M30 | Program end and reset |
Exact M meanings follow the machine builder/model; some M codes are builder-defined (tool change, clamping) – do not copy blindly.
Frequently Asked Questions
How does this page relate to the main article?
This page is a lookup: quickly check how a block is written or what an element means while writing/reading. The main article “HEIDENHAIN TNC Conversational Programming for Beginners” walks a full 13-line program line by line and explains why, including common mistakes – better for systematic learning.
Why must the BEGIN and END names match?
The name in BEGIN PGM NAME MM and END PGM NAME MM identifies the program, and the control pairs them by it. If they differ, or you rename Begin but not End, the program structure is incomplete and errors or simulation problems follow. Change both together.
In the table, how do I choose R0 vs RL/RR?
The table only gives the values; the choice depends on the job: use R0 on the tool centre line for practice or drilling positions; for milling contours/pockets that must offset by the tool radius, use RL (tool left of contour) or RR (tool right). The wrong pick is a one-tool-radius dimensional error.
Last updated: 2026-11-01
HEIDENHAIN TNC conversational programming (full)
Where to go next
- FANUC Troubleshooting — the full guide library: alarms, diagnosis numbers, servo, spindle, PMC and electrical faults, organised by symptom.
- CNC Repair Tools — which instrument measures what: multimeters, clamp meters, insulation testers and oscilloscopes, with the specification that actually matters.
- Remote Technical Support — have the readings reviewed with you: alarm reverse lookup, PMC ladder analysis and servo tuning advice by call. Repair companies and integrators welcome.
Read the guide, get the right instrument, or walk the diagnosis through with someone — pick whichever you need.
The original Chinese version — same procedure, with the full field notes.









































暂无评论内容