Configuring Siemens 5-Axis Work Offsets with CYCLE800 and TRANS
Programming a 5-axis trunnion machine such as the DMG MORI DMU 50 with a Siemens SINUMERIK 828D or 840D sl control forces an early architectural decision: do you carry a single settable work offset (typically G54 or G55) across every swiveled plane, or do you assign a distinct settable zero per face using the extended slots G505 through G599? Both approaches are valid; they differ in how tolerant the process is to fixture variation, thermal drift, and operator-driven fine adjustment. This reference consolidates Siemens frame commands (TRANS, ATRANS, ROT, AROT), the CYCLE800 swivel cycle, and G10 programmable work offset entry into a single commissioning playbook for 3+2 trunnion work.
SINUMERIK Work Offset Architecture
Siemens controls expose two parallel ranges of settable work offsets (parameterized zero offsets, sometimes abbreviated ENS in Siemens documentation):
| Range | Slots | Typical Use |
|---|---|---|
| Standard |
G54 – G57
|
Primary machining faces, four slots |
| Extended |
G505 – G599
|
Multi-face 5-axis work, tombstone fixtures, pallet cells |
Each slot stores translations in the geometry axes and rotations in the swivel axes, with G54 typically preloaded at machine power-up. The values are written to the control's settable-zero table (NV RAM) and are not volatile across M30 / Reset. Programmable frames layered on top of the active ENS deliver additive or absolute shifts without modifying the underlying table, which is critical for prove-out adjustments that should not corrupt persistent fixtures.
TRANS and ATRANS Programmable Frames
Siemens frame commands operate in the active workpiece coordinate system (WCS) and overlay the currently selected ENS. The two most relevant commands for entry-level 5-axis programmers are:
-
TRANS X… Y… Z…– Absolute translation of the WCS with respect to the active parameterized zero offset (G54–G57,G505–G599). Replaces all frame components of the previously activated programmable frame. -
ATRANS X… Y… Z…– Additive translation with respect to the zero point last set withTRANS. Useful for incremental compensation of stock variation or in-process gauging offsets without disturbing the base frame.
Per the SINUMERIK 840D sl / 828D Fundamentals documentation, TRANS must stand alone in its block. The syntax below shows a typical face-by-face machining pattern using a single subprogram:
N10 G1 G54 ; Working plane X/Y, settable zero G54
N20 G0 X0 Y0 Z2 ; Approach starting point
N30 TRANS X10 Y10 ; Absolute offset for face 1
N40 L10 ; Subprogram call (machining face 1)
N50 TRANS X50 Y10 ; Absolute offset for face 2 (replaces frame)
N60 L10 ; Subprogram call (machining face 2)
N70 M30 ; End of program
For a turning center repeating the same profile at multiple Z positions, ATRANS lets you add a step increment without re-issuing the full geometry:
N10 TRANS X0 Z150 ; Absolute Z reference
N15 L20 ; Subprogram call
N20 ATRANS Z-10 ; Additive -10 mm in Z
N25 L20 ; Subprogram call
N30 ATRANS Z-10 ; Another -10 mm additive
N35 L20 ; Subprogram call
TRANS resets all frame components of the previously activated programmable frame, including rotations. If you need to retain ROT/AROT from a prior block, use ATRANS for translations or re-issue the rotations in the same block.CYCLE800 Swivel Cycle for 3+2 Machining
CYCLE800 is the dedicated Siemens cycle for swiveling the active workpiece coordinate system or the tool plane around one or two rotary axes (typically the B-axis table tilt and C-axis rotation on a DMU 50). It performs:
- Selection of the swivel mode (plane, tool, axis-by-axis).
- Computation of the resulting linear-axis compensation vector so that the programmed contour remains stationary in space.
- Automatic retraction to a clearance plane before the rotary move.
- Optional retraction strategy (none, Z only, Z + X/Y, or along the tool axis).
A typical CYCLE800 call for rotating the table to A-90°, C0° on a trunnion machine uses the parameter mask with values that the OEM pre-configures during commissioning:
CYCLE800(0,"TABLE",200000,57,0,0,0,0,0,0,0,0,1,0,1)
The second argument selects the swivel data set (swivel head, swivel table, or swivel head + table). For the DMU 50 in table-swivel configuration, "TABLE" is the correct mode. Always reference the SINUMERIK Operate Programming Manual shipped with the specific controller version (828D PPU versions 4.5 SP2 and later, 840D sl NCU 731/732) for the parameter list of your build.
G10 Programmable Work Offset Setting
On Siemens controls, the equivalent of Fanuc G10 L20 for setting a settable work offset from inside the part program is achieved through G10 combined with the appropriate write syntax, or through the SETMS/frame-write commands. The Siemens-native approach for CAM-driven multi-face work is to write the offset values directly into the persistent table using:
$P_UIFR[1] = CTRANS(X, 12.345, Y, -4.567, Z, 0.0)
This sets G54 (index 1 in the $P_UIFR array) to the absolute values passed. CAM post-processors that have modeled the fixture assembly in the correct machine position can compute the per-face offsets once and write them into the program header, eliminating operator entry entirely. A proven workflow:
- Model the trunnion table, fixtures, and stock in the CAM assembly using the machine's documented COR coordinates (see Section on Center of Rotation Calibration).
- Create the tool planes for each face to be machined.
- Post-process with a flag that emits
$P_UIFR[n] = CTRANS(...)lines into the program header. - At run time, the program overwrites the table, then proceeds with
G54throughG59orG505+ selections without operator intervention.
| Method | Persistence | Best For |
|---|---|---|
$P_UIFR[n] = CTRANS(...) |
NV RAM (lasts across reset) | CAM-driven production runs with 50+ offsets |
TRANS / ATRANS |
Volatile (cleared at reset) | Prove-out, single-job adjustments, subprogram calls |
| Operator entry in Work Offset table | NV RAM | One-off parts, low-volume jobbing |
Single Offset vs Per-Face Offset Strategy
For a DMU 50 with one part per table, the choice reduces to a question of tolerance stack-up and operator visibility:
| Criterion | Single Offset (G55 + CYCLE800) | Per-Face Offsets (G505–G599 + $P_UIFR) |
|---|---|---|
| Setup time | Lower; one ENS to find | Higher; CAM must compute offsets |
| Fine adjustment per face | All faces move together | Independent compensation per face |
| In-process inspection readability | Display shows raw machine Z values (e.g. Z-23.769) | Display shows logical Z values (e.g. Z-2.000 from face origin) |
| Tolerance budget for ±0.05 mm features on different planes | Tight; depends entirely on COR and tool length accuracy | \>Relaxed; offsets absorb fixture and COR error |
| Thermal drift compensation | Use side-of-tool cutting to minimize Z thermal effect | Offsets can be re-set between ops via probe |
| CAM post complexity | Lower; standard 3+2 post | Higher; post must emit per-face frames |
Recommendation rule of thumb: Use a single offset when (a) all critical tolerances are referenced to a single face, (b) tool lengths are calibrated to better than 0.01 mm with a master tool, (c) COR is calibrated to better than 0.005 mm, and (d) part-to-part repeatability under pallet-change is acceptable. Switch to per-face offsets when any of these break down, or when operators need readable display values for prove-out.
Center of Rotation Calibration
The mechanical center of rotation of the trunnion is the single most important datum on a 5-axis machine. If COR is off by 0.02 mm in X, every face machined with the table rotated will inherit a sinusoidal position error proportional to the table rotation angle and the distance from the rotation pivot. Calibrate COR with the following procedure:
- Mount a precision test sphere or test bar in the spindle.
- Touch off the test feature in four table positions (C0, C90, C180, C270) at a fixed B angle.
- Compute the average X and Y of the four readings; this is the COR.
- Repeat for each B-axis index (0°, 90°, -90°) used in production.
- Enter COR offsets into the machine's kinematic data table (Siemens:
$NK_A_OFFfamily of machine data; OEM-set on DMU 50 but accessible via the service login).
If your machine was delivered with the full Siemens probing package (e.g. SINUMERIK 828D Measuring Cycles including CYCLE996 kinematic measurement), the COR measurement can be run automatically and the values written back to the kinematic table without manual entry. Reference the FANUC 5-axis probing walkthrough for a comparable methodology on Fanuc-controlled machines.
Tool Length Compensation Across Rotations
On a trunnion-style 5-axis machine where the table rotates and the spindle stays vertical, the tool length vector is fixed in machine coordinates. This means a single calibrated Z length works in every face, which is a major advantage of table-swivel configurations like the DMU 50. On head-swivel machines (horizontal-spindle attachments, knee mills with right-angle heads), the tool length vector rotates with the head, and:
- Effective
Zlength compensation changes with head azimuth. - Active plane (G17/G18/G19) must be re-selected after every swivel.
- Cutter compensation direction (G41/G42) may need to invert if the head passes through vertical.
- G2/G3 arc direction (CW vs CCW) reverses.
For table-swivel machines, the safe approach is to verify absolute tool lengths with a master tool on a calibrated tool setter, then check three things at the start of every prove-out:
- Tool length reads within 0.005 mm of the calibrated value at every tool number.
- COR is within 0.005 mm of the calibrated value.
- Grid shift is current (see Section on Grid Shift).
Grid Shift and Machine Squaring
Grid shift compensates for the slight angular error between the linear scale zero and the axis zero mark, plus any thermal growth of the machine structure. On a long-axis DMU 50 or similar travel machine, grid shift error can drift 0.05 mm to 0.25 mm over a 4 m travel if not re-zeroed after power-down. A weekly or per-shift verification procedure:
- Run the machine's grid-shift calibration program (typically cycles back to each axis home, reads the scale, and reports deviation).
- Compare deviation to the tolerance documented by the OEM (typically 0.0015 in / 0.04 mm on precision trunnion machines).
- If deviation is out of tolerance, adjust the corresponding machine data per the OEM's service documentation and re-run.
- Log the values in the maintenance record.
On machines with precision fixture stops (Schunk NSL400 or similar pallet clamps), grid shift calibration is doubly important because the fixture position is fixed by the stops and any grid shift error translates directly into part position error.
Verification and Prove-Out Procedure
The following prove-out cuts a single 50 × 100 × 100 mm aluminum test block and inspects the result against a known-good benchmark. Run it after every COR, grid shift, or tooling change:
- Face the top with a 12 mm end mill, G54 active, B0 C0. Verify Z reference within 0.005 mm of expected.
- Side-mill the 100 × 50 profile 25 mm deep at B0 C0. Measure with a 1-2-3 block on a granite plate.
- Rotate to B-90 C0. Face the block with the bottom of the same end mill (use the bottom-cut capability of the calibrated tool). Compare bottom face flatness and parallelism to top.
- Plunge a 19 mm bore 25 mm from the top surface at B0 C0. Measure centerline to top face – target 25.000 ± 0.025 mm.
- Rotate to each of B-90 C0, B-90 C90, B-90 C180, B-90 C270 and machine a step at the same nominal Z. Measure all four steps on the CMM.
- If steps disagree by more than 0.01 mm, re-run COR calibration at the affected B index.
Acceptable prove-out results on a DMU 50 with calibrated COR and tool lengths: ±0.013 mm (0.0005 in) on all face-to-face dimensions without per-face offset adjustment.
Operator Display and Readability
When per-face offsets are active, the position display on the SINUMERIK HMI shows the active WCS values, not the machine coordinates. This makes operator prove-out inspection dramatically easier because the displayed value matches the print dimension. When a single offset is used, the display shows the machine coordinate referenced to G54/G55, which requires the operator to mentally subtract the fixture offset. For job-shop environments with frequent operator-led prove-outs, per-face offsets materially reduce setup error rate.
Troubleshooting Matrix
| Symptom | Likely Root Cause | Corrective Action |
|---|---|---|
| All faces out by same amount in one axis | Single work offset error or COR X/Y error | Re-touch the part-zero or recalibrate COR |
| One face out, others in tolerance | Per-face offset wrong or tool length drifted at that face | Re-probe face, check tool length with master |
| Sinusoidal error vs C rotation angle | COR offset on the rotating axis | Run CYCLE996 or manual 4-position COR calibration |
| Step jump when B or C rotates | Grid shift out of tolerance or backlash | Run grid shift calibration, check trunnion bearing preload |
| Arc direction reversed on one face | G17/G18/G19 not re-selected after swivel | Add explicit G17 (or G18/G19) after CYCLE800 |
| Cutter compensation pushing wrong way | G41/G42 not swapped after head passes vertical | Use conditional logic on swivel angle to choose G41/G42 |
| Z reads correct at G54 but wrong at G55 | G55 never set, or active plane mismatch | Verify G55 table entry, ensure CYCLE800 returned to G17 |
Recommended Commissioning Sequence
- Power on, warm up the trunnion axes through a 15-minute rotary program.
- Run grid shift calibration; record values.
- Calibrate COR at each production B-index using a test sphere or probe.
- Calibrate a master tool on a calibrated tool setter; record the absolute length.
- Touch off the part fixture zero on the master pallet datum.
- Run the prove-out block; verify all faces within 0.013 mm.
- If per-face offsets are used, generate them in CAM and write to the controller with
$P_UIFRin the program header. - Lock the program and tool table against operator modification if the process warrants it.
Should I use one work offset or per-face offsets for 3+2 work on a DMU 50?
Use one offset (G54 or G55) when tool lengths and COR are calibrated to 0.005 mm and part tolerances are ≥ 0.05 mm. Use per-face offsets (G505–G599) when tolerances are tighter, when features on different faces must hold independent dimensions, or when operators need readable display values during prove-out. The per-face approach adds CAM post complexity but absorbs fixture and COR error.
What is the difference between TRANS and ATRANS on a SINUMERIK 828D?
TRANS X.. Y.. Z.. is an absolute translation of the WCS with respect to the active settable work offset (G54–G57, G505–G599) and replaces all frame components of the previously activated programmable frame. ATRANS X.. Y.. Z.. is additive to the last TRANS frame, so it is the correct command for stepping a subprogram by a fixed increment without re-issuing the full offset. Both must stand alone in their block.
How do I set a Siemens work offset from inside a part program?
Use the Siemens native form $P_UIFR[n] = CTRANS(X, value, Y, value, Z, value) where n is the offset index (1 = G54, 2 = G55, …, 6 = G59, 7+ = G505+). This writes the offset into the persistent table so it survives reset, similar in effect to a Fanuc G10 L20 Pn command. The post-processor should emit these lines in the program header so the program is self-contained.
How often should I recalibrate the center of rotation?
Recalibrate COR after any trunnion service, after a spindle replacement, after a collision, and as part of any annual preventive maintenance. For high-precision work, run a quick 4-position COR check weekly or per-shift on warm machines. A drift greater than 0.005 mm should trigger re-calibration and a check of trunnion bearing preload.
Why does my arc direction reverse after the table rotates on a head-swivel machine?
On head-swivel machines the spindle vector rotates with the head, so the active cutting plane (G17/G18/G19) and the arc direction (G2 CW vs G3 CCW) depend on the current head azimuth. After every CYCLE800 call, re-issue the correct plane selection and verify G41/G42 cutter compensation side, especially if the head passes through vertical where the compensation direction must invert.
What is the best way to compensate for thermal growth on a 5-axis trunnion machine?
Run a warm-up program that exercises both rotary axes through full travel and the linear axes through their typical production envelope before any precision cut. Cut with the side of the tool rather than the bottom wherever possible, since side-cutting is much less sensitive to Z-axis thermal growth. For tight tolerances, re-probe the part after a 15–30 minute thermal soak and re-write the per-face offsets via $P_UIFR.