Siemens Sinumerik 828D Programming: 7 Essential Tips
Most 828D machines run at half their capability because the operator only uses G54 and a hand-written program. This guide to Siemens Sinumerik 828D programming is for machinists and programmers who want fewer setup errors and shorter cycle times. Read it, then pick the tips that fit your part mix.

In this article
- 1
- 2
- 3
- 4
- 5
- 6
- 7
Key takeaways
ShopMill and ShopTurn plus a clean zero offset system
The 828D runs two programming worlds side by side. Plain ISO G-code works when you port a program from another control. ShopMill for milling and ShopTurn for turning work differently: you describe the contour, the control builds the blocks. On a part with six pockets and two chamfer passes, the graphical route typically saves 20 to 40 minutes of typing and removes the arc-direction mistakes that show up at the machine.
There is a real limit. ShopMill and ShopTurn suit parts with a clear 2.5D structure: faces, pockets, slots, drilled holes, simple turning profiles. On a five-axis impeller with blended surfaces, or when the CAM system already posts proven code, write G-code and keep the graphical editor out of the loop. Mixing both on one part is where programs get confusing.
Zero offsets cause more first-piece scrap than any other setting on this control. The 828D gives you a base offset, G54 to G57 as work offsets, and settable zero offsets you can move during the run. A workable habit: G54 holds the fixture position, G55 holds the raw stock position, G56 holds the finished part datum. When the operator re-clamps the vise, only G54 changes.
Name the offsets in the offset list instead of leaving them as G54, G55, G56. Six months later nobody remembers which one was the vise. Also set the active plane and the programmable zero offset before the first tool call, not in the middle of a cycle. A Z shift applied after the tool is already at depth is the classic way to bury a face mill in the fixture.
- 1Graphical for 2.5DPockets, slots, faces and drill patterns with clear geometry.
- 2G-code for free-formBlended surfaces, five-axis work, or any program already proven in CAM.
- 3One offset per taskFixture, stock, part. Change only the one that actually moved.
Tool compensation that follows the real cut
Length and radius compensation are the basics, and every operator knows them. The 828D adds compensation behavior that reacts to the cut rather than to a theoretical tool. On turning, the CUT function lets you shift the tool in X and Z to correct taper or a drifting diameter without editing the program. On milling, TOOLCORR applies a correction value to the active tool and keeps the programmed path intact.
The practical rule is to separate wear from setup. Put the setup error in the geometry offset and the slow drift in the wear offset. If a Ø12 mm end mill comes out 0.03 mm undersize on every part, that is wear and it belongs in the wear column. If the first part is 0.2 mm undersize and the rest follow, the tool was set wrong and the fix belongs in geometry.
Set a wear limit and let the control stop the job. On a finishing pass at ±0.005 mm, a wear value of 0.02 mm means the tool is done, not that you should keep pushing it. Log the wear value at the end of each run. Three runs of data tell you whether the tool life is 40 parts or 90, and that number feeds the next quote.
- 1Geometry versus wearSetup error to geometry, slow drift to wear. Do not mix them.
- 2Use CUT for taperCorrect turning taper in the offset, not in the program.
- 3Set a wear alarmStop the job before the tool decides for you.
Subroutines, macros and cycle programming in Siemens Sinumerik 828D programming
If a block of code appears in three programs, it should be a subroutine. On the 828D, subroutines live as separate files and you call them with an L number or by name. Build a small library: a face roughing pass, a chamfer pass with a fixed depth, a deburr pass, a probing block for a rectangular pocket. Each one takes parameters for depth, feed and tool number.
Macros go one step further and let you compute values at run time. A macro that reads the stock height and calculates the number of roughing passes beats a fixed loop that only works on one casting. Keep the arithmetic visible. A macro nobody can read is worse than ten lines of plain code, because the next operator will not trust it and will rewrite it.
The control ships with cycles for drilling, tapping, boring, pocket milling, contour milling, turning, grooving and threading. They are configurable, not fixed black boxes. In a drilling cycle you set the retract plane, the reference plane, the safety clearance and the dwell. Getting the retract plane wrong is the most common cycle error: the tool rapids to a clearance that sits below the top of a clamp.
Cycles pay off on repeated features. A plate with 48 tapped M6 holes becomes one cycle call with a pattern, not 48 position blocks. For a one-off hole in a one-off part, just write the two lines. The cycle dialog takes longer than the code.
- 1Library of fiveFace, chamfer, deburr, pocket probe, edge find. That covers most work.
- 2Keep macros readableNamed variables and comments beat clever arithmetic.
- 3Check the retract planeSet clearance above the tallest clamp, not above the stock.
Simulation settings and in-process probing
The 828D simulation does more than draw a toolpath. Turn on stock removal so the screen shows the material actually being cut. That is what reveals a holder rubbing the wall of a deep pocket, a tool shank contacting a step, or a rapid move that passes through the part. A 2D trace will show none of those.
Set the simulation to the real tool data, not a default cylinder. If the machine holds a Ø16 mm end mill in a long holder, model that holder. Collisions in deep cavities almost always involve the holder, not the cutter. Run the simulation at the feed you will actually use and step through the tool changes at reduced speed.
Probing closes the loop. A spindle probe can find the stock corner, set the work offset in the control, and write the value straight into the offset table. That removes the manual edge finder and the arithmetic that goes with it. On a batch of 50 parts, probing the stock each cycle catches a short casting before the first pass.
For in-process measurement, probe a critical feature after roughing and let the control adjust the finishing offset. This works well on a bore or a pocket depth where the stock varies. It does not replace a CMM for final inspection, and it will not fix a machine that is out of alignment. Use it to hold a tolerance, not to prove one.
- 1Stock removal onThe only way to see holder interference in a deep pocket.
- 2Model the real holderA default cylinder hides the collision you are looking for.
- 3Probe to set offsetsWrite the measured value into the offset table, not onto a note pad.
Step by step: from drawing to first good part
- 1Read the drawing for the datumIdentify the datum the inspector will use. Everything in the offset system hangs off that choice.
- 2Set G54 to the fixtureTouch off the vise or fixture once. Name the offset so the next operator knows what it is.
- 3Set G55 to the raw stockPut the stock position here so a re-cut or a second op does not disturb the fixture offset.
- 4Enter tool geometry, not wearMeasure every tool offline. Put the setup value in geometry and leave wear at zero.
- 5Build the program with cyclesFace, rough, finish. Use ShopMill or ShopTurn for 2.5D shapes and call subroutines for repeated features.
- 6Simulate with stock removalRun the full program at real feeds. Watch the tool changes and the deep pockets.
- 7Dry run above the partShift Z up 50 mm and run the first cycle at rapid override. Confirm the offsets before the tool touches metal.
- 8Probe and measure the first partProbe the critical feature, log the deviation, and adjust wear only if the drift repeats across three parts.
When to use each 828D feature
Match the tool to the part, not to habit
| Feature | Use it when | Avoid it when |
|---|---|---|
| ShopMill / ShopTurn | 2.5D pockets, slots, faces, simple turning profiles | Blended surfaces or proven CAM output |
| Settable zero offset | Stock varies or a second op shifts the datum | One-off part with a stable setup |
| CUT / TOOLCORR | Turning taper or a drifting diameter mid-run | The geometry offset was simply set wrong |
| Subroutines | Same feature repeats in three or more programs | A single hole in a single part |
| Macros | Values depend on measured stock or part count | The arithmetic is simple enough to write out |
| Machining cycles | Drill patterns, threading, grooving, pocket milling | A one-off operation with two lines of code |
| In-process probing | Stock varies and one feature holds the tolerance | Final inspection, or a machine out of alignment |
Pick two tips and apply them this week
Start with a named zero offset system and stock-removal simulation. Those two changes catch the most first-piece scrap on an 828D.
Common questions about the 828D
Can I mix ShopMill and ISO G-code in one program?
Yes. The 828D lets you switch between the graphical cycles and plain G-code blocks in the same program. Keep the split clean: use the graphical cycles for the 2.5D features and G-code for the free-form passes.
The risk is not technical, it is human. A program that jumps between two styles is harder for the next operator to read. Add a comment line at each switch.
How many zero offsets should one job use?
Three is a workable number: fixture, raw stock, finished part. On a simple job with one setup and stable stock, one offset is enough.
The point is not the count. It is that a change to one offset should not move anything else.
Does in-process probing replace a CMM?
No. Probing on the machine holds a tolerance during the run. It tells you the feature moved and lets the control correct for it.
Final inspection still needs a separate measuring system and a clean, temperature-stable environment. Use both, for different jobs.
What wear limit should I set on a finishing tool?
It depends on the tolerance. On a ±0.005 mm feature, a wear value near 0.02 mm means the tool is at the end of its useful life.
Set the limit below the point where the part goes out of tolerance, then log the value at the end of each run to build real tool-life data.
Why does my simulation miss holder collisions?
Because the holder is modeled as a default cylinder, or not modeled at all. Load the real holder dimensions from the tool data.
Deep pockets and long tools are where this matters. Turn on stock removal as well, since a 2D trace does not show material.
Is the 828D suitable for five-axis work?
The control handles five-axis motion, but the graphical ShopMill cycles are built around 2.5D features. For blended five-axis surfaces, post the program from CAM and verify it in simulation.
Use the control for what it does well and keep the complex surfacing in the CAM system.
Send us the part and the drawing
We run 127 high-precision CNC machines, including 16 simultaneous 5-axis centers, and hold ±0.005 mm on production work. Upload a file and get a quotation with a free DFM analysis within 12 hours.
12-hour quote100% inspectionNDA on request