Explainer
Why a Phantom Closed Loop Stepper Still Needs PID Gains
Short answer
With MI910 set to 8, the axis feeds back the accumulated count of pulses its own channel generated, so the loop error - commanded position minus that count - is a real, nonzero signal the PID terms use to drive the pulse frequency modulator. Keep the documented internal-loop stepper values for Ixx30-Ixx35 and Ixx68, set Ixx34 to the documented integration mode for this output, and verify travel independently.

On this page
- What the decoder counts when MI910 is 8
- Why the error is not always zero
- What the PID terms actually drive
- The decision for Ixx30-Ixx35, Ixx34 and Ixx68
- Counting one move end to end: 10,000 counts commanded, 0.5 revolution moved
- Fault signs on an internal-loop axis
- What the phantom loop cannot see
- Questions asked
Keep the gains. With MI910 (Encoder/Timer n Decode Control) set to 8, the axis feedback is the accumulated count of pulses the channel itself generated, so the position loop subtracts that count from commanded position - a real subtraction with a nonzero result during any move. The PID terms drive the pulse frequency modulator, not the rotor. Zeroing Ixx30-Ixx35 and Ixx68 discards the correction that keeps the emitted pulse train locked to the trajectory; leave them at the manufacturer's documented internal-loop stepper configuration, set Ixx34 (PID Integration Mode) to the documented mode for this output type rather than to 1 on a guess, and read reported position as pulse bookkeeping that says nothing about the rotor.
What the decoder counts when MI910 is 8 #
The 16-Axis MACRO CPU SRM states it plainly: "If MI910 is set to 8, the decoder inputs the pulse and direction signal generated by Channel n's pulse frequency modulator (PFM) output circuitry." The same manual describes the result as a phantom closed loop for driving an open-loop stepper from a 16-Axis MACRO Station. Your feedback register therefore holds the pulse generator's accumulated output. It measures no mechanics at all: not rotor angle, not coupling wind-up, not load position. That is the boundary behind whether an encoder makes a stepper motor closed loop - a loop is only as closed as the quantity its feedback actually measures.
Before touching a gain, confirm the axis reads this channel's decoder, and that the channel assigned to the pulse output is the one driving your motor. A correct MI910 value on the wrong channel, or an axis pointed at a different feedback source, builds a loop that counts something other than the pulses commanding the motor.
Why the error is not always zero #
The premise behind zeroing the gains - that the controller simply copies commanded position into the feedback register - does not survive the signal path. Commanded position comes from the trajectory generator and advances as a computed value at every update. Feedback comes from the decoder counting pulses that physically left the PFM, at a rate the loop's own output sets. Two different signals, one subtraction:
internal following error = commanded position - generated-pulse feedback position (counts)
Pulses are discrete and finite in frequency; the trajectory is continuous. Under acceleration the command runs ahead of the emitted count and the error grows. In cruise the loop has raised the frequency command until both advance at the same rate, and the error holds steady. When the command stops, the counts still owed are emitted until the error returns to zero.
What the PID terms actually drive #
In this architecture the loop output is a frequency demand: the PID sum tells the PFM how fast to emit pulses. The proportional term turns instantaneous count error into added pulse rate. The integral term removes steady offset so the final emitted count equals the commanded count exactly - and in an open-loop stepper, the total emitted count is what decides where the axis stops, lost steps aside. The derivative term damps the frequency response so the pulse train does not overshoot the count. Whichever of Ixx30-Ixx35 holds each term in this controller family, their job here is to servo the pulse generator, not the motor.
Ixx34 (PID Integration Mode) governs how that integral accumulates and clears, so it changes how the loop behaves at the end of every move. Ixx68 belongs to the same documented output path; its definition in the controller's servo chapter decides what it does here. Neither is a number you derive from the absence of an encoder.
The decision for Ixx30-Ixx35, Ixx34 and Ixx68 #
- Keep the manufacturer's documented internal-loop stepper configuration as the baseline. Factory defaults are that baseline only where the manual identifies them for internal-feedback, pulse-output operation, so verify each variable against its own definition.
- Do not zero the range. A stationary zero error is a settled loop, not a disabled one; zeroing removes the correction that makes the emitted count follow the trajectory.
- Set Ixx34 to the documented integration mode for this output type, not to 1 on the strength of its name.
- Read the output-path description in the controller reference first, so you know which terms drive pulse frequency and what feedforward, if any, the configuration uses.
This is a different exercise from an axis with measured feedback in the loop; tuning a pulse-and-direction stepper in closed loop covers that case, where the gains act on real error and earn real tuning passes.
Counting one move end to end: 10,000 counts commanded, 0.5 revolution moved #
This example is calculated, not measured. The two scaling values are illustrative, and each is the kind of number you take from your own setup: the axis position scaling in the controller and the pulse-input configuration in the drive.
Inputs:
- Controller scaling: 10,000 counts per motor revolution.
- Drive input scaling: 20,000 pulses per revolution.
- Command: 10,000 counts at 20,000 counts/s.
- Feedback path: MI910 = 8 (Internal pulse and direction), so the decoder counts the channel's own PFM output, per the 16-Axis MACRO CPU SRM.
Rule in words: internal following error is commanded position minus the accumulated generated-pulse count; machine travel is emitted pulses divided by the drive's pulses per revolution.
Arithmetic:
- Duration: 10,000 counts / 20,000 counts/s = 0.5 s.
- At settle the loop has emitted one pulse per commanded count: 10,000 pulses. Error = 10,000 - 10,000 = 0 counts, and the axis reports in position.
- Travel: 10,000 pulses / 20,000 pulses per revolution = 0.5 revolution.
- Shortfall: 1.0 revolution commanded - 0.5 revolution moved = 0.5 revolution, a 50 percent travel error with zero counts of following error.
The loop is perfectly satisfied and the machine is half a turn short. Every term follows from the two scalings, so the conclusion holds at any ratio: a phantom loop can be exactly right about pulses and exactly wrong about travel. Measure travel independently - a dial indicator, a linear scale, a tape on a coarse axis - on the first commissioning move and after any change to either scaling. A disagreement between commanded and measured travel is a scaling mismatch; fix the ratio before touching a single gain, because no gain setting closes it.
Fault signs on an internal-loop axis #
Because the loop watches only generated pulses, each symptom points at one layer:
- Commanded position changes, feedback does not: check axis enable, output channel assignment and decoder routing before anything mechanical.
- Feedback follows the command, the motor does not move: check drive enable, pulse wiring and the drive's input configuration, because internal tracking is not motor motion.
- Command and feedback agree, travel is wrong: drive scaling or transmission ratio, as in the worked example.
- Position drifts under load: the pulse count is right but the motor is not converting it into motion; check the motion profile and available torque.
What the phantom loop cannot see #
Everything downstream of the pulse generator is invisible to this loop, and reported position stays perfect while the machine is out of position. For machine safety, never use this axis's reported position as proof of safe position for guards or interlocks; the risk assessment must assume position can be wrong with no fault raised. If the application needs the loop to see the load rather than the generator, that means real feedback at the load, and tuning a closed-loop stepper with linear scale feedback is the route that buys position integrity.
Questions asked
Should Ixx34 (PID Integration Mode) be set to 1 on an internal-loop stepper?
Only if the controller documentation names 1 as the integration mode for internal-feedback, pulse-output operation. Ixx34 governs how the loop accumulates and clears integral action, and that integral is what lands the emitted count exactly on the commanded count at the end of a move. The parameter name alone justifies no value; take the mode from the documented internal-loop configuration and leave it there.
Is it safe to leave Ixx30-Ixx35 and Ixx68 at factory defaults?
Yes, as the starting point, provided the manual ties those defaults to internal-feedback, pulse-output operation rather than an encoder axis. Before editing anything, record the current values and save a configuration you can restore. Then change one variable at a time and repeat a single limited move, keeping a change only while commanded position, feedback and following error all stay controlled.
Can the phantom loop detect lost steps or a stall?
No. Feedback is the count of generated pulses, so anything downstream of the pulse generator - a stall, lost steps, a slipping coupling, jumped belt teeth - leaves reported position perfect while the machine is out of position. Re-home after any stall, crash or overload event before trusting coordinates again.
Why does following error read nonzero during a move if there is no encoder?
Because the two compared signals are genuinely different: commanded position from the trajectory generator, feedback from pulses that have physically left the PFM. During commissioning, watch that the error returns to zero at standstill and stays there; if it grows during cruise, pulse generation is not keeping up, so stop and investigate before raising speed.
