5-AXIS CALCULATORS5-axis calculations

Small calculations for checking a 5-axis program. Everything is calculated in your browser; the values you enter are not sent anywhere.

F value for G93 inverse time feed

F for G9310.0001/min
Time to finish the move6.00sec

F_inv = 1 / T = F_mm / L (T: minutes)[3][1][2]

While G93 is active, write F in every cutting block (the previous F is not carried over). Example from NIST and Siemens: F2 finishes the move in 0.5 min.

Ball end mill tilt angle (angle that keeps the tool center out of the cut)

Tilt more than this25.84deg

θ = arccos(1 − ap / R)[4]

Cutting with the tool center, where the surface speed is almost 0, crushes the material rather than cutting it and tends to leave scratches. In KISTEC's experiment (R3, ap0.3), the tool center engaged at 15° and did not touch at 30° or more (formula value 25.8°). However, in the same experiment surface roughness Rz was smaller without tilting, so decide by whether you put more weight on visual gloss or on roughness. The formula works when the depth of cut ap is no more than the ball radius R (above R it shows "—").

Angles from the tool direction vector

Tilt angle (from the Z axis)54.73561deg
Swivel angle (from the X axis)45.00000deg
Angle from the XY plane35.26deg

Tilt angle = arccos( K / √(I² + J² + K²) ), swivel angle = atan2( J, I )[5]

The vector points from the tool tip toward the tool holder; its length doesn't matter. Siemens example: (1, 1, 1) → tilt 54.73561°, swivel 45°. The actual rotary axis angles (A, B, C) depend on the machine configuration, and there may be two solutions.

How a rotary axis turns (shortest direction and reducing the displayed value)

Rotation in the shortest direction+20.000deg
Rotation if moved as is-340.000deg
Displayed value reduced to under 360°350.000deg

Δ = ((target − current + 180) mod 360) − 180 Reduced value = displayed value mod 360[6]

On a rotary axis that counts beyond 360°, 350° → 10° can take the long way around, −340°. Some controls have a function that turns the shortest way (such as Heidenhain M126) or one that reduces the displayed value before moving (M94 on the same control). If you command 180° while the displayed value is 538°, the axis turns −358°.

How much a center-of-rotation offset shows up on the workpiece (calibration; tool length in RTCP)

Offset in X, ΔX20.00µm
Offset in Y, ΔY0.00µm
Offset magnitude |Δ|20.00µm
When turned 180°20.00µm

ΔX = ex(1 − cosθ) + ey·sinθ, ΔY = −ex·sinθ + ey(1 − cosθ), |Δ| = 2·√(ex² + ey²)·sin(θ/2)[7][8][9]

  • ex, ey: center offset at height h (µm). ex = δx + h·β/1000, ey = δy − h·α/1000
  • δx, δy: offset of the center of rotation in X and Y (µm; E_X0C and E_Y0C for the C axis)
  • α, β: tilt of the rotary axis about the X and Y axes (µrad; E_A0C and E_B0C for the C axis)
  • h: height from the center of rotation (table surface) (mm)
  • θ: angle the rotary axis is turned (deg)

Rule of thumb for tilt: 10 µrad = 0.01 mm/m ≈ 2″. At height h, a tilt acts the same as a center offset of h × tilt. The sign (which way it shifts) depends on how the machine coordinate system is defined, so look mainly at the magnitude. Error motions of the rotary axis and errors of the linear axes are not included.

Reading it backwards: if the step between opposing faces cut at 0° and 180° is 20 µm, the center offset is about 10 µm.

Check examples: δx = 10 µm with θ = 30°, 90°, 180° → 5.18, 14.14, 20.00 µm. δx = δy = 5 µm, θ = 180° → ΔX = ΔY = 10 µm, |Δ| = 14.14 µm (the same size as in a research example where turning the C axis from 0° to 180° shifted the part by about 10 µm in both X and Y). Tilt β = 10 µrad, h = 200 mm, θ = 180° → 4.00 µm.

For the concept and diagrams, see Rotary axis location errors and RTCP accuracy.

How far the C axis turns near a singularity

Magnification 1/sin d57.30times
Speed required of the C axis573deg/s
Total C rotation while passing through ±T126.9deg

