SINUMERIK 840C: Resolving Reversed G2/G3, G41/G42, and G96

David Krause14 min read
Other TopicSiemensTroubleshooting
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

1. Problem Overview

A lathe equipped with a SINUMERIK 840C controller exhibits three coupled symptoms when running any program that uses standard turning preparatory functions:

  • G2 (clockwise circular interpolation) traces a counterclockwise arc.
  • G3 (counterclockwise circular interpolation) traces a clockwise arc.
  • G41 / G42 (cutter radius compensation, left/right of programmed contour) selects the wrong side of the path.
  • G96 (constant cutting speed, CSS) drops spindle RPM as the tool approaches the spindle axis and accelerates it as the tool moves away — the opposite of the intended behavior.

The defects are not random. They all share one common geometric origin: the X axis is sign-inverted with respect to the standard SINUMERIK turning convention. On a correctly commissioned 840C turning configuration, X+ is defined as a radial move away from the turning centerline. When a lathe is built with the tool post mounted in front of the spindle center (the operator-facing side of the Z axis) and the X axis motor polarity is left in its factory default, every X move that the operator intends as outward actually moves inward and vice versa.

This article isolates each of the four symptoms to that single root cause, then walks through the field-proven repair procedures documented in the official SINUMERIK 840C Programming Guide (PDF, software versions 2–6).

2. Root Cause: Tool Post Geometry and X-Axis Sign Convention

SINUMERIK defines the X axis on a turning control so that positive X = away from the spindle axis and negative X = toward the spindle axis. Diameter programming (G23 default on most turning configurations) doubles the radial value: programming X100. positions the tool at a 100 mm diameter workpiece.

Two physical tool post arrangements exist on production lathes:

Arrangement Tool position X+ direction Matches 840C default?
Rear-mounted (rear tool post) Behind the turning centerline, opposite the operator Radial outward, away from operator Yes — no compensation needed
Front-mounted (front tool post) In front of the turning centerline, facing the operator Radial outward, but toward operator No — X sign is inverted versus controller default

If the X axis is driven from the default polarity and the post sits in front of the centerline, the control's notion of "X increasing" corresponds to a physical motion toward the centerline. All commands that depend on the sign of X — circular direction, cutter side selection, and CSS diameter calculation — therefore produce the mirrored behaviors described in section 1.

3. Why Each Reversed Symptom Appears

3.1 G2 / G3 reversal

Circular interpolation direction is evaluated by the controller in the active plane. In the standard G18 (ZX) plane, the controller applies the right-hand rule using the programmed X and Z vectors. When X is sign-inverted, the cross-product used to determine the rotational sense flips, so the geometry traced for G2 matches the geometry the standard would assign to G3. No G-code parameter exists to swap G2/G3 globally; the proper fix is to restore the X-axis direction.

3.2 G41 / G42 reversal

Cutter radius compensation (TRC) on a turning control offsets the programmed contour normal by the active tool radius. The "left" side of the path is determined by the direction of tool travel along the contour and the orientation of the tool tip. With a sign-inverted X axis, the controller computes the contour normal pointing to the wrong side, so G41 activates compensation as if it were G42 and vice versa. The tool tip orientation table referenced in the 840C programming guide (positive X facing radially outward) is also inverted, so any change to the tool nose compensation without fixing X will produce the same mirror effect.

3.3 G96 CSS reversal

Constant cutting speed follows the equation:

n [rpm] = (Vc × 1000) / (π × D)

where Vc is the programmed cutting speed in m/min and D is the current workpiece diameter in mm. As the tool moves toward smaller diameters, RPM should rise proportionally. On a front-mounted tool with inverted X, the controller computes D from the programmed X value rather than the physical radius. Because X+ now corresponds to motion toward the centerline, an inward physical motion is read by the control as a diameter increase, so RPM is commanded downward — exactly the wrong direction. The LIMS parameter (CSS upper RPM clamp) is unaffected; the direction of the relationship between X motion and commanded RPM is inverted.

4. Confirming the Diagnosis on an 840C

