G28.1 and G28.2 are diagnostic-level CNC commands used to analyze, verify, and recalibrate zero-return conditions on Fanuc-controlled machines. While standard G28 and G30 commands send a machine to its home position, G28.1 and G28.2 dive much deeper—providing real-time debugging data, encoder signal verification, axis reference accuracy checks, servo drift detection, and homing-cycle validation. These commands are rarely discussed publicly, yet they are essential for maintaining precision, preventing crashes, and ensuring long-term CNC reliability in 2025 industrial environments.
1. What G28.1 Actually Does
G28.1 forces the machine to perform a diagnostic-style zero return, meaning the control:
- Reads raw encoder pulses
- Verifies the reference marker
- Checks for missed counts
- Aligns axis position with machine coordinates
- Confirms servo deviation limits
This exposes problems normally hidden behind standard homing routines.
Example:
G28.1 X
Machine performs a diagnostic zero-return for the X axis.
Useful for:
- After encoder replacement
- After ball screw work
- After unexpected servo alarm
- When axis drifts during power-up
2. What G28.2 Does (Deeper Diagnostics)
G28.2 is more aggressive—it commands a “machine coordinate validation” cycle:
- Confirms axis meets reference mark correctly
- Validates direction of reference edge
- Checks encoder feedback noise
- Validates soft-limit relationship
- Logs homing errors in system parameters
Example:
G28.2 Z
The CNC verifies all reference alignment data for Z axis—including servo synchronization and reference pulse timing.
This is essential after:
- Hard overtravel
- Minor crashes
- Encoder battery loss
- Servo amplifier replacement
- Parameter reset
3. Real Maintenance Example — Encoder Slip Diagnosis
If Z-axis randomly changes zero:
1️⃣ Run:
G28.1 Z
2️⃣ Check reference consistency
3️⃣ If error persists:
G28.2 Z
4️⃣ If count mismatch → encoder slip confirmed
This prevents catastrophic crashes in deep-pocket machining.
4. Real Production Example — Robot-Loaded CNC
In automated cells, even 0.03 mm homing error can destroy:
- Robot grippers
- Workholding
- Expensive fixtures
So integrators routinely run:
G28.2 X
G28.2 Y
G28.2 Z
before each shift to ensure perfect reference locks.
5. Z-Axis Crash Prevention (The Most Important Use Case)
If Z doesn’t home perfectly:
- Drill cycles overshoot
- Probing cycles misfire
- Tool changes misalign
- Heavy holders strike the table
Using:
G28.1 Z
will instantly reveal:
- Mechanical drag
- Bearing preload issues
- Encoder lag
- Servo following errors
6. Hardcore Troubleshooting Example — Axis Drifting After Warm-Up
Symptom: X-axis shifts after machine heats up.
Run:
G28.2 X
If data shows reference misalignment increasing with temperature → ball screw thermal growth or nut preload imbalance detected.
This kind of diagnosis is impossible with normal G28/G30.
7. Reading Diagnostic Feedback (Fanuc Type B / i-Series)
While G28.1/G28.2 run, the control logs:
- Raw encoder count
- Reference edge polarity
- Marker repeatability
- Servo position error
- Motor torque load trend
Technicians often read:
- Diagnostic 0700–0710 (encoder pulses)
- Servo graph trace
- Reference marker drift
This information is critical for predictive maintenance.
8. Using G28.1/G28.2 After Parameter Loss
When batteries die or parameters are reset:
- Axis reference locations may shift
- Soft limits become dangerous
- Home positions become inaccurate
Correct procedure:
- Manually align axis with mechanical home
- Run:
G28.1 X
G28.2 X - Save parameters
Prevents all future crashes caused by defective homing.
9. Common Problems & Professional Fixes
Problem: Axis overtravels during G28.1
Cause: Incorrect parameter limit or encoder noise
Fix: Check soft limits, inspect encoder cable
Problem: G28.2 reports servo drift
Fix: Re-tune servo, check feedback scaling
Problem: Z-axis homes inconsistently
Fix: Replace encoder coupler or check thrust bearings
Problem: Machine vibrates during zero return
Fix: Inspect ball screw preload & thrust bearing load
10. Pro Tips for 2025 CNC Reliability
✔ Run G28.2 weekly in automated production cells
✔ Always verify Z-axis after heavy aluminum hogging (thermal shift)
✔ Never ignore reference pulse inconsistency
✔ Use G28.1 after crashes before restarting production
✔ Create a diagnostic macro:
(HOMING DIAGNOSTICS)
G28.2 X
G28.2 Y
G28.2 Z
#3006=1(HOMING DIAGNOSTICS COMPLETED)
Machine health increases dramatically.
11. Summary
G28.1 and G28.2 are high-level CNC diagnostic commands that uncover homing errors, verify encoder integrity, prevent axis drift, and eliminate hidden mechanical issues before they cause crashes. In 2025 CNC environments—especially robot-loaded or unattended machining cells—these commands are mandatory for ensuring long-term accuracy, reliability, and machine safety.
Leave a comment