G28.1 and G28.2 are advanced zero-return diagnostic commands used on modern Fanuc-based CNC machines to establish or verify the absolute machine home position. These commands are essential when an axis loses its reference due to power failure, servo shutdown, encoder slip, mechanical impact, grid shift drift, or during service calibration. Unlike the simple G28 command—which only sends the axis to an already-defined home—G28.1 and G28.2 actively measure, correct, or re-establish the machine’s true mechanical zero reference. These cycles are used by expert CNC programmers, integrators, field technicians, and precision machining environments where stability is mandatory.
1. What G28.1 Actually Does (Zero Return Check Mode)
G28.1 activates zero-return detection mode, instructing the machine to:
- Search for the encoder index pulse
- Verify servo alignment
- Confirm the physical home-switch activation point
- Compare encoder count to the machine’s stored grid-shift
- Flag deviations outside allowable tolerance
Example:
G28.1 Z0.
The Z-axis moves toward its home switch, stopping precisely when:
- Home-limit switch activates
- Encoder Z-pulse is detected
- Servo verifies the mechanical origin
2. What G28.2 Does (Absolute Zero Re-Initialization)
G28.2 forces the machine to re-establish absolute zero using:
- Switch → Index → Servo alignment scan
- Grid-shift recalculation
- Encoder reference refresh
Example:
G28.2 X0. Y0. Z0.
This command is used:
- After crashes
- After ballscrew replacement
- After servo-motor swap
- After encoder battery failure
- When absolute positioning is lost
- When axis drifts out of tolerances
3. Real Production Example — Fixing Lost Z-Home
If Z-axis alarms “SERVO ZERO RETURN FAILURE,” use:
G28.1 Z0. (Diagnostic scan)
G28.2 Z0. (Rebuild absolute Z-home)
This resolves most encoder-index mismatches.
4. Grid Shift (Machine-Level Offset) Verification
Every Fanuc machine has a “grid shift” value that aligns the encoder index with the exact mechanical home.
Running:
G28.1 X0.
Performs:
- Switch signal → OK
- Encoder index → OK
- Compares index vs. grid-shift
- Verifies if shift drifted (common after years of thermal cycles)
If mismatch > tolerance → CNC will alarm.
5. True Axis Alignment After Crash
After heavy crash, axis alignment can shift.
Correct method:
- Jog axis away from crash zone
- Execute G28.1 scan
- If error persists → G28.2 full re-home
- Update machine parameters if technicians approve
This method is used in aerospace and medical machining shops.
6. Multi-Axis Recovery Example (Simultaneous)
G28.2 X0. Y0. Z0.
This is used:
- On horizontal machining centers
- When absolute encoders lose battery
- After machine transport
7. Using G28.1 for Diagnostic Logging
When a machine slowly drifts due to ballscrew wear, technicians run:
G28.1 X0.
Record encoder deviation
Predict future maintenance date
This is part of predictive maintenance systems in 2025.
8. Servo Tuning Verification With G28.1
Technicians use this command to verify:
- Correct servo gain
- Backlash compensation values
- Pitch error table alignment
- Machine repeatability
If repeated G28.1 cycles return inconsistent index values → machine alignment must be serviced.
9. Dangerous Mistakes to Avoid
- Never run G28.2 with a tool inside a pocket
- Never run G28.2 after CAM-generated offsets
- Do NOT apply G28.2 without technician approval
- G28.2 rewrites absolute zero → affects entire machine
Always retract safely before re-homing.
10. Industry Best Practices (2025 Standard)
- Run G28.1 once per month for diagnostic verification
- Run G28.2 only after mechanical changes
- Log all grid-shift changes
- Use probing macros to confirm part position after re-home
- Use G53 for safe machine coordinate checks
11. Summary
G28.1 is the diagnostic tool that verifies and reports home-position consistency, while G28.2 rebuilds the machine’s absolute zero after mechanical drift, encoder resets, or component replacement. Together, they form the backbone of CNC homing stability and precision in 2025 manufacturing environments. Mastering these commands is essential for maintaining axis accuracy, avoiding crashes, and ensuring long-term machine reliability.
Leave a comment