SINUMERIK Transformations & 5-Axis
A kinematic transformation lets you program a multi-axis machine in a plain Cartesian frame — the tool tip, the end face, or the unwrapped cylinder surface — and hands the trigonometry to the control. The NC works out, in real time, what the rotary and linear machine axes must do to put the tool where the Cartesian program asked. On a SINUMERIK 840D sl (and its successor, SINUMERIK ONE) the main transformations are TRAORI (5-axis orientation), TRANSMIT (face/polar), TRACYL (cylinder surface), TRAANG (inclined axis), and TRACON (chained). Every one of them is a licensed option, and every one is set up by the machine builder in machine data before you can call it.
Why Transformations Exist
Without a transformation, a 5-axis program is machine-specific: the post-processor has to know your exact kinematics, and every tilt of the head drags the tool tip off the contour unless the code compensates for it. The 5-axis transformation removes that coupling. As the manual puts it, its task is “to compensate movements of the tool nose, which result from changes in orientation, by means of appropriate compensating movements of the geometry axes” — the orientation move is decoupled from the contour move. You program path and feed exactly as you would for a 3-axis tool and simply add the orientation. The result is that “the generated machining programs are therefore not machine specific. Kinematic-specific postprocessors are not used.”
The same idea drives the turning-center transformations. TRANSMIT lets you drill and mill features on the end face of a turned part in X/Y even though the machine only has a rotary (C) axis and a cross-slide. TRACYL lets you program a groove on the developed (unwrapped) surface of a cylinder, and the control wraps it back onto the rotary axis. In each case you write Cartesian coordinates and the transformation converts them into real machine-axis motion.
The Transformations at a Glance
All of these are part-program (or synchronized-action) commands. Selecting any transformation implicitly deselects the one that was active; TRAFOOF switches all of them off. A frame that was active before selection is generally deselected by the control (analogous to G500).
| Command | What it does | Typical use | Activate / deactivate |
|---|---|---|---|
TRAORI | 3- to 5-axis orientation transformation — tool-tip (TCP) programming with the tool oriented by two rotary axes | Sculptured-surface milling on swivel-head, rotary-table, or mixed 5-axis machines | TRAORI / TRAORI(n) → TRAFOOF |
TRANSMIT | End-face (polar) transformation — Cartesian X/Y machining on a turning center's face | Drill/mill holes and contours on the face of a turned part | TRANSMIT / TRANSMIT(n) → TRAFOOF |
TRACYL | Cylinder-surface transformation — mill grooves programmed on the unwrapped cylinder jacket | Wrap-milling grooves/cams on the periphery of a turned or milled cylinder | TRACYL(d) / TRACYL(d,n) → TRAFOOF |
TRAANG | Oblique-angle (inclined-axis) transformation — Cartesian WCS programming on a machine with a non-orthogonal infeed axis | Grinding machines with an inclined (angular) wheel axis | TRAANG / TRAANG(α) / TRAANG(,n) → TRAFOOF |
TRACON | Chained (concatenated) transformation — feeds the output of one transformation into the input of a second | e.g. TRAORI + TRAANG, or TRANSMIT + TRAANG on a grinder with a swivel/inclined head | TRACON(no,par…) → TRAFOOF |
Each transformation family is coded by a numeric transformation type the machine builder puts in MD24100 $MC_TRAFO_TYPE_<x>:
| Type | Transformation |
|---|---|
16–21 | 5-axis, machine type 1 (two-axis swivel head, orientable tool) — e.g. AB=16, BA=18, CA=20 |
32–35 | 5-axis, machine type 2 (two-axis rotary table, orientable workpiece) — e.g. AB=32, AC=33 |
48–51 | 5-axis, machine type 3 (single-axis swivel head + single-axis table, tool & workpiece orientable) — e.g. AB=48 |
18 / 20 | 3-axis and 4-axis orientation transformations (special cases of the general 5-axis transformation) |
256 / 257 | TRANSMIT with one rotary + one linear axis (256) / one rotary + two linear axes (257) |
512 / 513 / 514 | TRACYL without groove-wall offset / with groove-wall offset / programmable offset |
1024 | TRAANG oblique-angle transformation |
8192 | Chained transformation (TRACON) |
A channel can hold several transformation data sets (up to four 5-axis transformations, and no more than two each of TRANSMIT / TRACYL / TRAANG / chained). The trailing number in a call — TRAORI(2), TRANSMIT(2), TRACYL(40.,2) — picks the data set.
TRAORI: 5-Axis Orientation & Machine Types
The “5-Axis Transformation” package handles an axially symmetric tool (milling cutter, laser) that can be oriented in any direction relative to the workpiece. Three machine configurations are supported, and the builder tells the control which one it is via the transformation type:
| Machine type | Kinematics | Orients |
|---|---|---|
| Type 1 | Two-axis swivel/rotary head (e.g. axis arrangement CA) | The tool |
| Type 2 | Two-axis rotary table (e.g. AC) | The workpiece |
| Type 3 | Single-axis swivel head + single-axis rotary table (e.g. BC) | Tool and workpiece |
Common to all three: the three linear axes form a right-handed Cartesian system, the rotary axes are mutually perpendicular and parallel to the linear axes, and the tool's initial state points in −Z. Special cases — 3-/4-axis transformations, a swivelling linear axis, and the universal (cardan) milling head where the two rotary axes are at a fixed non-90° angle — are all built on the general 5-axis transformation. For machines whose rotary axes are not exactly perpendicular or parallel, the generic 5-axis transformation gives better accuracy and lets the basic tool orientation be programmed freely rather than fixed in machine data.
Tool length compensation is included in the transformation, so a retraction perpendicular to the workpiece surface stays correct as orientation changes. The orientation relative to the workpiece surface is held in a separate frame, which is what makes TOFRAME/TOROT retraction work.
Programming Tool Orientation Under TRAORI
Once a transformation is active, you program orientation in one of four mutually exclusive ways (mixing them raises alarm 14130/14131). CAD/CAM normally emits one of these; the choice is the postprocessor's job.
| Method | Addresses | Meaning |
|---|---|---|
| Rotary-axis positions | A B C | Direct machine-axis angles — orientation change occurs in the basic/machine frame; axes traverse as synchronized axes |
| Euler / RPY angles | A2= B2= C2= | Indirect orientation by angle; interpretation set by G-group 50 (see below) |
| Direction vector | A3= B3= C3= | Vector components in the WCS pointing from the tool tip toward the tool adapter; length is irrelevant, unprogrammed components are zero |
| Surface normal (face milling) | A4/B4/C4, A5/B5/C5 | Surface-normal vector at block start and end — the control interpolates the orientation by large-circle interpolation |
| Lead & tilt | LEAD= TILT= | Orientation from path tangent + surface normal: LEAD is the angle in the plane of tangent and normal; TILT is the angle in the plane perpendicular to the tangent |
Reference system — ORIWKS vs. ORIMKS (G-group 25). When orientation is given by vector or angle, the path of the rotary motion is set by these two:
| Command | Reference | Behavior |
|---|---|---|
ORIWKS | Workpiece coordinate system (default) | Motion is kinematics-independent — with a fixed tool tip the tool swivels in the plane spanned by the start and end vectors (large-circle interpolation). Use this when it isn't yet known which machine will run the program. |
ORIMKS | Basic/machine coordinate system | Motion depends on the machine kinematics — linear interpolation between rotary-axis positions. Use it to program actual machine moves (e.g. to dodge a collision). |
Interpolation type — ORIAXES vs. ORIVECT (G-group 51). ORIAXES interpolates the orientation (or machine) axes linearly; ORIVECT swivels the orientation vector on the great circle between the start and end vectors, always on the shortest path. Related keywords for tapered and two-point orientation paths: ORIPLANE, ORICONCW/ORICONCCW/ORICONTO/ORICONIO, and ORICURVE. The angle convention is chosen in G-group 50: ORIEULER (Euler, rotation sequence ZX'Z''), ORIRPY (RPY, XY'Z''), ORIRPY2 (ZY'X''), and ORIVIRT1/ORIVIRT2 (virtual orientation axes with a builder-defined rotation order).
Polynomials & the third degree of freedom. LEAD and TILT can be run as up to 5th-degree polynomials via PO[PHI]=(…) (lead) and PO[PSI]=(…) (tilt). A tool that can also rotate about its own axis (6-axis kinematics) is handled with the rotation angle THETA and the rotation modes ORIROTA/ORIROTR/ORIROTT/ORIROTC.
Orientation behavior at corners & smoothing. At an outside corner, ORIC runs the orientation change in parallel with the path move (the inserted corner block is shared out among the intermediate orientation blocks by absolute angle change), while ORID runs the orientation change and path move consecutively. Orientation smoothing lives in G-group 34: OSOF (off), OSC (constant), OSS/OSSE (smooth at block start / start & end), and OSD/OST (smooth by distance SD42674 / by angular tolerance SD42676).
TCP Behavior, Tool Length & the Swivel Plane (CYCLE800)
TRAORI is Siemens' tool-center-point (TCP / “RTCP”-style) transformation: with it active, the programmed X/Y/Z is the tool tip in the workpiece frame, and the active tool length is carried through the transformation so the tip stays on the contour as the head or table swivels. The online tool length offset $AA_TOFF[ ] overlays the effective tool length in 3D at runtime; when orientation changes, that offset is rotated with the tool axes so the pivot point stays at the corrected tip.
Frames and transformations interact deliberately. The workpiece is always programmed in a rectangular WCS; programmed or settable frames rotate and shift that system, and the transformation then converts the result into machine-axis motion. After orienting the tool you can freeze the current orientation into a frame with TOFRAME (or TOROT/PAROT), which is how a vertical retract in tool direction is programmed.
CYCLE800 — swivel plane / swivel tool / align tool is the higher-level way most shop programs tilt a plane. It computes the swivel frames (retraction, plane rotation via _A/_B/_C, and re-approach) that put the machining plane where you want it, using the same kinematic data the transformation uses. Crucially, the HUNDREDS digit of CYCLE800's status parameter selects whether the cycle tracks the tool tip — i.e. holds the tip in place while swiveling by turning on TRAORI (1 = track tip / TRAORI, 0 = do not track). So “swivel the plane” (CYCLE800) and “keep the tip on the contour” (TRAORI) are two faces of the same kinematic setup. The rotary-axis vectors CYCLE800 and TRAORI rely on can be measured on the machine with probing cycle CYCLE996 — see the measuring-cycles reference.
Worked Example — TRAORI 5-Axis Orientation
From the manual's own 5-axis example (kinematics: 1st rotary axis parallel to Z, 2nd parallel to X, moved tool). It shows the same points reached three ways — by direction vector under ORIWKS, by Euler angle under ORIMKS, and by direct rotary-axis programming — then a TOFRAME retract:
N100 G1 X1 Y0 Z0 A0 B0 F20000 G90 G64 T1 D1 G17 ADIS=.5 ADISPOS=3
N110 TRAORI(1) ; activate 5-axis transformation (data set 1)
N120 ORIWKS ; orientation referred to the workpiece
N140 A3=0 B3=0 C3=1 X0 ; orientation by direction vector: tool along +Z
N150 A3=0 B3=-1 C3=0
N160 A3=1 B3=0 C3=0
N170 A3=1 B3=0 C3=1
N180 A3=0 B3=1 C3=0
N190 A3=0 B3=0 C3=1
N200 ORIMKS ; switch reference to the machine
N210 G1 G90
N220 A2=0 B2=0 X0 ; same orientations by Euler angle
N230 A2=0 B2=90
N240 A2=90 B2=90
N250 A2=90 B2=45
N300 A0 B0 X0 ; direct rotary-axis programming
N310 A45
N320 B30
N400 G0 A90 B90 X0 G90
N410 TOFRAME ; build a frame from the current tool orientation
N420 Z5
N440 G0 A0 B0 X1 Y0 Z0 G90
N500 TRAFOOF M30 ; deactivate transformation, end program
Worked Example — TRACYL Cylinder Groove
A part program for TRACYL 513 (with groove-side offset) follows a fixed shape: select tool → select TRACYL → set a frame → position → program OFFN (half the groove width) → switch on TRC → cut the groove centre line → switch off TRC → retract → TRAFOOF. With TRACYL 513 the tool radius compensation refers to the programmed groove centre, not the wall, so OFFN supplies half the groove width and should be at least the tool radius. This manual example wraps a groove onto a cylinder on an X-Y-Z-A-C machine, using CYCLE800 to swivel the A axis into position first:
N10 WORKPIECE(,"",,"CYLINDER",0,0,-180,-80,179) ; blank for simulation
N20 M3 S2000
N30 T="NUTFRAESER" M6 D1
N40 G0 G54 X0 Y-20 Z105
N50 CYCLE800(0,"TABLE",100000,57,0,0,0,-90,0,0,0,0,0,-1,100,1) ; swivel A axis
N60 G17 G90
N70 G0 Y-10 Z100 G40
N80 TRACYL(179, 2) ; cylinder transf., data set 2, working dia 179 mm
N90 OFFN=20 ; half the groove width
N100 G1 F500 X0 Z75 G42 ; approach + select TRC (right of centre line)
N110 Y30 ; groove centre-line contour
N120 X-60
N130 X0
N140 Y-10
N150 Z105 G40 ; retract + deselect TRC
N160 TRAFOOF ; deactivate transformation
N170 G0 X0 Y-20 Z115
N180 M5
N190 CYCLE800(0,"TABLE",100000,57,0,0,0,0,0,0,0,0,0,-1,100,1) ; swivel back
N200 M30
And a TRANSMIT face-milling fragment for contrast — note Cartesian X/Y programming with frames (ROT, ATRANS) once the spindle is switched to a position-controlled rotary axis with SPOS:
N10 T1 D1 G54 G17 G90 F5000 G94
N20 G0 X20 Z10 SPOS=45 ; position-control the spindle before selection
N30 TRANSMIT ; activate face transformation (data set 1)
N40 ROT RPL=-45 ; frame: rotation in the X/Y plane
N50 ATRANS X-2 Y10 ; frame: additive shift
N60 G1 X10 Y-10 G41 OFFN=1 ; Cartesian face contour, TRC on, 1 mm allowance
N70 X-10
...
N200 TRANS ; cancel programmable frame
N210 TRAFOOF ; TRANSMIT off
N230 M30
Gotchas
- Options are required. The 5-axis transformation package, the “TRANSMIT and peripheral surface transformation” option (covers both TRANSMIT and TRACYL), and TRAANG (separate licenses for fixed vs. programmable angle) are all licensed. Online tool length offset is a further option. Calling a transformation that isn't licensed simply won't work.
- The kinematic data set belongs to the machine builder. Transformations only behave correctly because the builder has parameterized the machine data —
$MC_TRAFO_TYPE_<x>,$MC_TRAFO_AXES_IN_<x>,$MC_TRAFO5_BASE_TOOL,$MC_TRAFO5_TOOL_VECTOR, the$MC_TRANSMIT_…/$MC_TRACYL_…/$MC_TRAANG_ANGLEsets, and (on newer kinematic-chain setups, K12) the$NT_…chain variables. Don't hand-edit these; a wrong sign or offset here silently ruins every transformed program. - Program in the right frame. With
ORIWKS(the default) orientation is workpiece-relative and portable between machines; withORIMKSit is machine-relative. If you don't know which machine will run a 5-axis program, the manual says to leave it onORIWKS. Confusing the two changes what the machine physically does. - Cancel one transformation before changing conditions. Deselect the active transformation with
TRAFOOF(or by selecting another) before switching geometry axes, changing tools where the manual requires TRC off, or returning to normal machining. With TRACYL, resetOFFN=0afterTRAFOOF— OFFN acts differently under TRACYL than without it. Selecting TRACYL deselects the prior frame and any working-area limit; tool radius compensation must be off before selecting/deselecting. - Poles and singularities. TRANSMIT has a pole at the turning centre where tiny Cartesian moves demand huge rotary-axis moves; TRAORI has singular orientations (e.g. tool parallel to the first rotary axis) where the same thing happens. The control drops feed hard near these; the pole-handling strategy (
$MC_TRANSMIT_POLE_SIDE_FIX) and the singularity limits ($MC_TRAFO5_POLE_LIMIT,$MC_TRAFO5_NON_POLE_LIMIT) are builder settings, not something you fix in the part program.
References
- Siemens, SINUMERIK 840D sl Transformations Function Manual, 06/2019, A5E47435470B AA.
- Siemens, SINUMERIK 840D sl / 828D NC Programming Programming Manual (Fundamentals / Work preparation), 06/2019, A5E47432823B AA.
Have a question or want to contribute?
Contact us with corrections, additions, or topics you'd like covered.
Get in Touch