Heidenhain: Running a Program at the Control
Everything else in this section is about writing programs. This one is about getting a program that already exists to actually run, on a control that will refuse in ways the message text does not explain. The single most common way to get stuck is pressing NC Start with the cursor parked somewhere the control cannot start from — which produces Selected block not addressed and no obvious hint that the fix is three keystrokes away.
The Short Version
Five steps, in this order. Each one has its own failure message if you skip it, and those messages are collected at the bottom of this page.
• Machine ready. Reference points traversed, tool in the spindle, preset set for the part.
• Select the mode. Program Run — not Programming, not Test Run.
• Select the program. PGM MGT, pick the file, load it. Having it on screen in the editor is not the same as having it selected for running.
• Address the start block. Press GOTO, enter 0, confirm. This is the step people skip.
• Press NC Start. In Single Block you press it once per block; in Full Sequence it runs to the end or to the next stop.
Which Operating Mode Actually Runs a Program
A TNC keeps editing, simulation, and execution in separate operating modes, and only one family of modes moves the machine through a program. The layout differs between control generations, which is the first thing to establish when you sit down at an unfamiliar machine.
| Mode | What it is for | Runs a program? |
|---|---|---|
| TNC 640 / 620 / 320 / 128 and iTNC 530 — one key per mode | ||
| Manual operation / Electronic handwheel | Jog the axes, set presets, probe the part | No |
| Positioning with Manual Data Input (MDI) | Single traversing moves typed at the control — face milling, pre-positioning | Blocks you type, not a stored program |
| Programming | Write and edit NC programs | No |
| Test Run | Simulate and graphically verify, no axis motion | Simulation only |
| Program Run, Single Block | Execute one NC block per NC Start | Yes — block by block |
| Program Run, Full Sequence | Execute continuously to the end or the next stop | Yes |
| TNC7 — applications instead of mode keys | ||
| Manual | Contains Manual operation, MDI, Setup, Move to ref. point, and Retract | No |
| Editor | Create, edit and simulate NC programs, contours and pallet tables | Simulation only |
| Files / Tables | Drives and folders; tool, preset and other tables | No |
| Program Run | Produce workpieces — executes NC programs and pallet tables, block-by-block or in full sequence | Yes |
The practical difference: on a TNC 640 and its siblings, Single Block and Full Sequence are two separate mode keys, so choosing block-by-block execution means pressing a different key. On a TNC7 there is one Program Run operating mode and block-by-block is a setting within it. If you are hunting for a Single Block key on a TNC7 and cannot find one, that is why.
Selecting the Program Is Not the Same as Opening It
Press PGM MGT to open the file manager, navigate to the program, and load it with ENT. The LAST FILES soft key gives you a pop-up of recently selected files, which is usually faster than walking the directory tree.
The distinction that catches people: a program displayed on screen in the Programming mode has been opened for editing, not selected for running. If it was never selected in Program Run, the control reports Current program not selected (250-138D) when you try to start it. Select it through the file manager from within the Program Run mode and the message goes away.
One related check the control does for you before machining: it verifies every NC program is complete. If the END PGM block is missing it shows a warning, and starting the program in either Program Run mode aborts with an error. The fix is to open the program in Programming mode — the control adds the missing END PGM block automatically — then save it.
Selected Block Not Addressed — and the GOTO 0 Fix
This is the error that sends people to the internet. The full text from HEIDENHAIN’s own error list, filed as 2A0-0042 and again as 400-0720:
| Error | Cause of error | Error correction |
|---|---|---|
| Selected block not addressed | After an interruption of the program run the control can no longer resume the program run from the cursor’s present location. | Press GOTO and enter a block number to select the desired location for returning to the program, or select the mid-program startup function. |
In plain terms: the cursor is sitting on a block, but the control has no execution context attached to that block, so it does not know what state the machine should be in when it starts there. Pressing NC Start would be asking it to begin mid-thought.
When you just want to run the part from the beginning, the answer is to address block 0:
GOTO open the jump window
0 the block number to jump to
ENT confirm - the cursor is now at the start of the program
NC START run
On a TNC7 the jump window has a dedicated GOTO 0 button that jumps to the beginning of the program and closes the window in one action, plus a Select last button that fills in the number of the last executed NC block. On the older generation you enter the number and pick the “jump to the block number entered” soft key, as distinct from the soft keys that move up or down by a number of lines — a distinction worth reading carefully, because entering 0 against the wrong soft key does nothing useful.
Do Not Use GOTO to Re-enter Mid-Program
GOTO 0 is safe for one specific reason: at the beginning of a program there is no prior context to lose. Jumping to a block in the middle is a different and considerably more dangerous act, and HEIDENHAIN is blunt about it.
⚠ Danger of collision. If you select an NC block in program run using the GOTO function and then execute the NC program, the control ignores all previously programmed NC functions (for example, transformations). There is a risk of collision during subsequent traversing movements. HEIDENHAIN’s rule: use GOTO only when programming and testing NC programs; only use Block Scan when executing NC programs.
Everything above the block you jumped to — the tool call, spindle start, coolant, work plane tilt, datum shift, radius compensation, the feed rate — simply never happened as far as the control is concerned. The machine will happily traverse using whatever state it currently holds.
Block Scan (mid-program startup) is the function built for this. Instead of teleporting the cursor, it walks the program forward from the start, accumulating the modal state without moving the axes, so that when execution resumes the control knows which tool is loaded, where the datum is, and what compensation is active. Two behaviors worth knowing before you rely on it: for an interruption inside a program-section repeat or a subprogram you must use Block Scan to re-enter at the interruption point, and with machining cycles the startup always happens at the beginning of the cycle — so a cycle that was half finished when you stopped will repeat the machining steps it already carried out.
What Breaks a Resume
Once a program run has been interrupted, the control is holding a contextual reference to where it was. A handful of ordinary-looking actions throw that reference away, and the next NC Start then produces Selected block not addressed. While a program is interrupted and you intend to resume it, avoid:
• Moving the cursor to another NC block, with the arrow keys or with GOTO
• Editing the NC program — any block, including one you are not near
• Selecting a different NC program
• Changing variable values in the Q parameter list
• Switching operating modes
Two further cases behave the same way and have their own message. Editing the running program or one of its callers reports Program was edited (250-138B) — the control cannot resume where it was, so you re-enter with Block Scan or GOTO. And if you change the active preset during an interruption, resuming is only possible with GOTO or mid-program startup at the interruption point. In every one of these cases the recovery is the same: restore the context deliberately with Block Scan rather than trying to talk the control into continuing.
Errors While Trying to Start a Program
The curated set — the ones that stop you before the first chip, rather than the full error list.
| Message | Number | What it means and what to do |
|---|---|---|
| Selected block not addressed | 2A0-0042, 400-0720 | The cursor has no execution context. Starting from the top: GOTO, 0, confirm. Resuming mid-program: use Block Scan instead. |
| Current program not selected | 250-138D | The program on screen was never selected in Program Run. Select it via the file manager from within the Program Run mode. |
| Program was edited | 250-138B | The running program or one of its callers changed, so the control cannot resume. Re-enter with mid-program startup (Block Scan) or GOTO. |
| To retract: NC start | 2A0-0041 | The control is in the retraction sequence after a power interruption. Press NC Start to retract the tool, then re-establish the machine state before running. |
| File not found | 240-07D1 | The path or name is wrong, or the file is not where the program expects. Check spelling and the directory. |
| Spindle must be turning | 280-03E8 | A fixed cycle was called with the spindle off — a classic symptom of having entered mid-program without the context. Program M3/M4, or re-enter with Block Scan. |
| Tool axis is missing | 280-03E9 | A positioning block with radius compensation ran before any tool call. Same root cause as above when it appears after a GOTO jump. |
Error numbers are structured as GROUP-CODE, and the full lookup method plus a wider curated table lives in Heidenhain TNC Error Messages & Diagnostics.
Habits That Prevent Most of This
Run the first part in Single Block. One NC Start per block turns a crash into a pause. It costs a few minutes on part one and nothing thereafter.
Simulate before you run. Test Run mode (Editor on a TNC7) executes the program graphically with no axis motion, which catches the missing tool call and the wrong preset before the machine does.
Treat an interruption as a decision point. The moment you stop a program, decide whether you are resuming it or restarting it. If resuming, touch nothing — not the cursor, not the program, not the mode. If restarting, GOTO 0 and go. The trouble comes from drifting between the two, editing something to have a look and then expecting NC Start to pick up where it left off.
Feed override down on entry. Whether you started at the top or re-entered with Block Scan, the first move back to the contour is the one most likely to be somewhere you did not expect.
See Also
Heidenhain TNC Error Messages & Diagnostics for looking up any error number, Heidenhain TNC Series Guide to work out which control and software version you are on, and Klartext & Q-Parameters for the programming language itself. For the equivalent operator workflow on other controls, see Coordinate Systems & Offsets on presets and datums.
References
- HEIDENHAIN, TNC7 — User’s Manual for Setup and Program Run, NC software 81762x-20, ID 1358774-24, 10/2025.
- HEIDENHAIN, TNC 640 — User’s Manual for Setup, Testing and Running NC Programs, NC software 34059x-18, ID 1261174-25, 10/2023.
- HEIDENHAIN, NC Error Messages, 10/2023 — error numbers 2A0-0042, 400-0720, 250-138B, 250-138D.
- HEIDENHAIN, iTNC 530 — User’s Manual HEIDENHAIN Conversational Format, ID 737759-24 — the iTNC 530 predates the separate setup manual, so its operating content is in the combined manual.
Have a question or want to contribute?
Contact us with corrections, additions, or topics you'd like covered.
Get in Touch