Explainer
Mapping 5 stepper axes and 3 encoder inputs on a motion controller
Short answer
Four step and direction outputs go on JP7 pins 15-22, the fifth on JP5 pins 1-8, the three encoder inputs on JP7, and the 11 input bits on JP4 and JP6's 20 general-purpose 3.3 V I/O points. The generators and encoder inputs are fixed hardware functions that cannot be moved to other pins, and every limit-switch run belongs behind 24 V opto-isolation instead of on the non-isolated pins.

On this page
Four of the five step and direction outputs go on JP7 pins 15-22, the fifth on JP5 pins 1-8, all three encoder inputs on JP7, and the 11 input bits on the 20 general-purpose 3.3 V I/O points of JP4 and JP6 — with every limit-switch run behind 24 V opto-isolation rather than landing directly on the non-isolated 3.3 V pins. That is the complete map on KFLOP for five stepper axes, three position encoders and 11 input bits, whether KStep drives the axes or remote drive circuits replace it. The map is fixed because step and direction generators, encoder inputs and PWM outputs are hardware functions tied to particular pins, not signals software can steer anywhere. The pin budget below shows the arithmetic; the JP26 note shows what cannot serve as the fifth output.
Why the pins cannot be swapped #
On KFLOP, the step and direction generators, the encoder inputs and the PWM outputs are fixed-function hardware: each exists on the connector pins wired to it, and no software setting moves it to a different pin. A free-looking pin on another connector is not a spare generator. That constraint decides the layout order: count resources first — how many axes, how many encoders, how many input bits — then fit each resource to the connector that exposes it. A map built the other way around, wiring first and assigning afterwards, is what produces a fifth axis with nowhere to go.
The connector map for 5 axes, 3 encoders and 11 inputs #
| Resource | Needed | Where it lands |
|---|---|---|
| Step and direction outputs, axes 1-4 | 8 signals, 2 per axis | JP7 pins 15-22 |
| Step and direction output, axis 5 | 2 signals | JP5 pins 1-8, 2 of the 8 |
| Encoder inputs | 3 channels, 1 per encoder | JP7 |
| General-purpose 3.3 V I/O | 11 of the 20 points | JP4 and JP6 |
JP7 carries most of the load: its eight step and direction pins cover axes 1 through 4 at one step and one direction signal each, and the three encoder input channels sit on the same connector on their own pins. JP5 hosts the fifth axis's pair, using 2 of its 8 pins and leaving 6. The input bits fit with margin: JP4 and JP6 together carry the general-purpose logic-level points, and after the required bits are placed, 9 remain for home signals, drive-enable outputs or drive-fault returns. If the fifth pair never appears once JP5 is wired, the usual snag is pin sharing on that connector, and the page on resolving JP5 pin 36 and 37 conflicts with step and direction generator 4 walks through the exact pins involved.
The pin budget, worked through #
This is arithmetic on the documented pin groups for these counts — a planning calculation for these inputs, not a measured result.
- Outputs: 5 axes × 2 signals (one step, one direction) = 10 signals. JP7 pins 15-22 supply 8 pins, and 8 ÷ 2 = 4 axes. That leaves 5 − 4 = 1 axis short, which is 2 signals, covered by JP5 pins 1-8 with 2 of the 8.
- Encoders: 3 channels required, all exposed on JP7, so feedback adds no second connector to the map.
- Inputs: 11 bits required against 20 general-purpose points on JP4 and JP6, leaving 20 − 11 = 9 points spare for home, enable or drive-fault-return signals.
The assumption behind every line is 2 signal pins per axis and 1 encoder channel per encoder. Change the counts and the arithmetic moves with them: a sixth axis still has pin room on JP5 (6 remaining pins ÷ 2 = 3 axes of capacity) but only if the controller's step and direction generator count allows it.
JP26 on KStep is an input, not a fifth output #
JP26 on KStep looks like a way out when a fifth step and direction output is needed, but it runs the other way: JP26 is an input connector, an alternate method of feeding 4 step and direction signals into KStep. Signals go into KStep through it and nothing comes out, so it cannot drive a remote stepper drive. When KStep is replaced with remote drive circuits entirely, the step and direction signals leave KFLOP directly — the four pairs from JP7 and the fifth pair from JP5, wired out to the drives.
Cable length then becomes the wiring question. A step signal that arrives soft at a remote drive looks like the case described in why a differential step input voltage drop stops a stepper — the drive sees a level it cannot clock and the axis stands still.
Keep limit switches off JP4 and JP6 #
Do not land limit switches directly on the 3.3 V I/O of JP4 and JP6: those points are non-isolated, they expect 3.3 V LVTTL levels, and the inputs are fast enough to catch the narrow glitches that long machine wiring picks up, so noise reads as a limit event and halts an axis that never reached anything. Field limit circuits belong at 24 V behind opto-isolated inputs: KStep's 24 V opto inputs when KStep is in the loop, or a dedicated opto-isolated input board such as the Konnect when it is not — either converts the field signals to levels KFLOP accepts and isolates the controller from field faults.
The input bits still stand at 11 total, split across the two paths: whichever of them are limit switches move to the opto-isolated inputs, and the clean logic-level bits — fault returns conditioned to the controller's logic level, spare home signals inside the cabinet — sit on JP4 and JP6. For the polarity and sink-side wiring of opto-coupled switches, wiring PNP proximity switches to optocoupler inputs covers the details, and when a trip does happen, why a stepper axis stays blocked on a low limit after e-stop explains the condition that keeps the axis parked after the stop clears.
One boundary worth keeping straight: if any of these inputs feed an emergency stop or a guard interlock rather than an axis overtravel limit, that chain is a safety function. ISO 13849-1 requires the safety-related parts of a control system to be designed and validated to the performance level the machine's risk assessment calls for — the chain is engineered and verified as a system, not assembled from spare controller pins.
The decision for each case #
- Five axes, three encoders, 11 input bits, KStep driving the axes: four step and direction pairs on JP7, the fifth pair on JP5, three encoder inputs on JP7, and the input bits split between the logic-level points on JP4 and JP6 and the opto-isolated limit inputs.
- KStep replaced by remote drive circuits: the same map, with the step and direction pairs leaving JP7 and JP5 straight to the drives; JP26 is not part of the output side.
- False limit trips on an axis that never moved: the limit switches are sitting on the non-isolated logic-level pins — move them to the opto-isolated inputs rather than filtering the noise in software.
- A sixth axis later: JP5 has pin room for three more pairs at 2 pins per axis, and the real ceiling is the controller's step and direction generator count in its own documentation.
Questions asked
Can 24 V limit signals be divided down to 3.3 V with resistors instead of an isolation board?
A divider fixes only the voltage level. The input stays non-isolated, the signal still sits inside the small 3.3 V noise margin, and because the inputs are fast they still capture the narrow glitches that long machine wiring picks up, so false limit trips remain likely. Route 24 V field signals through opto-isolated inputs such as KStep's 24 V inputs or a Konnect input board, which convert the level and isolate the controller from field faults.
How many more stepper axes do these connectors have pin room for?
JP5 pins 1-8 carry step and direction pairs at two pins per axis, so the group holds four axes. The fifth axis uses two of the eight pins, leaving six pins, which is room for three more pairs. JP7 pins 15-22 are already full with axes one to four. The real ceiling is not the pins but the number of step and direction generators the controller hardware provides, so take that count from the controller's documentation before adding axes.
Where do the drive-enable outputs come from?
Enables are ordinary outputs, not fixed-function channels, so they come from the same general-purpose pool on JP4 and JP6 that carries the input bits. With 11 bits used, 9 points remain for enables, conditioned fault returns or spare home signals. If a drive's enable input needs 24 V, condition that signal through isolation like any other field signal rather than driving it raw.
Does each encoder need its own input channel?
Yes. Each encoder input channel decodes one encoder's quadrature signals, the A and B channels of a single encoder, so three position encoders occupy three channels. Those channels are on JP7 alongside the step and direction pins used by axes one to four, and they cannot be shared, split or moved to another connector because the encoder inputs are fixed hardware functions.


