Encoder VFD two-speed positioning with a homing reference

8 min read · Published November 10, 2026

Calculate the encoder rate before anything is wired: pulses per second equals PPR times shaft revolutions per second, and 4x quadrature decoding multiplies that count rate by four. A 100 PPR encoder at 600 rpm counts at 4 kHz, which fits a 7 kHz PLC quadrature input; past 1050 rpm the same encoder overruns it and a counter card is the fix. Wire NC end limits straight to the drive and home to a limit, then creep back.

A VFD-driven axis with shaft-mounted encoder feedback is a position loop built from ordinary parts: the encoder into a high-speed counter input, two preset speeds stored in the drive, and direction plus speed-select contacts from PLC outputs. The operator types a target in millimetres on the HMI and starts the move. The step that decides whether the axis holds position at speed is arithmetic done before any wire lands: pulses per second equals pulses per revolution times shaft revolutions per second, and quadrature decoding multiplies the count rate by four. Keep that number under the PLC input's rating, set the counts-to-millimetres scale from the real screw and mounting, and give the axis end limits and a home reference that live outside the PLC program. The numbers below carry through a 100 PPR encoder on a 5 mm pitch screw with an endpoint at each end of travel.

How fast does a 100 PPR encoder signal run at full speed?

At 600 rpm a 100 PPR encoder pulses at 1 kHz on each channel, and 4x quadrature decoding turns that into a 4 kHz count rate, so the input you pick must be rated above 4 kHz before any wire lands.

The rule is one line: pulses per second equals PPR times shaft revolutions per second, and revolutions per second is rpm divided by 60. The rule runs in reverse too: a 1000-line encoder whose channel pulses at 16.667 kHz is turning at 16.667 rev/s, which is 1000 rpm. Keep the two datasheet meanings apart. PPR counts pulses on one channel; decoded counts per revolution are that number times the decode multiplier, and counters decode quadrature at 1x, 2x or 4x per line. Compare the channel pulse rate against the input's rated signal frequency and the decoded rate against the counter's rated counting frequency, using the multiplier your counter configuration actually runs. A kHz pulse train belongs on a high-speed counter input, not on an ordinary input scanned once per program cycle; how that capture works is in counting a pulse signal with a PLC high-speed counter input.

What does the 100 PPR at 600 rpm example give on a 7 kHz input?

The 100 PPR encoder on a 5 mm pitch screw running 600 rpm produces 1 kHz per channel and 4 kHz decoded, which sits under a 7 kHz quadrature input with 3 kHz of margin, so no counter card is needed at that speed.

The arithmetic:

  • 600 rpm ÷ 60 = 10 rev/s at the screw
  • 100 PPR × 10 rev/s = 1,000 pulses/s = 1 kHz on channel A
  • 4x decode: 4 × 1 kHz = 4 kHz count rate
  • 7 kHz rating - 4 kHz rate = 3 kHz of margin

The same input runs out of room at 7,000 ÷ (4 × 100) = 17.5 rev/s, which is 1050 rpm. Command the axis past 1050 rpm and the 4x count rate crosses the rating; the fixes are a counter card rated for the new number, a lower-PPR encoder, or a lower fast speed.

Fast speed Channel A rate 4x count rate Verdict on the 7 kHz input
600 rpm 1 kHz 4 kHz 3 kHz of margin, no card
1050 rpm 1.75 kHz 7 kHz at the rating, zero margin
1500 rpm 2.5 kHz 10 kHz over the rating, counter card

The decode multiplier is doing real work in that table: at 1x the 1500 rpm run is a 2.5 kHz channel rate, inside the rating, but the scale drops from 0.0125 mm per count to 0.05 mm per count. Rate and resolution trade against each other, and the input rating is the wall they hit.

How do you convert counts into millimetres on a 5 mm pitch screw?

With the encoder mounted on the screw and 4x decoding, 100 PPR becomes 400 counts per revolution, so travel per count is 5 mm ÷ 400 = 0.0125 mm, and a 50 mm move is 50 ÷ 0.0125 = 4,000 counts.

The scale starts at the encoder mount and runs through any gearing to the screw. Encoder directly on the screw: 100 counts per revolution at 1x gives 5 mm ÷ 100 = 0.05 mm per count; at 4x it gives 400 counts and 0.0125 mm per count. Encoder on the motor behind a 10:1 reducer: the screw turns once per ten motor revolutions, so 400 counts per motor revolution become 4,000 counts per screw revolution, and 5 mm ÷ 4,000 = 0.00125 mm per count. Enter the scale that matches the configured decode multiplier; a 1x scale in a 4x counter puts every move out by a factor of four. Check the scale on the machine: jog a measured 50 mm at low speed, divide distance by the count change, and correct by the measured ratio. The same calculation with the gear ratio written out, including the quadrature multiplier, is set out step by step in calculating RPM from encoder pulses, PPR, quadrature and gear ratio.

What do you need before wiring the axis?

You need a two-channel encoder sized by the first section's arithmetic, a VFD with FWD and REV terminals plus two preset speed selects, an NC limit switch with an auxiliary NO contact at each end of travel, and a PLC input rated above the count rate.

  • Encoder with A and B channels; Z is optional and makes the home reference repeatable.
  • VFD with at least two preset speed references selectable from discrete terminals, plus FWD and REV.
  • NC end switches whose NC contact sits in the drive's per-direction enable path and whose NO contact lands on a PLC input. Dual-contact switches make this one device; two stacked microswitches do the same job.
  • A PLC with a quadrature-capable high-speed input rated above the count rate. Built-in quadrature inputs on compact PLCs are rated in single-digit kHz, and some low-cost families ship no high-speed input at all, in which case a counter card joins the list.
  • An HMI for the target entry and the tuning values.

