CNC losing its reference position
A CNC that needs its axes referenced again after power-off has lost the link between its encoder count and the machine position. On machines with absolute encoders the usual cause is the encoder backup battery: FANUC raises DS0307 when the battery is getting low and DS0306 and DS0300 once the position is lost. On machines that home on switches every power-up, look at the home switch and encoder marker instead.
Diagnose this with AI
Try Free CNC Alarm Diagnostic Upload a photo of the alarm screen, the fault history or a data export. InduQT compares the evidence and suggests the next useful checks.
Where it shows up
- FANUC 0i-F: DS0300 APC ALARM: NEED REF RETURN, often after DS0306 or DS0307/DS0308; PS0090 if the return fails
- Siemens 840D sl: 25000 encoder hardware fault (axes must be re-referenced), 25022 absolute encoder not adjusted, 20000–20005 reference point approach alarms
- Haas NGC: 165 AXIS ZERO RETURN MARGIN IS TOO SMALL, 145 AXIS LIMIT SWITCH, 153 AXIS ZERO CHANNEL MISSING
- Soft overtravel alarms (FANUC OT0500/OT0501) or wrong positions after power-up, because travel limits depend on the reference
Likely causes and how to tell them apart
1Absolute encoder battery low or flat
- Points to it
- All axes on the same battery lose position after a weekend or long power-off; FANUC DS0307/DS0308 appeared earlier.
- Check
- Check the battery alarms in the alarm history (FANUC DGN 3019 shows which detector) and the battery voltage.
2Battery replaced with the power off
- Points to it
- Position lost right after a battery change.
- Check
- FANUC says to replace absolute Pulsecoder batteries with the machine (CNC) turned on and an emergency stop applied, within a week of the low-battery alarm, by trained personnel; re-reference once now.
3Battery or encoder cable disconnected or damaged
- Points to it
- Only one axis loses position; work was done near that motor.
- Check
- Inspect the battery and encoder cable and connectors for that axis.
4Encoder fault or communication errors
- Points to it
- Encoder alarms (FANUC SV0301–SV0307, SV0368; Siemens 25000/25020; Haas 9719) in the history.
- Check
- Handle the encoder alarm first: connectors, cable, noise, then the encoder.
5Home switch or zero-return margin problem (switch-homing machines)
- Points to it
- Haas 165 or 145; chips on the home sensor; position varies between zero returns.
- Check
- Clean the home switch and flag; Haas says the encoder Z channel must occur between 1/8 and 7/8 revolution from where the switch releases, and only then check the grid offset.
6Parameter or grid change
- Points to it
- Reference moved after a parameter load or a grid shift edit.
- Check
- Compare reference and grid parameters with the machine builder’s backup.
Diagnostic sequence
- Read the alarm historyLook for battery alarms (FANUC DS0306/DS0307/DS0308) or encoder alarms before the reference alarm. A battery warning that was cleared and ignored is the most common story.
- All axes or one?All axes on one battery point to the battery; one axis points to its cable, connector or encoder.
- Replace the battery with power onOn FANUC, change absolute Pulsecoder batteries with the CNC powered and E-stop applied, following the servo motor maintenance manual. Changing them with power off loses the position.
- Re-establish the referenceSet the reference position per the machine builder’s procedure (FANUC DS0300), then check soft limits, tool-change position and a known feature before running parts.
- Prevent a repeatRecord the battery change date and replace on the first low-battery warning, not after data is lost.
Evidence to collect
- Alarm history before the reference alarm
- Which axes lost position
- Battery voltage and last replacement date
- How long the machine was off
- Recent motor, encoder or cable work
Work on fuel trains, burners, pressure vessels and electrical equipment must be done by qualified personnel following the manufacturer’s documentation and local codes. Never bypass a safety device or interlock.