CNC Handwheel (MPG) Signal Decoding and Interface Matching: A Maintenance and Troubleshooting Guide

    This guide explains how a CNC handwheel — formally the manual pulse generator (MPG) — converts rotation into precise axis movement. It covers quadrature incremental encoding and how A/B channels carry direction and step information, handwheel multiplier settings (×1 through ×1000) and their effect on per-click travel, the electrical conventions behind interface compatibility (open-collector vs. push-pull vs. differential outputs, supply voltage, A/B polarity, cable and shielding practice), a reference quadrature decoding state machine, a symptom-to-cause fault diagnosis table, spare-part identification criteria, and operating and maintenance practices for reliable manual feed on a machine tool.

    1. The Handwheel: A Simple Part That Drives the Whole Signal Chain

    In CNC machining, a running program handles most of the cutting work. But operations like tool setting, workpiece alignment, edge finding, trial cuts, and fine positioning before mold engraving still depend heavily on manual input from the operator. The component that carries this job is the handwheel mounted on the operator panel, also called the manual pulse generator (MPG).

    Outwardly, a handwheel is just a knob you can turn, so it looks mechanically trivial. In reality it sits between human intent and machine motion: the operator turns it, and the control system has to convert how far it was turned and in which direction into an exact displacement of the selected axis. When any link in that chain fails, the consequences range from slower tool setting and poor feel to alignment errors, crashes, and damage to the workpiece, tooling, or the machine itself. The handwheel may be easy to overlook, but it is responsible for the last millimeter between the human and the machine.

    Three perspectives are needed to understand it:

    • Electrical view: the handwheel is an incremental pulse source with two quadrature outputs, so signal levels and waveform quality matter.
    • Interface view: the handwheel connects by cable to a CNC input port or a dedicated MPG port; the key concerns are level compatibility, polarity, and noise immunity.
    • System view: the handwheel output is translated into a feed command and executed by the servo drive, which involves multiplier steps, axis selection, and system parameters.

    The rest of this guide works through each of these in turn.

    2. From Quadrature Pulses to Feed Commands: The Full Handwheel Signal Path

    A typical handwheel signal path can be broken into five stages:

    1. [Handwheel] [Cable] [CNC interface] [Motion execution]
    2. Rotary encoder ──A/B pulses──▶ Input port (I/O module or ──▶ Multiplier / count / ──▶ Handwheel feed
    3. dedicated MPG port) direction detect command ──▶ Servo drive
    4. ──▶ Motor ──▶ Ballscrew ──▶ Machine axis
    5. ▲ ▲
    6. Multiplier switch Axis selection (panel / screen)

    After the signal leaves the handwheel, it passes through the interface board or input module, where levels are matched and the signal is filtered. The system software or interface circuit then performs multiplication, counting, and direction detection, producing a handwheel feed command. The servo drive and motor convert that command into ballscrew rotation, which finally appears as a small, precise displacement of the coordinate axis.

    It is worth noting that a handwheel usually does not control a single axis. The system normally lets you assign the handwheel input to X, Y, Z, and additional axes through an axis selector switch or an on-screen control. In signal-flow terms, the handwheel is the input source, axis selection is the routing, and the multiplier is the gain. Together they decide which axis each turn reaches and how far it travels.

    3. Quadrature Incremental Encoding: The Handwheel’s Language of Direction and Step Size

    Inside the handwheel is an incremental rotary encoder: for every certain angle the shaft turns, it emits a pulse. Common handwheels output anywhere from a few tens to a few hundred pulses per revolution, and the signals typically include:

    • A and B channels: two pulse trains offset by 90 electrical degrees.
    • Z channel (on some handwheels): one zero-reference pulse per revolution, normally unused in handwheel applications.
    • Multiplier selection contacts: ordinary digital signals used to switch between multiplier settings such as ×1, ×10, and ×100.

    Because the two quadrature trains are offset in time by a quarter of a period, that relationship is exactly what gives the system its “language of direction” and its “language of step size.”

    1. Direction detection: whoever comes first leads

    Assume that turning in one direction causes channel A to transition before B (A leads), while turning in reverse causes B to lead. The system only has to compare which edge came first to determine the direction of rotation. This contrasts sharply with two in-phase waveforms, where direction cannot be distinguished at all — and it is the core value of quadrature encoding. The A and B waveforms look like this:

    1. A ─────┐ ┌───┐ ┌───┐ ┌───
    2. └────┘ └────┘ └────┘ └───
    3. ┌───┐ ┌───┐ ┌───┐
    4. B ───────┘ └────┘ └────┘ └──
    5. ↑ ↑ ↑
    6. A lead B lead A lead
    7. (positive)(negative)(positive)

    2. Pulse counting: how far it turned

    Each of channels A and B has one rising edge and one falling edge, giving four active edges in total. Counting those edges gives the number of steps turned.

    3. Multiplication

    The four edges within one pulse period are evenly distributed and each represents a quarter step — this is what is called multiplication or interpolation. In a real system, whether the input circuit supports multiplication, and by what factor, is determined by the specific product’s hardware specification. Two concepts need to be kept separate in engineering practice:

    • Resolution: the smallest commanded amount corresponding to each input pulse.
    • Multiplication: how many count units each input pulse is split into.

    Only the product of the two determines how sensitive the handwheel feels.

    4. Direction × step size

    Direction decides where you move; step size decides how far. Multiplied together, they give the displacement increment produced by one handwheel movement. With that in place, both the multiplier calculations and the fault analysis in the following sections share a common basis.

    4. Multipliers and Resolution: How Far Does One Click Move?

    Many CNC systems offer several handwheel multiplier settings (commonly ×1, ×10, ×100, ×1000). What a setting actually changes is the feed amount per handwheel pulse. Using a typical configuration from a milling system class as an example (always confirm actual values against the machine’s technical documentation):

    Multiplier Pulses per revolution Movement per click Movement per revolution Typical use
    ×1 100 0.001 mm 0.1 mm Trial cuts, precision alignment, micro-adjustment
    ×10 100 0.01 mm 1 mm Alignment, routine tool setting
    ×100 100 0.1 mm 10 mm Coarse adjustment, rapid approach
    ×1000 100 1 mm 100 mm Large-range coarse positioning; use with care

    Several things follow from this:

    • A multiplier is essentially a sensitivity knob. Low settings emphasize accuracy; high settings emphasize speed.
    • Low multipliers give a finer feel. At high multipliers, a small twitch of the fingers can produce visible movement, and there is a crash risk when the tool is close to the workpiece or a fixture.
    • High multipliers work best paired with a rapid-approach-then-fine-feed habit. Close in at a larger multiplier, then switch to a smaller one for fine adjustment.

    It is worth stressing that if the system’s internal multiplication parameter or command unit configuration does not match the machine’s mechanical transmission, the same handwheel rotation will produce a different actual displacement. This is especially common after retrofitting older machines, upgrading the control system, or replacing the control system altogether. In that situation, recalibrate using trial cuts and dial-indicator measurements.

    5. Interface Matching: The Hidden Reasons a Handwheel “Doesn’t Work”

    The connection between a handwheel and a CNC system may look like nothing more than a cable, but it carries several electrical conventions. Interface mismatch is a common cause of “I fitted a new handwheel and got no response” and of “it works sometimes and not others.”

    1. Output signal form

    Handwheel output forms are not standardized. Common types are open-collector, push-pull (complementary output), and differential line drivers, each with different requirements for load and interface:

    • Open-collector output can only pull low, and relies on a pull-up resistor on the input side to restore the high level.
    • Push-pull output actively drives both high and low, and offers stronger drive capability.
    • Differential output has strong noise immunity and suits long cable runs.

    If the handwheel’s output form does not match what the interface expects — for instance, an open-collector handwheel connected to an input with no pull-up, or a push-pull handwheel fitted while the existing pull-up resistor is too small, raising the low level — the signal can behave abnormally.

    2. Supply voltage and levels

    A common handwheel supply voltage is 5 V, though some models use other voltages. The supply voltage and the interface logic level must agree. A 5 V handwheel connected to a 12 V or 24 V input requires you to confirm whether the interface supports it and whether level shifting is needed.

    3. Polarity and axis selection

    If channels A and B are wired in the wrong order, the axis moves opposite to the direction you turn. Axis selection determines which axis the handwheel actually drives. If the axis selector switch has poor contact, or if the system masks handwheel input in certain modes, the symptom is “I turn it and nothing happens.”

    4. Cable and shielding

    Handwheel cables on the shop floor are often long and have to pass through areas crowded with power wiring. The sensible practices are:

    • Use twisted, shielded cable.
    • Ground the shield reliably on the CNC cabinet side, usually at one end only.
    • Keep the cable away from strong interference sources such as VFD output cables and power cables.
    • Use connectors with locking mechanisms, such as aviation plugs, so vibration cannot loosen them.

    6. Reading Handwheel Signals with Quadrature Decoding

    With the principles above in place, a short piece of simplified code can illustrate how a handwheel signal is decoded. What follows is the approach commonly used in embedded scenarios. Actual CNC systems may have dedicated interface circuits and algorithms, but the basic idea is the same:

    1. /* Quadrature decoding state machine: illustrative code to explain the principle */
    2. typedef struct {
    3. uint8_t last; // previous AB level, bit1 = A, bit0 = B
    4. int32_t count; // accumulated count
    5. bool fault; // true if an illegal transition was detected (suspected chatter or noise)
    6. } quad_t;
    7. /* Transition table: rows = previous state, columns = current state,
    8. value = count increment contributed by that transition */
    9. static const int8_t TRANS[4][4] = {
    10. /* A=0,B=0 A=0,B=1 A=1,B=0 A=1,B=1 */
    11. /* 0,0 */ { 0, +1, -1, 0 }, // illegal transitions are not counted
    12. /* 0,1 */ { -1, 0, 0, +1 },
    13. /* 1,0 */ { +1, 0, 0, -1 },
    14. /* 1,1 */ { 0, -1, +1, 0 } // illegal transitions are not counted
    15. };
    16. void quad_update(quad_t *q, bool a, bool b)
    17. {
    18. uint8_t cur = (a << 1) | b;
    19. uint8_t step = TRANS[q->last][cur];
    20. q->count += step;
    21. if (step == 0 && cur != q->last) {
    22. /* A and B changed at the same time. Normal rotation never
    23. produces this, so it usually means chatter or noise:
    24. flag it as suspicious. */
    25. q->fault = true;
    26. }
    27. q->last = cur;
    28. }

    This code reflects three engineering points:

    • Only legal transitions count. State changes that follow the Gray-code sequence are treated as valid counts. A and B changing together (for example 00 → 11) is treated as abnormal; it can be logged and discarded, which is useful for detecting chatter and interference.
    • Unidirectionality. Each legal transition contributes either +1 or −1 and is never counted twice.
    • Direction comes from state order. If the actual direction turns out to be opposite to expectation, swapping the signs in the transition table is more flexible than rewiring.

    In a real system, this is usually combined with software filtering over the sampling period — for example, requiring several consecutive identical samples before a transition is confirmed — to reduce the effect of chatter. What the shop floor expects when it talks about “feel” is essentially the expectation that every state transition is captured accurately and every illegal transition is handled sensibly.

    7. Symptoms and Diagnosis: Working Back from the Fault to the Cause

    Handwheel faults show up in many forms. The table below is organized from the signal source to the interface, so faults can be isolated layer by layer:

    Symptom Likely cause Suggested checks
    Turning the handwheel produces no axis movement at all Handwheel mode not active; axis selector switch failure; loose handwheel plug; missing supply Confirm mode and axis selection, check plug and supply, short the switch contacts to test if necessary
    Intermittent behavior; touching or flexing the cable changes the response Broken strands inside the cable, poor connector contact, oxidized pins Wiggle and bend the cable while watching the symptom; clean or re-crimp the pins
    Axis moves opposite to the direction of rotation A and B wired in reverse Check the pin definitions and swap A and B (or change the relevant system parameter)
    One click moves noticeably too far or too little Wrong multiplier setting or faulty selector contacts; incorrect command unit or multiplication parameter in the system Confirm the multiplier setting, measure actual travel per revolution and recalibrate
    Count is too high; axis drifts or jumps erratically Interference, simultaneous A/B transitions, missing pull-up leaving the level floating Observe the waveform with an oscilloscope; check shielding and grounding
    Count is too low; clicks are lost when turning fast Cable too long or pull-up resistor too large, slowing the rising edge beyond the input’s frequency response Measure rising-edge time; check cable length and interface specification
    Abnormal handwheel feel (stiff or loose) Bearing wear, aged seals, liquid or chips entering the internal mechanism Disassemble and inspect, or replace the handwheel

    Two points are worth emphasizing when diagnosing:

    1. An oscilloscope is the most effective diagnostic tool for handwheel problems. Watch channels A and B simultaneously on a two-channel scope and focus on:

    • whether the amplitude is normal and close to the supply voltage;
    • whether the rising and falling edges are clean, or show slow slopes or steps;
    • whether the 90° phase relationship stays stable;
    • whether there is any glitching while the handwheel is stationary.

    2. Separate “a problem with the handwheel itself” from “a problem with the interface or the parameters.” You can swap in an identical model of handwheel, or connect the handwheel cable directly to another input port known to be good. Narrowing it down to a specific interface makes the rest of the investigation much faster.

    8. Spare Parts Management: Why Model Identification Matters

    In day-to-day maintenance, a recurring situation is “we replaced the handwheel and now the machine won’t move.” The cause is often not a faulty handwheel but a spare part that differs from the original in a key attribute. Verifying a spare part should cover at least these dimensions:

    • Output form: open-collector, push-pull, or differential.
    • Supply voltage and input level: 5 V, 12 V, or 24 V.
    • Pulses per revolution: affects resolution and multiplier calculations.
    • Number of multiplier settings and how they are selected: buttons, DIP switches, or a rotary selector.
    • Dimensions and mounting: panel cut-out size and fixing hole positions.
    • Cable length and connector type: determines where it can be installed and how it is wired.

    From a management point of view, it is worth keeping a register of critical input components that records at least the installation location, specification parameters, purchase batch, replacement history, and observed fault symptoms. For critical equipment, these records can also be consolidated into general-purpose cloud capabilities such as object storage, log management, and monitoring and alerting, then combined with machine runtime data to analyze abnormal trends — gradually turning “replace it once it breaks” into “replace it ahead of failure based on trends.”

    9. Maintenance and Operating Practices: Minimizing Risk

    The handwheel is small, but how it is used and maintained has a direct bearing on machine safety:

    • Never plug or unplug under power. Stop the machine and cut the relevant power supply before connecting or disconnecting the handwheel connector, so the interface circuit is not subjected to a surge.
    • Keep it clean. Oil mist, coolant, and chips at turning and milling stations easily work their way into the handwheel’s gaps. Wipe it with a well-wrung soft cloth and avoid blowing compressed air directly into it.
    • Operate it gently. Avoid wrenching or flicking it hard, and do not treat the handwheel as a plaything. Stop and investigate any abnormal resistance.
    • Choose an appropriate multiplier. After coarse positioning, switch to a low multiplier for fine adjustment, and build the habit of “approach from far then near, coarse then fine.”
    • Verify periodically. After replacing a handwheel or servicing the system, redo position verification and a trial cut to confirm that actual movement agrees with the displayed multiplier.
    • Confirm the input range. Make sure the chosen handwheel output form is within the interface’s input specification, adding level shifting or pull-up/pull-down resistors if necessary.

    10. Conclusion

    The handwheel is one of the machine tool’s most down-to-earth human-machine interfaces. Its value lies not simply in the fact that it turns, but in the fact that how far one turn goes and in which direction can be understood by the system accurately and repeatably.

    From an engineering perspective, the handwheel is a classic “small component, full-chain” problem. Quadrature encoding determines the language of the signal, interface matching determines whether the signal is received correctly, multiplier and parameter configuration determine how the signal becomes displacement, and maintenance and spare parts management determine whether the whole system stays reliable over the long term. Work through those links and manage them properly, and this unremarkable small part can go on providing the last millimeter of reliable input that precision machining depends on.