Before anything else, confirm that the CAM model centerline, CAM rotary center, and machine rotary center describe the same physical line. On the failed CNC 6040 job, the toolpath still produced six indexed faces, but the rotary center was displaced in Z. The decisive clue was a first pass near Z-2 at 0 degrees and near Z33 at 180 degrees. Reversing rotation cannot correct that geometry.
Rotary-center check
- Open the setup that generated the toolpath and display the model origin and rotary orientation.
- Confirm that the modeled cylinder centerline is coincident with the CAM rotary axis. Do not use the top surface of the cylinder as the rotary center.
- Confirm that work-coordinate
Z0represents the physical height of the machine rotary centerline for this four-axis setup. - Post the toolpath and compare equivalent cuts separated by 180 degrees. Do not move on until their radial distance from the rotary center is equal.
A surface zero is valid for many three-axis operations because every depth is measured from one fixed top plane. Rotary machining changes the orientation of that plane continuously. The controller rotates coordinates around the declared centerline; if CAM places that centerline on the cylinder surface, a point that appears shallow on one side becomes deeply displaced after half a revolution.
For a centered hexagon, rotation should change which face is presented to the cutter, not change the effective stock radius. A large Z difference between opposite angular positions therefore identifies a center-of-rotation error before any material is cut.
Axis-identity check
Next, identify the physical line about which the chuck rotates. In the reported configuration, the rotary spindle was aligned with the machine Y direction. Under the normal geometric axis convention, rotation about Y is designated B; rotation about X is designated A.
The controller and CAM labels still require a separate check. Mach3's default screen presents an A axis, and a Y-aligned rotary unit can be configured under that label for practical controller compatibility. That mapping can work, but CAM and the controller must agree that every commanded A move drives the actual Y-aligned rotary unit.
| Reading | Meaning | Next check |
|---|---|---|
| Rotary unit is parallel to X | Its geometric designation is A
|
Check positive rotation |
| Rotary unit is parallel to Y | Its geometric designation is B
|
Check whether CAM outputs B or intentionally remaps it to A
|
CAM outputs A, and the intended unit rotates |
The practical mapping is active | Check direction and centerline |
| CAM outputs an address that does not drive the intended unit | Postprocessor and controller mappings disagree | Correct the axis mapping before testing motion |
Do not rename an axis in only one layer. The setup orientation, postprocessor output, controller configuration, and physical motor connection form one mapping chain. Read the posted rotary address, run a small air move, and watch which unit turns. That observation settles the mapping without relying on the label shown in a screen set.
Positive-direction check
- Jog the rotary axis through a small positive command with the tool clear of the stock.
- View the axis from its positive end toward the machine origin. Positive rotation appears counterclockwise from that viewpoint.
- Use the right-hand-screw check if the viewing direction is unclear: rotation is positive when a conventional right-hand screw would advance in the positive linear-axis direction.
- Compare the physical motion with the CAM simulation and posted command. Correct the direction mapping if they disagree.
Axis direction is defined in the machine coordinate system, not by whether the tool happens to approach or pass a particular workpiece. Linear positive motion is described as tool motion relative to the workpiece. Consequently, a moving table travels opposite the equivalent tool-relative direction. Work offsets can make displayed positions negative or positive without changing the physical positive direction.
An inverted rotary direction is diagnostically different from a displaced center. Reversing the direction generally mirrors the angular placement of asymmetric features. It does not turn a centered regular hexagon into an incoherent form: the operation still has six faces, only their angular order or orientation changes. If two faces look plausible and later passes remove most of the stock, check the rotary center before treating direction as the primary fault.
Posted-code geometry check
Inspect the posted coordinates before changing motors or controller polarity. The failed program began with negative Z motion:
N75 Z-1.4
N80 X15.233 Y29.369 Z-1.494
N85 X15.212 Y29.374 Z-1.585
N90 X15.177 Y29.383 Z-1.672
N95 X15.129 Y29.396 Z-1.753
N100 X15.07 Y29.411 Z-1.824
N105 X15. Y29.429 Z-1.885
Negative Z values alone are not a fault. Their meaning depends on where Z0 is defined. Here, simulation showed the first pass near Z-2 at 0 degrees but near Z33 at 180 degrees. That angular dependency showed that the toolpath was rotating about a point displaced from the intended centerline.
- Locate the first cutting move at one angular orientation and record its rotary angle and Z coordinate.
- Locate the corresponding cut on the opposite side, 180 degrees away.
- Measure both tool positions relative to the declared rotary center, not merely relative to the displayed work zero.
- If the radial distances differ substantially, return to the CAM origin and model alignment. If they match but angular placement is mirrored, return to the positive-direction check.
- If both geometry and direction agree, inspect tool compensation and operation boundaries.
Symptom-to-cause decisions
| Observed result | Primary cause to test | Decisive reading |
|---|---|---|
| Correct feature appears mirrored | Rotary direction reversed | Positive jog disagrees with CAM's positive rotation |
| Six faces are present, but depth changes drastically around the stock | CAM rotary center or Z0 displaced |
Opposite-angle cuts have unequal radial positions |
| Two faces cut, then the tool removes unintended material | Rotary center displaced | Backplot shows the stock rotating around the wrong point |
| Posted rotary command does not operate the expected unit |
A/B mapping mismatch |
Address in G-code differs from controller mapping |
| Contour is offset consistently to the wrong side | Cutter-radius compensation or boundary-side error | Offset remains wrong at every rotary angle |
Cutter-radius compensation belongs later in the decision tree. For a pocket, the tool-center path normally lies inside the boundary. Compensation on the wrong side creates a repeatable lateral offset or cuts the wrong side of a profile; it does not create the large angle-dependent Z displacement seen when the rotary center is wrong. Confirm whether compensation is generated by CAM or applied by the controller, because applying both produces a double offset.
Machine centerline measurement
The rotary center has a fixed height above the table as long as the rotary unit remains mounted in the same position. Establish that height once, then use it as the work-coordinate reference instead of probing the curved surface of each cylinder.
- Home the machine so the machine coordinate system is repeatable.
- Measure the perpendicular distance from the table reference surface to the rotary centerline.
- Create a rigid gauge block whose top is exactly level with that centerline, or retain the measured table-to-center offset as a setup value.
- Touch off the tool on the table or gauge using the normal probing method.
- Enter the measured offset using Mach3's probed-surface Z-coordinate function so that work
Z0resolves to the rotary centerline. - Jog to indicated
Z0with suitable clearance and verify that the tool reference is level with the chuck axis. Do not move on until the physical and displayed centerlines agree.
A cylinder-surface touch-off adds stock diameter, runout, and surface condition to the setup. It also encourages treating the tangent surface as the rotational datum. The table-to-center measurement removes the stock radius from the coordinate definition. CAM then controls feature radius relative to the same fixed axis used by the machine.
Corrected CAM and controller procedure
- Orient the CAM setup so its linear axes match the machine's tool-relative directions. Set Z along the spindle axis.
- Place the cylindrical model centerline on the setup's rotary centerline.
- Select the physical Y-aligned rotary direction. Use geometric
Boutput when the controller accepts that mapping, or apply the documented postprocessor mapping toAwhen Mach3 is configured to drive the same unit asA. - Set the program origin so
Z0is the rotary center, not the cylinder surface or the end face's outer edge. - Regenerate the operation and confirm that the pocket or contour boundary uses the intended cutter side. Avoid duplicating CAM-generated radius offset with controller compensation.
- Post the program and search the output for the expected rotary address. Confirm that its sign matches the tested positive direction.
- Backplot the complete G-code in a simulator that displays four-axis motion. Watch the stock rotate about its centerline and compare cuts at 0 and 180 degrees.
- Run an air cut above the stock. Confirm that all six face positions appear at the expected angular intervals and that Z motion remains radial to one fixed center.
- Cut a test piece with conservative engagement. Stop if opposite faces show different depths, because that indicates a remaining center-height, model-alignment, or work-offset error.
Final verification readings
| Item | Acceptance check |
|---|---|
| Physical alignment | The modeled cylinder axis, programmed rotary axis, and chuck centerline are coincident |
| Work coordinate |
Z0 is level with the measured rotary centerline |
| Axis address | The posted A or B command drives the intended rotary unit |
| Direction | A positive command matches the CAM simulation under the chosen viewing convention |
| Opposite-angle geometry | Equivalent cuts at 0 and 180 degrees have equal radial distance from the center |
| Compensation | The cutter follows the intended side of the profile with one compensation method |
| Finished test | Opposite flats have matching depth and the hexagon remains centered on the cylinder |
FAQ
How do I set Z zero for CNC 6040 rotary machining?
Set work Z0 at the rotary centerline. Measure the table-to-center height or use a gauge block at center height, then enter that offset through the Mach3 probed-surface Z-coordinate function.
How do I know whether my rotary axis should be A or B?
Rotation about X is geometrically A, while rotation about Y is B. A Y-aligned unit may still be mapped to A for Mach3, but the CAM postprocessor, controller mapping, and physical motor must all use that same address.
How do I verify the CNC 6040 rotary-axis correction?
Backplot equivalent passes at 0 and 180 degrees, then run an air cut. Proceed only when both passes have equal radial distance from the centerline, positive rotation matches the CAM display, and opposite test flats have matching depth.