Siemens 840D: Calculating 3D Probe Slope Compensation

David Krause2 min read
Motion ControlSiemensTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

To make a Siemens 840D inspection position reusable, parameterize the nominal diameter, axial height, slope angle, and probe-ball radius. First confirm the angle reference, X-axis diameter mode, and active tool compensation; otherwise, a mathematically valid offset can still move the probe to the wrong point.

Separate Known Values from Required Machine Conventions

Item Available information Engineering decision
Control Siemens 840D Use R parameters and trigonometric calculations.
Probe ball Radius 2 mm Determine whether the D offset already compensates this radius.
Inspection point Diameter 637.00 at a height of 12 mm Confirm whether 637.00 represents the part surface or probe-center coordinate.
Slope 30 degrees; diameter increases downward Confirm whether the angle is measured from the X direction, Z direction, or another datum.
X coordinate Programmed as a diameter in the supplied motion Verify that the active machine configuration uses diameter programming.

Audit the Proposed Diameter Correction

The proposed target changes X from 637.00 to 637.536, so the diameter correction is 0.536 mm. With ball radius r = 2 mm and angle A = 30 degrees, this agrees, after rounding, with 2r × (1 − cos A): 2 × 2 × (1 − cos 30°) = 0.5359 mm. The resulting target is therefore 637.00 + 0.5359 = 637.5359 mm, rounded to 637.536 mm.

This result is valid only if the machine's angle convention and existing D-radius compensation match that expression. If the probe center must instead be displaced normal to the slope, resolve the ball radius into X and Z components using sine and cosine under the confirmed axis convention. Do not silently apply both the D offset and a full manual ball-radius correction.

Build the Adaptable R-Parameter Calculation

  1. Assign R parameters to the theoretical diameter, inspection height, slope angle, and ball radius. The supplied example identifies R12 as a possible parameter; choose the remaining parameters according to the machine program's existing allocation.
  2. Calculate the corrected diameter from those parameters. Under the convention that reproduces the submitted result, use X target = theoretical diameter + 2 × ball radius × (1 − cos(angle)).
  3. Program the axial target as the negative inspection height when that sign matches the established work coordinate system.
  4. Move to the calculated X and Z position, then use the existing M0 and MSG("controle") inspection stop.

For the stated values, the motion equivalent is G0 X637.536 Z-12, followed by the inspection stop. When the diameter, height, or angle changes, update only their assigned R parameters.

Verify the Geometry Before Contact

Test the parameterized result against a known inspection point. Confirm the calculated X value, the Z sign, and whether X displays diameter or radius. Then compare the actual ball contact location with the intended surface point. If the error changes when D compensation is enabled, isolate the manual geometric correction from the tool-radius correction and retain only the combination that produces the intended probe-center path.

FAQ

Why does the 30-degree probe correction produce X637.536?

Under the stated compensation convention, the diameter correction is 2 × 2 × (1 − cos 30°) = 0.5359 mm. Adding it to 637.00 gives 637.5359, rounded to 637.536.

Can Siemens 840D calculate the probe position from R parameters?

Yes. Store the diameter, height, angle, and 2 mm ball radius in R parameters, then calculate the target with sine, cosine, or tangent as required by the verified geometry.

Should the D offset and calculated ball correction both be active?

Only if the calculation was derived with that D compensation active. Otherwise, applying both can compensate the 2 mm ball radius twice; verify the displayed target and contact point with each compensation state.

Back to blog