A practical guide to PWM, analog, Modbus, RS-485, VFD wiring, controller setup, and compatibility checks
|
Important: A spindle does not connect directly to most CNC controllers. The controller sends a low-voltage control signal to the VFD, and the VFD powers and controls the spindle motor. Match the controller method, VFD input, cable, spindle, and safety wiring before applying power. |
The short version
Connecting a CNC spindle to a controller is mostly a compatibility and signal-matching exercise. Before you wire anything, identify how your controller commands spindle speed and direction: PWM, analog voltage, Modbus/RS-485, or a controller-specific interface.
· Buildbotics and Onefinity Black Box-style controllers commonly use PWM or a controller-specific interface.
· Sienci SuperLongBoard and SLB-EXT installations commonly use Modbus/RS-485 for automatic VFD control, although the exact board terminals and configuration must be verified.
· Mach4 systems commonly use PWM through the motion controller or breakout board. A different cable is usually required than the one used for a Modbus controller.
· LinuxCNC can support PWM, analog, or Modbus depending on the Mesa card, I/O configuration, and LinuxCNC setup. A custom Mesa installation must be treated as a custom integration.
Treat the controller cable and spindle cable as two separate parts of the system: one carries control signals between the CNC controller and VFD; the other carries VFD output to the spindle motor.
Understand the three parts of the connection
|
Part |
What it does |
What must match |
|
CNC controller |
Creates speed, start/stop, and sometimes direction commands. |
PWM, analog, Modbus/RS-485, output voltage, ground/reference, and direction capability. |
|
VFD |
Converts incoming power into controlled three-phase power for the spindle. |
Input voltage, motor power, frequency, current, control source, and parameters. |
|
Spindle motor |
Turns the cutting tool at the commanded speed. |
Voltage, power, rated frequency, current, connector, phase order, collet, and mount diameter. |
|
Never assume: A cable that physically fits is electrically correct. Connector shape, pin count, and wire colors are not enough to establish compatibility. |
Before you wire anything
Collect this information first. It prevents the common mistake of ordering a cable based on the machine name while overlooking the actual controller or VFD interface.
1. CNC machine brand and model.
2. Controller brand, model, and revision.
3. VFD model and input voltage.
4. Spindle power, voltage, rated frequency, current, connector, and mount diameter.
5. Whether automatic speed control is required or manual VFD operation is acceptable.
6. Whether the controller can command reverse direction.
7. The exact control cable and spindle cable currently installed.
For PwnCNC systems, begin with the Spindle System or the appropriate spindle kit page, then verify the controller option before ordering.
PWM, analog, and Modbus: what is the difference?
PWM control
PWM—pulse-width modulation—uses a changing duty cycle to represent requested spindle speed. The controller generally provides a PWM signal, a reference or ground, and a start/enable output. The VFD converts that command into frequency and motor speed according to its programming.
· PWM requires correct signal and reference wiring.
· The controller’s minimum and maximum spindle-speed range must agree with the VFD’s programmed frequency range.
· PWM may provide start/stop and speed without providing reverse unless the controller also has a direction output or relay.
Analog voltage control
Some controllers use a variable analog voltage—often 0–10 V—to command VFD frequency. The VFD must be configured for the correct analog input and reference. Do not connect an analog output to a terminal intended for RS-485 data or a digital input.
Modbus/RS-485 control
Modbus over RS-485 is digital communication. The controller can send speed, start/stop, direction, and status commands to the VFD, but both devices must agree on polarity, baud rate, address, parity, and register behavior.
· RS-485 wiring is polarity-sensitive: match A/B or +/− according to that controller’s documentation.
· Some boards label terminals differently, so wire colors are never universal.
· If the VFD responds but RPM is wrong, communication may work while the frequency range or VFD parameters are incorrect.
Buildbotics and Onefinity Black Box controllers
Buildbotics-based controllers, including Onefinity Black Box-era configurations, use a controller-specific spindle interface. The setup depends on controller version, VFD, and whether the installation uses PWM or another supported interface.
PwnCNC documents the relevant setup under Onefinity Black Box controllers.
8. Confirm the controller spindle-control mode in its configuration screen.
9. Use the control cable intended for that controller—not a cable intended for a Sienci Modbus installation.
10. Verify the VFD is configured for external run and speed commands rather than keypad-only control.
11. Confirm the controller maximum RPM matches the spindle operating range.
12. Test start/stop at low speed with the tool removed.
|
Common symptom: If the VFD shows an error or waits for a command when the controller is disconnected, that may simply indicate automatic control is selected but no controller signal is present. |
LinuxCNC and Mesa control cards
LinuxCNC is highly configurable, so there is no single LinuxCNC spindle pinout. A Mesa card, breakout board, or custom I/O board may provide PWM, analog output, digital direction, or serial communication depending on the hardware and configuration.
Identify the actual signal path: LinuxCNC configuration → Mesa or motion card → breakout/terminal board → VFD input. A Mesa-based Avid or custom machine may be compatible, but the installer must confirm signal levels and pin assignments.
· Use PWM or analog only if the selected Mesa hardware provides the appropriate output.
· Use Modbus/RS-485 only if the hardware and LinuxCNC configuration support the required serial interface.
· Provide a separate digital output or relay for forward/reverse if reverse is required.
· Confirm common/reference wiring and electrical isolation before connecting the signal.
· Do not guess a pinout from a different Mesa card, Avid machine, or LinuxCNC configuration.
PwnCNC references PWM-compatible controllers and Modbus-compatible controllers.
|
For custom LinuxCNC builds: Send the controller model, Mesa card model, breakout-board photos, VFD model, and intended PWM/analog/RS-485 wiring before ordering a cable. A machine manufacturer or integrator may be the best source for final terminal mapping. |
Mach4 and Avid CNC controllers
Mach4 does not define one universal spindle cable because the actual I/O is provided by the motion controller or breakout board. Avid CNC systems commonly use PWM for VFD speed control, so a cable made for a Sienci Modbus installation is generally not the correct cable for an Avid/Mach4 installation.
For Avid wiring guidance, review the Avid controller installation guide.
A practical Mach4 installation usually requires:
· A PWM or analog speed signal from the motion controller to the VFD.
· A signal reference/common as specified by the VFD and motion hardware.
· A run/enable output, relay, or digital signal.
· A direction output if reverse is required.
· Mach4 spindle settings that map commanded RPM to the VFD range.
Large machines may also need a larger spindle than a typical 1.5kW or 2.2kW system can take advantage of. Evaluate rigidity, Z-axis capacity, mount design, circuit capacity, and tooling together.
Sienci SuperLongBoard and SLB-EXT controllers
Sienci SuperLongBoard installations can be confusing because board labels and documentation may distinguish PWM and Modbus sections. For automatic VFD control, the SLB/SLB-EXT setup may use RS-485 Modbus rather than the PWM spindle port.
Use the current Sienci SuperLongBoard / SLB-EXT guide and enlarge the wiring images before making connections.
13. Confirm whether the installation uses PWM or Modbus. Do not mix the diagrams.
14. Locate terminals explicitly labeled for Modbus/RS-485 on the exact board revision.
15. Match A/B or positive/negative according to board and VFD documentation; do not rely on red/black assumptions.
16. Connect the controller cable to the VFD communication/control terminals specified for that cable.
17. Set the VFD to automatic control and enter required Modbus parameters.
18. Test the controller connection before running a job.
|
Important SLB-EXT detail: A system can work manually while automatic control fails. That usually means the spindle, motor cable, and VFD power section function, while controller communication wiring or configuration still needs attention. |
If RX/TX indicators do not flash during a command, check the controller-side wiring, selected port, communication settings, and board firmware/configuration. If the VFD responds but RPM is incorrect, stop changing random parameters and compare the complete configuration against the expected spindle setup.
VFD programming: the part people skip
A correct cable cannot compensate for incorrect VFD parameters. The VFD must know whether run commands come from its keypad, terminals, PWM/analog input, or Modbus. It must also know the spindle rated power, frequency, current, and speed.
· Input voltage and motor power must match the actual spindle system.
· Maximum and upper motor frequency must match the spindle rated frequency.
· Acceleration/deceleration times must suit the spindle and controller.
· Motor rated current must be set correctly.
· Automatic run and frequency sources must be selected.
· Forward/reverse inputs or Modbus direction commands must be intentionally configured.
· Display scaling must be correct if the VFD should show RPM rather than raw frequency.
PwnCNC’s spindle system documentation includes setup and default-programming references.
|
Do not reset a plug-and-play VFD casually: A factory reset can erase settings that make the VFD match the spindle and controller. If a working system now shows incorrect RPM or errors, document current values and verify the intended configuration before changing more parameters. |
Testing the connection safely
Complete the initial test with the cutting tool removed and the spindle safely mounted. Keep coolant circulation running for a water-cooled spindle, and keep hands clear of the motor and collet.
19. Turn off power and inspect every connection.
20. Confirm the spindle cable is on the VFD output and the controller cable is on the correct control port.
21. Verify grounding and shielding according to the VFD and spindle documentation.
22. Power the VFD and controller without starting the spindle.
23. Confirm the VFD is in the expected automatic/manual mode.
24. Command a low, valid spindle speed from the controller.
25. Confirm the VFD and controller displays show sensible values.
26. Test stop, then forward. Test reverse only if configured and safe.
27. Run the spindle warm-up procedure before cutting.
28. Stop immediately for wrong rotation, implausible RPM, VFD alarms, or unconfirmed coolant flow.
Troubleshooting by symptom
|
Symptom |
Most likely areas to check |
|
VFD works manually but not from CNC |
Controller mode, control cable, signal port, automatic source, RS-485 polarity, or PWM/analog configuration. |
|
VFD waits at M3 or job pauses |
Controller is waiting for a spindle-ready response, communication is not established, or the VFD mode is wrong. |
|
RPM is much lower/higher than commanded |
VFD frequency limits, motor rated frequency, display scaling, controller min/max RPM, or PWM scaling. |
|
Forward works but reverse does not |
Controller lacks a direction output, reverse is disabled, or protocol does not include direction. |
|
VFD errors after reset |
Spindle-specific parameters were erased or changed. Stop editing randomly and restore correct configuration. |
|
RX/TX lights never flash |
Wrong port, wrong cable, incorrect A/B wiring, disabled Modbus, firmware/configuration issue, or no command sent. |
Choosing the right PwnCNC cable
PwnCNC offers controller-specific control cables and spindle-to-VFD cables. The right selection depends on the controller communication method—not simply spindle power or the motor connector.
Review available control cable options for the controller interface.
Review the spindle cable for the VFD-to-motor connection.
· A cable for Sienci Modbus is not automatically correct for Mach4 PWM.
· A Masso cable is not automatically correct for Redline or Buildbotics.
· A custom spindle connector, such as GX16-4, may be possible, but request it before ordering.
· When converting an existing spindle to a new VFD, verify the motor connector and pinout rather than cutting and guessing.
Compatibility checklist before ordering
· Machine brand, model, and working area.
· Controller brand, model, and board revision.
· PWM, analog, Modbus/RS-485, or other spindle-control method.
· VFD model and input voltage.
· Spindle power, rated frequency, current, connector, collet, and diameter.
· Mount diameter and Z-axis lifting capacity.
· Available circuit and plug type.
· Need for forward/reverse operation.
· Air or water cooling requirements.
· Photos of controller terminals, VFD terminals, spindle connector, and current installation.
If you are unsure, submit a free CNC Upgrade Review before purchasing. Include clear photos and model numbers.
Final thoughts
The right spindle connection is not determined by the spindle alone. It is the complete path from controller software to controller hardware, control cable, VFD input, VFD programming, spindle cable, and motor. When those pieces agree, automatic spindle control can be reliable and repeatable.
Identify the control method first, use the cable intended for that method, verify VFD programming, and test in a controlled state before cutting. If the controller is custom or wiring is unclear, provide full system details rather than relying on connector appearance or a generic diagram.
Need help choosing the right setup? Review the PwnCNC Spindle System and include your machine, controller, VFD, and wiring details when requesting a free CNC Upgrade Review.
|
Before ordering: A clear photo of the controller terminals, the VFD label, and the spindle connector can prevent an expensive wiring mistake. When in doubt, ask before applying power or cutting a connector. |