Before touching any machine data, perform the four checks below to confirm the tool-post geometry is the actual cause.

  1. Visual confirmation: Stand at the operator position and look at the tool post. If the cutting edge faces you and the slide is on the operator side of the turning centerline, the tool is front-mounted.
  2. X-axis polarity test (manual mode): In JOG, command X+10.0 from a safe starting diameter and watch whether the carriage moves away from the spindle axis (expected on a rear post) or toward it (front post with default polarity).
  3. G2/G3 trace test: Run the diagnostic block below in AUTO with the spindle stopped and a marker on a sacrificial workpiece. Use a low feedrate and dry-run (DRY) where available:
    G0 X100. Z2.
    G1 Z0 F200
    G2 X120. Z-10. I10. K0
    G1 X130.
    M30
    If the tool sweeps a clockwise arc when commanded as G2, the geometry is mirrored.
  4. G96 sanity check: With a stationary spindle and CSS active (G96 S200 LIMS=3000), read the spindle RPM commanded by the controller at two distinct X positions. At a larger X, the commanded RPM should be lower than at a smaller X. The opposite trend confirms inverted X.

If all four checks agree with the symptoms, the diagnosis is confirmed and the repair options in section 5 can be applied.

5. Repair Options

Three field-proven solutions exist. Choose one — never combine them, or you will double-invert the result.

5.1 Option A — Reverse the X-axis motor polarity (hardware)

This is the cleanest, most maintainable solution. Reverse any two phases on the X-axis servo motor (or swap the tach/encoder feedback direction at the drive if the drive is analog) and re-run the 840C reference-point procedure. The controller then sees the physical motion in the expected sense without any software compensation. Confirm after the swap that the reference-point dog and hardware limit switches still engage in the correct order; reversed motor polarity can also invert their effective direction.

Safety: Lock out and tag out the main disconnect before touching servo wiring. After re-energizing, run the controlled-axis check at 5 % rapid override in JOG before resuming full speed.

5.2 Option B — Reverse the X axis via 840C machine data (software)

SINUMERIK 840C exposes axis-direction reversal through axis-specific machine data in the axis configuration area. The exact MD number depends on the software version (2, 3, 4, 5, or 6) and on whether the axis is configured as a linear or rotary axis, so always consult the parameter listing that corresponds to your installed SW version in the official SINUMERIK 840C Programming Guide. In general:

  • Enter the appropriate password to access the machine data area (the 840C uses password classes; the MD in question is normally in the user or manufacturer class).
  • Locate the direction-of-travel bit for the X axis (commonly a "sign inversion" or "direction reversal" flag grouped with the axis-specific data).
  • Toggle the bit from its current state to the opposite state.
  • Save (the 840C typically uses INPUT or a dedicated save key sequence) and power-cycle so the new MD is read by the NC kernel.
  • Re-run the reference-point approach for X.

This option is preferred when reversing the motor would require re-laying encoder cables, disturbing the spindle-side hardware limit switch wiring, or invalidating a vendor acceptance test report.

5.3 Option C — Mirror / coordinate-system inversion (programmatic)

When neither hardware nor machine data can be changed (legacy machine under contract, locked controller, customer restriction), the X-axis direction can be inverted inside the part program itself using mirroring or a coordinate-system transformation. On the 840C, this typically takes the form of a settable frame or an AMIRROR/MIRROR style command applied at program start. The technique works for the geometry but introduces two caveats:

  • The mirrored X must be applied consistently across every program and every subprogram on the machine, including any probing routines, hand-written macros, and canned cycles. A single missed program will reintroduce the original defect.
  • Some 840C canned cycles (for example deep-hole drilling CYCLE83 equivalents, threading cycles, and certain grooving cycles) read X from the absolute coordinate and may not honor the active mirror in the same way as G0/G1/G2/G3. Each cycle must be verified on the machine before relying on the mirror.

Use Option C only when A and B are not available. It is a workaround, not a commissioning fix.

6. Restoring Correct G96 Constant Cutting Speed

