GreatLight CNC Machining Factory logo
CNC Machining
Rapid Prototyping
Materials
Industries
News
About GL

Get Instant Quote

Machine tool basics

What Are Homing Switchs On A CNC Machine?

A homing switch tells the controller where an axis really is. Without it, every tool offset and fixture position is guesswork. This page covers how the switch works, which type fits which machine, and when a switch is the wrong choice.

±0.005 mm tolerance127 CNC machines15 years
What Are Homing Switchs On A CNC Machine?
Definition

What a homing switch actually does

A homing switch is a position sensor mounted at a fixed point near the end of an axis travel. On power-up the controller does not know where the table, ram or spindle sits. It only knows the count in its encoder or the phase of its servo motor. Homing drives each axis slowly toward that fixed point until the switch trips, then the controller writes the known machine coordinate into the position register.

The important word is machine coordinate, not work coordinate. Homing sets the machine zero. Work offsets such as G54 are measured from that zero afterward. If homing drifts, every work offset inherits the error, and a part that was in tolerance yesterday cuts oversize today without anyone touching the program.

Most controls use a two-stage approach. The axis rapids toward the switch at reduced feed, trips it, backs off a set distance, then approaches again at a crawl. The controller latches the encoder count on the second, slow pass. That is why homing repeatability is usually far better than the switch itself. A roller lever switch with 0.5 mm of mechanical slop can still produce 0.01 mm of homing repeatability on a good servo.

The grid shift parameter is the other half of the system. It is a stored offset between the switch trip point and the true machine zero. If somebody changes it, the machine still homes cleanly and still reports success. The zero is simply in the wrong place.

  • 1
    Machine zero firstWork offsets are measured from the homed position.
  • 2
    Two-pass approachThe slow second pass sets repeatability, not the switch.
  • 3
    Grid shift mattersA wrong grid shift value moves zero without any alarm.
Repeatability

Why switch repeatability is not the same as machine accuracy

Engineers often ask for a switch with 1 μm repeatability. That number rarely reaches the part. The switch trip point moves with temperature, actuation speed and the approach direction. A ball screw grows about 11 μm per meter per degree Celsius on steel, so a 20 °C shop swing over a 1,000 mm travel is worth more than most switches.

What the switch does control is whether the machine homes at all, and whether the zero is consistent run to run. Repeatability of ±0.005 mm at the tool is a machine-level result, reached with a warm machine, a repeatable two-pass home, and a measured grid shift. The switch is one input into that chain, not the whole chain.

Direction matters too. A mechanical switch trips at a slightly different point going in than coming back, a property called hysteresis. Controls handle this by always homing from the same side. If a service technician jogs the axis past the switch before homing, the result can differ by a few counts.

Thermal drift is the largest practical error. On a machine that runs all day, re-homing after a warm-up cycle and re-probing the fixture is normal practice. Shops that skip the warm-up see the first ten parts move.

  • 1
    Warm up before homingA cold machine homes to a cold zero.
  • 2
    Home from one sideHysteresis makes the approach direction matter.
  • 3
    Re-home after crashesEven a light bump can shift the trip point.
Sensor types

Mechanical, inductive and optical types compared

Mechanical switches use a plunger or roller lever and a set of contacts. They are cheap, easy to troubleshoot with a meter, and work on any control. Their weakness is contact wear and chips. A roller that packs with fine aluminum dust will eventually stick, and the failure shows up as an intermittent home failure rather than a clean stop.

Inductive proximity sensors detect a metal target without touching it. No moving parts, no contact wear, and they tolerate coolant mist far better than an open mechanical switch. Their sensing distance is short, typically a few millimeters, so the target flag must be mounted rigidly. A loose flag is a common cause of intermittent homing faults.

Optical switches break a light beam with a flag. They are fast and very repeatable in clean conditions. In a shop with heavy mist or graphite dust, the lens clouds and the switch starts to chatter. Optical types suit clean rooms, laser systems and inspection equipment more than a wet turning cell.

Reed and Hall-effect magnetic switches sit in between. They are sealed and non-contact, but they respond to a magnet, and stray fields from a spindle motor or a magnetic chuck can trigger them early. On a machine with a magnetic workholding plate, keep magnetic switches away from the chuck side.

  • 1
    MechanicalCheap and meter-friendly, but wears and packs with chips.
  • 2
    InductiveNon-contact and coolant-tolerant, needs a rigid flag.
  • 3
    OpticalFast and clean, but hates mist and dust.
  • 4
    MagneticSealed, but stray fields can cause false trips.
Limits

When a homing switch is the wrong solution