Keep the drive commands on plain terminals for this build. Register writes over Modbus RTU work too once the discrete layer behaves; controlling seven VFDs from an HMI panel over Modbus RTU shows what the register route looks like.

How does the two-speed move sequence work, step by step?

The PLC compares the target with the current count to pick the direction output, holds the fast preset until the remaining distance reaches the slow-down threshold, drops to the slow preset, and stops the move when the count crosses the stop threshold tuned on the machine.

  1. Wire channels A and B to the quadrature input pair and spin the shaft by hand: the live count must rise one way and fall the other. A count that never changes sign points at the B channel wiring first.
  2. Enter the scale from the conversion section, jog a measured 50 mm, and correct the scale by measured distance ÷ commanded distance.
  3. Set the fast and slow preset speeds in the VFD and switch each one on from the PLC outputs with the load uncoupled.
  4. Write the move: direction from the sign of target minus position; fast while remaining distance is above the slow-down threshold; slow while it is above the stop threshold; outputs off at the stop threshold.
  5. Tune the slow-down threshold against coast. The axis coasts after the fast-to-slow switch, and coast grows with fast speed and load, so log the travel between switch point and stop point across ten runs and set the threshold above the worst case.
  6. Clamp the HMI target between the two limit positions in PLC logic before the sequence reads it; clamping HMI numeric entry limits in ladder logic shows the pattern.

What protects the axis at each end of travel?

Wire each end switch so its NC contact sits in the drive's enable path for the direction that runs into it, so the contact opening alone cuts that direction's motion, and land the NO contact on a PLC input so the program learns the axis has reached the end.

Safety note: the NC-to-drive path is the one protection that still acts with the PLC off, faulted or miscounting. Keep it wired through every stage of development and test it at creep speed, in each direction, before every tuning session.

The two contacts do different jobs. The NC pair stops the drive; the NO input tells the program where the axis is, and the homing step and the program's travel fence read it. Keep the software comparison in the logic as a fence, and keep the wired NC path as the stop. Home before trusting any target: drive to the limit at creep speed, reverse a short distance, re-approach slowly, and latch the home count at the first Z pulse, or at the limit edge if the encoder has no Z. The crept-back edge repeats far more closely than the crash-stop edge, which is the whole reason for the two-step approach.

How do you check the axis stops where it should?

Run the same 50 mm move five times and compare final counts: repeatability within two counts, which is 0.025 mm at the worked scale, passes; a constant offset from target means the scale is off by that ratio; error that grows with speed means counts are being missed.

Then run the checks that tell those cases apart:

  • Live count by hand, both directions: it must rise and fall. A count with no sign change points at channel B wiring or the counter's decode configuration.
  • Speed step-up under power: watch the live count for flat spots. A flat spot at speed is a missed count, and missed counts accumulate as position error; the monitoring pattern that catches them in logic is in encoder count monitoring with PLC logic to catch lost motion.
  • Known travel: command 4,000 counts and measure the result with a rule. It should read 50 mm; a constant ratio error is a scale error.
  • Limit test at creep speed, each direction: the drive must stop on the NC contact while the program only reports the NO input.
  • Re-home and compare: the home count should land within a count or two of the last session's home count. A drifting home points at the approach speed into the reference edge, so slow the creep step down.

Once the axis holds position, the cell often gains a separate status or notice board beside the HMI; that offline playback job is what the screens in our factory category are built for.

Recommendation: Size the encoder input before buying anything: compute PPR × rpm ÷ 60, multiply by 4 for quadrature, and choose an input rated above that number at the fastest speed the axis will ever be commanded. Past 1050 rpm with a 100 PPR encoder, a 7 kHz quadrature input is over its limit, so fit a counter card rated for the new figure. Wire the NC end limits to the drive independent of the PLC, and home to a limit, then creep back, before the first HMI target is entered.

Questions

What happens when the encoder count rate exceeds the PLC input's rating?

The input misses counts, and each missed count becomes permanent position error: the axis stops short or long by the lost amount. The fault hides at creep speed during testing and appears at full speed in production, which is why the symptom seems to come and go. Recompute the rate at the fastest commanded speed with the decode multiplier applied, then move to a counter card rated above that figure.

What is the highest encoder frequency a controller input accepts?

Dedicated motion controller receivers document an absolute maximum near 10 MHz of signal frequency, which is a 40 MHz count rate, and their own guidance still keeps a safety margin below that. Compact PLC inputs sit orders of magnitude lower, at a few kHz: about 5 kHz on one family's DC-input versions and 7 kHz on another's quadrature port. Take the rating from your controller's manual and size against it.

Does the Z channel change the rate or the scale?

Neither. Z gives one pulse per revolution on its own channel, so it adds almost nothing to the input's load, and the counts-to-millimetres scale stays keyed to A and B. Its job is the homing marker: latch the home count at the first Z edge after the crept-back approach, and the reference repeats to within a count or two of the same physical spot, run after run.

Why keep the VFD commands on discrete terminals instead of a network?

A meter across a discrete input shows the command state in seconds, and the same dry contacts work on a replacement drive of any make, so a Friday-night failure costs a swap rather than a configuration session. Register writes over Modbus RTU do the same job once the wiring behaves, and they become the practical route when terminal counts run short.

Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.

Keep reading

Build your signAsk for a quote