C speed = ω / sin d; total C rotation while passing through the interval ±T ≈ 180° − 2·atan(d / T)[12][13][14]

A singularity is an orientation in which the tool axis is parallel to a rotary axis centerline (with a B/C head, B = 0° with the tool pointing straight down). If the path passes directly over it, C would have to flip 180° instantly; if the speed and acceleration limits cannot keep up, the path distorts or the feed drops. Actual behavior depends on the NC's interpolation and singularity handling.

Check examples: d = 5° → 11.5 times, 1° → 57.3 times, 0.1° → 573 times. d = 0.5°, T = 2° → about 152°. Real example (ICAM's explanation): while A moved by less than 2° (0.827° → −0.001° → 1.043°), C turned about 180° (−0.075° → −90° → −179.72°).

For how to avoid it, and diagrams, see Common 5-axis mistakes (singularities).

5-Axis Machining Calculators FAQ

How is the G93 inverse-time feed rate F calculated?
F (1/min) = desired tool-tip feed rate Vf (mm/min) ÷ tool-tip path length L (mm) for that block. Because F is the reciprocal of the block execution time in minutes (F = 1/T), an F word must be programmed on every block during G93 mode.
What tilt angle prevents cutting with the zero-speed center of a ball end mill?
Tilt the tool by more than θ = arccos(1 − ap / R), where R is the ball radius and ap is the axial depth of cut. For R = 3 mm and ap = 0.3 mm, arccos(0.9) ≈ 25.84°; in shop practice a 15°–30° lead or tilt angle is commonly used.
If the C-axis pivot center is off by 10 µm, how much step error appears between 0° and 180°?
Rotating the table 180° doubles the pivot offset error on the workpiece: a 10 µm center offset produces a 20 µm step between faces machined at 0° and 180°. Measuring that step and halving it gives the pivot offset.

Other 5-axis machining pages

Sources

  1. National Institute of Standards and Technology (NIST), “The NIST RS274NGC Interpreter – Version 3 (NISTIR 6556, 2000)”
  2. Siemens AG, “SINUMERIK 840D sl/828D Fraisage ISO, Manuel de programmation 02/2012 (6FC5398-7BP40-3DA0, French edition)”
  3. Haas Automation, Inc., “G93 Inverse Time Feed Mode (G-code reference page)”
  4. Kanagawa Institute of Industrial Science and Technology (KISTEC), Tomohiro Yokota, “A Study of Machined Surface Quality in Ball End Milling,” KISTEC Research Report 2020
  5. Siemens AG, “Milling with SINUMERIK — 5-axis machining Manual, Edition 05/2009 (DocOrderNo. 6FC5095-0AB10-0BP1)”
  6. DR. JOHANNES HEIDENHAIN GmbH, “TNC 640 User's Manual Conversational Programming, NC Software 340590-01 / 340591-01 / 340594-01, 4/2012 (892903-20)”
  7. Japan Society for Precision Engineering (S. Ibaraki), “Measurement and Compensation of Motion Errors of Five-Axis Machine Tools (review)”, Journal of the Japan Society for Precision Engineering 78(9) (2012) (in Japanese)
  8. Fuji Technology Press (S. Ibaraki, Y. Ota), “Error Calibration for Five-Axis Machine Tools by On-the-Machine Measurement Using a Touch-Trigger Probe, Int. J. of Automation Technology 8(1) (2014)”
  9. Elsevier (S. Ibaraki et al., Hiroshima University repository), “A machining test to evaluate thermal influence on the kinematics of a five-axis machine tool, Int. J. Machine Tools and Manufacture 163, 103702 (2021)”
  10. Renishaw plc, "Application note: ISO 10791-6 using QC20 ballbar"
  11. FIDIA S.p.A., “Functions for 5-axis machine tools (RTCP)”
  12. HAL (archives ouvertes), “Kinematical smoothing of rotary axis near singularity point”
  13. University of Bath (R.J. Cripps et al.), “Singularities in five-axis machining: cause, effect and avoidance, Int. J. Machine Tools and Manufacture 116 (2017) (abstract)”
  14. ICAM Technologies, “How to eliminate unnecessary rotary moves due to singularity (2014)”