Homing switches are absolute references, and absolute references only hold while nothing moves. On a machine with a large thermal load, a switch on the ballscrew end cannot correct for screw growth between the motor and the tool. That error is handled by a scale or by re-probing the part, not by the switch.

A second limit is travel speed. On a high-speed router or a laser with 2 g acceleration, the axis may pass the switch faster than the sensor can respond. The controller then homes to a random count. These machines need a switch with a wide active band or a linear scale with a reference mark.

A third case is the machine that never powers down. Some production cells keep the servo energized for weeks and never re-home. Adding a better switch changes nothing. The correct fix is a scheduled re-home or an absolute encoder that keeps position without power.

Finally, a switch cannot tell you that the zero has shifted by 0.03 mm. It only reports that it tripped. If the process needs that level of confidence, put a probe in the spindle and measure a known feature at the start of the shift. The switch gets you close. The probe gets you right.

  • 1
    Thermal growthScrew expansion is outside the switch loop.
  • 2
    High accelerationFast axes can outrun a slow sensor.
  • 3
    Never re-homedA better switch does not fix a missing routine.
  • 4
    VerificationA spindle probe confirms zero; the switch only assumes it.
Selection

Choosing a homing switch by machine type

Pick the row that matches the machine, then confirm the controller input type.

Machine / environmentSwitch typeWhyWatch out for
3-axis mill, flood coolantInductiveSealed, no contact wearLoose target flag
Toolroom lathe, low volumeMechanical rollerCheap, easy to meterChip packing on the roller
5-axis trunnionInductive, both sidesTilt and rotary need two referencesCable routing on the moving axis
Laser or router, high speedOptical or linear scaleFast response, wide active bandMist on the lens
Clean room / medical cellOpticalNo wear particlesLens cleaning schedule
Machine with magnetic chuckInductiveStray fields do not matterDistance from the chuck
Grinder, abrasive dustInductive, sealedDust does not block sensingFlag erosion over years
Large gantry, 4,000 mmInductive plus scaleSwitch is coarse, scale is fineGrid shift after service

The short version

If the machine is clean and fast, choose a non-contact sensor and rely on the two-pass home for repeatability. If the machine is wet, dusty or low volume, a sealed inductive switch is the safe default. A mechanical roller only makes sense when a technician must diagnose it with a meter at 2 a.m.

FAQs

Common questions

Is a homing switch the same as a limit switch?

On many machines the same physical sensor serves both jobs. The controller uses it as a reference during homing and as a travel limit during normal operation.

On larger machines the two functions are split. Separate overtravel limit switches sit further out and only trigger when the axis runs past the safe zone. Homing switches are usually the inner pair.

How often should homing switches be checked?

Check the trip point at every scheduled maintenance interval, and after any crash, however light. Record the machine coordinate at the trip point so a drift shows up as a number rather than a surprise.

On a machine running three shifts, a monthly check with a dial indicator against a known stop is enough for most work. Tighten the interval if the shop temperature swings widely.

Why does the machine fail to home only in the morning?

Cold grease and a cold ballscrew change the approach dynamics. The axis may decelerate differently on the first home of the day and trip the switch at a different count.

Run a warm-up cycle before homing, or home twice and use the second result. If the fault persists on a warm machine, look at the sensor cable and the flag mounting.

Can we home without switches?

Yes, with absolute encoders or linear scales that carry a reference mark. The controller reads position directly and no switch is needed.

These systems cost more but remove a wear item. They also keep position through a power cut, which matters on large gantry machines where re-homing takes several minutes.

What causes an intermittent home failure?

The usual causes are a loose target flag, a chafed cable, coolant in a connector and a dirty lens. Chips on a mechanical roller are also common.

If the fault follows the cable when you move it by hand, replace the cable before the sensor. Cables fail more often than sensors do.

Does the switch affect part tolerance?

Only indirectly. Homing sets machine zero, and work offsets are measured from it. A consistent home gives consistent offsets.

Part tolerance comes from the whole chain: machine geometry, thermal state, tool wear and fixturing. The switch contributes to that chain but does not set the final number.

Need CNC parts machined to ±0.005 mm?

Send your drawings and we will return a quote with a free DFM analysis within 12 hours. One prototype or a 10,000-part run, no minimum order quantity.

12-hour quote100% inspectionISO 9001 / IATF 16949

Follow

More machine shop notes

We publish setup notes, tooling trials and inspection data from the factory floor.

FacebookTikTokYouTubeLinkedInInstagramThreadsPinterest

Trusted by engineers and manufacturers worldwide

Tesla Ford Motor Company BYD Auto Denso Magna International Boeing Airbus Medtronic KUKA FANUC