Once the X-axis direction is restored to the standard convention, validate G96 with the procedure below.

  1. Set a conservative CSS limit so the spindle never overruns during the test: G96 S180 LIMS=1500.
  2. Use a sacrificial workpiece or a fully stopped spindle with a known diameter.
  3. From AUTO, command a sequence that traverses from a small diameter to a large diameter (for example X40.X120.) and record the spindle RPM at each waypoint.
  4. Expected behavior: at X40., the controller commands ~1430 rpm; at X80., ~715 rpm; at X120., ~477 rpm. The ratio matches 1/D.
  5. If the RPM is observed to increase with increasing diameter, the X axis is still inverted and section 5 must be repeated.
  6. Verify the LIMS clamp: with G96 S180 LIMS=1500 at X10., the controller should clamp the computed ~5730 rpm down to the 1500 rpm ceiling. Failure of LIMS indicates the LIMS MD is incorrectly set or has been overwritten.

For complete CSS reference (CSS command syntax, LIMS, spindle selection with G97, behavior during thread cutting, and CSS interactions with SETMS) consult the "Spindle" section of the SINUMERIK 840C Programming Guide.

7. Verification Procedure

After applying Option A, B, or C, run the full acceptance test sequence below before returning the machine to production.

  1. Reference-point approach: All axes must reference without faults. Reverse polarity flips hardware limit switch engagement; verify the + and – limit LEDs indicate the correct direction.
  2. X polarity test: In JOG, X+10. must move the carriage away from the spindle axis on a rear post (or toward the operator on a front post). Record the relationship in the machine log.
  3. G2/G3 trace: Re-run the diagnostic block from section 4. G2 must trace clockwise as viewed from the standard turning viewpoint (operator at the spindle side, looking down the Z axis).
  4. G41/G42 trace: Program a known rectangular pocket (or open profile on the turning centerline) and verify that G41 offsets the tool to the left of the programmed direction of travel. A simple visual check using a marker on scrap is sufficient.
  5. G96 RPM trend: Confirm RPM rises as X decreases, with the expected 1/D relationship.
  6. Threading sanity: Run a single-pass threading cycle on a sacrificial workpiece. Threading reads the spindle encoder synchronously with the X/Z interpolation, and any remaining sign error will produce an immediate thread lead error that is easy to detect.
  7. Canned cycle audit: Run each canned cycle used in production at least once on scrap. Confirm drill, tap, bore, and grooving cycles all return the tool to the expected X position.

8. Common Pitfalls and Field Notes

  • Tool nose radius compensation tables. On the 840C, the tool tip direction (1–9) is interpreted in the active coordinate system. A correctly commissioned X axis is a prerequisite for any tip-orientation change to take effect in the expected direction. After reversing X, walk through the active tool table and re-verify the orientation codes.
  • Existing part programs. Programs written against the inverted-X machine will produce wrong parts once X is fixed. Inventory all production programs before changing the axis, and update each to match the corrected convention. Use Option C only as a stopgap while the program library is rebuilt.
  • Measuring system swap. If the X axis is equipped with both an indirect measuring system (motor encoder) and a direct measuring system (linear glass or magnetic scale), the direction reversal MD must be applied consistently. Reversing only one side will create a following-error at speed.
  • LIMS vs CSS direction. LIMS is the upper spindle speed clamp. It does not invert with X. If the spindle is hitting the LIMS value at large diameters, raise the clamp or reduce S in the CSS block — do not "compensate" by changing the X polarity back.
  • Spindle direction commands. M3 / M4 (spindle CW/CCW) are independent of the X-axis sign and must not be swapped as a "fix." They control spindle motor direction, not interpolation geometry.
  • C-axis / spindle positioning. If the spindle is also configured as a C axis for milling operations, verify C-axis homing after the X-axis change. Some 840C configurations share reference logic between the spindle encoder and C-axis.
  • Hydraulic / mechanical tool post offset. Front-mounted tool posts sometimes carry a hydraulic cross-slide whose neutral position is biased. Confirm the mechanical zero of the cross-slide has not drifted before assuming the electrical sign is at fault.

9. Machine Data Reference for 840C X-Axis

The SINUMERIK 840C organizes machine data into numbered MD blocks. The MD relevant to X-axis direction reversal lives in the axis-specific data area. The exact MD number varies between software versions; the canonical mapping is contained in the parameter list of the SINUMERIK 840C Programming Guide for the version installed on the machine. When documenting the change in the machine log, record:

  • Software version (visible at controller boot — "SW 2", "SW 3", "SW 4", "SW 5", or "SW 6").
  • MD number and the original value (bit pattern) before the change.
  • Password class used to access the MD.
  • Date and the engineer who performed the change.
  • Confirmation that the reference-point approach, G2/G3 trace, G41/G42 trace, and G96 trend test all passed.

This documentation is essential for any subsequent service visit. Without it, a future technician may be tempted to "re-fix" a machine that has already been corrected.

10. Long-Term Recommendation

For a 840C under continued production use, schedule a migration assessment. The 840C is a legacy platform and Siemens has progressively reduced the supported spare-parts and firmware-update window over successive product life cycles. A controller migrated to a current-generation SINUMERIK (for example 840D sl with SINUMERIK Operate) eliminates the front-tool / rear-tool commissioning ambiguity entirely: machine data on the modern platform exposes the tool-post position as an explicit configuration parameter rather than a sign bit in axis data. For shops that must keep the 840C in service, applying Option A or Option B from section 5 — followed by updating every part program in the library — restores standard turning behavior and removes the legacy commissioning error for the remaining life of the controller.

Why does G2 produce a counterclockwise arc on my SINUMERIK 840C lathe?

The X-axis sign convention is inverted relative to the 840C default. The standard convention defines X+ as a radial move away from the spindle centerline; if the tool is mounted in front of the turning center and the X-axis motor polarity is left at its default, the controller's "X increasing" actually moves the tool toward the centerline. The circular interpolation direction is evaluated against this sign, so G2 and G3 swap. Fix the X-axis direction through motor phase reversal or via the axis-specific direction MD rather than rewriting every program with G3 in place of G2.

How do I make G41 select the correct side of the contour on a front-mounted tool post?

Restore the X-axis direction to the standard convention so X+ corresponds to a radial motion away from the spindle centerline. Once X is correct, the controller's evaluation of contour normal and tool-tip direction table returns to the standard convention documented in the SINUMERIK 840C Programming Guide, and G41/G42 select the correct side automatically. If the axis direction cannot be changed, an active coordinate system mirror can be used as a workaround but must be applied consistently across every program and every canned cycle.

Why does G96 constant cutting speed drop RPM as the tool approaches center?

G96 maintains the relationship n = (Vc × 1000) / (π × D), so RPM must rise as the diameter decreases. When the X axis is sign-inverted, the controller reads an increasing X value while the tool physically moves toward the center, interprets that as a growing diameter, and commands RPM downward — the inverse of the intended behavior. Fix the X-axis direction; LIMS (the upper RPM clamp) is unaffected and should not be touched as part of this correction.

Where is the X-axis direction machine data located on a SINUMERIK 840C?

The exact machine data number varies between 840C software versions 2 through 6. Refer to the parameter list in the official SINUMERIK 840C Programming Guide for the installed SW version to identify the axis-specific direction-reversal MD for the X axis, then toggle the corresponding bit, save, power-cycle the NC, and re-reference the X axis before running any test program.

Can I swap two motor phases on the X axis to fix the direction without losing encoder reference?

Swapping two phases on the X-axis servo motor reverses the motor rotation direction. On drives that read commutation from the motor encoder (the common case on 840C-era drives), the controller must re-reference the X axis afterward because the reference-point marker is now encountered on the opposite polarity of motion. Confirm that the + and – hardware limit switches engage in the correct order, run the controlled-axis check at reduced rapid override, and re-run the G2/G3 trace and G96 trend tests before returning the machine to production.

Back to blog