5. Connecting a spindle/VFD

Exercise caution when configuring the spindle on your machine; powerful spindles are extremely dangerous and can cause injury or death if mishandled. Ensure that you keep your fingers clear of the spindle, the area around the spindle is clear, and no tool is installed unless explicitly instructed otherwise. Disconnect the machine from mains power as always when making changes to the wiring of the machine, as mains voltages are deadly. Even a VFD that was recently connected to power may still have a charge, consult the manual of the VFD to ensure safe conditions when touching the connection points.
To connect a spindle to the controller, it is important to determine the type of connection needed. In general, all spindles and VFD combinations fall into one of the following categories. Some may be able to be configured to function in multiple ways.
Regardless of connection type, the spindle must be connected safely. Ensure that the connections follow local regulations for safety, this may include a safety relay to cut power to the device in emergency conditions. Be sure that you can turn the device off in an instant, especially during setup.
Types of VFD control
Most VFDs will have two signals for controlling them:
- Signal to control the speed
- Signal to control the VFD on/off status
To control the speed, we use a 0-10V signal. 0V is the lowest RPM, and 10V is the highest RPM. Please note that 0 volts does not always correspond to 0 RPM; this can be configured in our software, as some spindles have a minimum speed.
It's also important to understand that controlling a VFD solely via 0-10V is unsafe, as any signal on these wires could activate the spindle.
However, for switching the drive on and off, there are two types of control of a VFD:
Type 1: Tool On/Direction Type 2: Clockwise (CW, FORWARD) / Counter-clockwise (CCW, REVERSE)
Both types are supported, but please check your manual and/or set up your drive accordingly. We will show how both types can be controlled.
Please note that the direction is determined by looking at the spindle from the top down.
We will show for both types how they can be controlled.
Type 1: Tool on/ Direction
This type of VFD uses two signals to control it. One signal switches the VFD on and off, and the other controls the spindle direction.
The table below shows how the controller uses the signals.
Tool on output | Tool direction output | Spindle behavior |
|---|---|---|
Off | Off | Off |
Off | On | Off |
On | Off | Turning clockwise* |
On | On | Turning counter-clockwise* |
*The direction may need to be set up in the configuration parameters for the VFD, consult the VFD’s manual for this. Verify that the direction is correct before using the machine.
In the VFD manual, locate the Tool On and Direction connections.
In most cases, there is a connection overview diagram. The diagram in the manual will look very similar to the ones below.

The designation for these signals can vary; as you can see, it's possible that the designation is cryptic, like 'S1'. The manual will describe how to configure the signal to be Tool On.
Also, the designation for the 0-10V control voltage may differ. However, most images will show similar connections.
Before continuing, make sure you have the VFD configured manually and test the signals by hand
Using a relay.
The connection between the inputs and the DCM signal does not indicate whether the DCM signal is 24V or ground. This can vary between manufacturers.
It's therefore advisable to use a small relay to connect the DCM signal and the inputs, and have the controller control these relays to avoid any issues with switching these signals.
Note that the relay should have an antiparallel diode to prevent spikes from relay switching from reaching the controller outputs. The relay that is used does not need to be very powerful, since almost no current will flow. An option is to use a DIN rail-mounted relay.
Below is an example of such a relay. In this case, it is a Phoenix Contact RIF-0-RPT-24DC/21 (SKU: 2903370).


Wiring
The CNC720 has only an output for tool on but no signal for a tool direction output.
Before connecting the VFD to the CNC720spindle, program the VFD configuration parameters to match the spindle. Find the parameters that allow external control of the spindle through the inputs on the VFD, and the speed control voltage reference is set to 10V or the control type is set to PWM.
Both outputs on the CNC720 can be inverted, but keep in mind that it is recommended to wire the VFD in a way that the spindle is off when both outputs are off. Doing this will ensure the spindle shuts off if the controller fails.
Speed control can be done using either 0-10V or PWM. The CNC720 is capable of supplying either option. The most common is 0-10V, where 0V corresponds to the minimum RPM and 10V to the maximum RPM. When choosing PWM, you may need a pull-up resistor to achieve the upper voltage expected by the VFD. The CNC720 contains user-selectable pull-up resistors to simplify wiring. The usage of 0-10V voids the PWM1 output.
In the picture above, you can see what's inside on the right. Besides the relay, you also see the diode, and, as a bonus, an LED indicator that helps you check your wiring.
The outputs on the CNC720 are so-called 'Open collector outputs.
In the manual for the VFD, find the connections for Tool on and Direction, in most cases, there is a connection overview diagram. The outputs on the CNC720 feature relay outputs, these can be connected instead of the switches.
Speed control can be done using either 0-10V or PWM. The CNC720 is capable of supplying either option. The most common is 0-10V where 0 volts means minimum RPM and 10 volts means the maximum RPM. When choosing PWM, you may need a pull-up resistor to achieve the upper voltage expected by the VFD. The CNC720 contains user-selectable pull-up resistors to simplify wiring. The usage of 0-10V voids the PWM1 output.


Configuration
Navigate to Setup -> Toolhead -> Toolhead and ensure that On/off output for the main toolhead is set to TOOL OUT.

When using the tool direction, set Direction output to AUX1 OUT.

Ensure that the PWM output setting is set to PWM1 OUT when using speed control.

The value entered in the Minimum RPM setting is used to correct programming errors where an S value is used that is too low.
The Maximum RPM setting is used to map the programmed RPM to a 0-10V or PWM value, The RPM entered here is the RPM the spindle turns at the full 10V or 100% PWM.

Setting the ramp-up and ramp-down delays will pause the execution when M3, M4, and M5 are called. This allows the spindle to reach its programmed position before executing the next line in the job file.

Testing
Ensure that the spindle does not contain a tool and is free to rotate without obstructions.
- Power the machine up and start the software.
- Press reset to enable the machine.
- Go to the IO tab.
- Ensure that both TOOL and TOOL DIR (or substitute outputs) are turned off.
- Set the used PWM output to a value accepted by the VFD (e.g. 50%)
- Click TOOL, the spindle should start turning in a clockwise direction.
- Click TOOL again, the spindle should stop turning.
- Click TOOL DIR (or substitute), nothing should happen aside from possibly a relay clicking.
- Click TOOL, the spindle should start turning in the counter-clockwise direction.
- Increasing the PWM value should increase the RPM of the spindle.
- Click TOOL, the spindle should stop turning.
These tests ensure that the basic connections of the spindle are correct.
- Open the MDI
- Enter M3 Sx where x is the minimum speed, the spindle should start turning in the correct direction at the speed programmed.
- Enter M3 Sx where x is the maximum speed, the spindle should ramp up to the maximum speed.
- When using direction, enter M4 Sx with an arbitrary speed. The spindle should change direction.
- Enter M5, the spindle should come to a standstill.
Troubleshooting
Here are some common issues and their solutions:
- The spindle turns off then it should turn on or vice versa. Ideally, the VFD is wired in a way that the spindle turns on when the respective output is on. If this is impossible, the output can be inverted in Setup -> Input/output -> Invert IO signal level.
- The spindle turns in the wrong direction. First, double-check that the VFD is wired and programmed correctly. If necessary invert the tool direction output in Setup -> Input/output -> Invert IO signal level.
- The speed control works inverted. For example, the spindle ramps up when the S value goes down. In some cases, the speed control output may need to be inverted. This output can be inverted in Setup -> Input/output -> Invert IO signal level.
- The set S value does not correspond to the actual spindle RPM. First of all, ensure that the minimum and maximum RPM in the setup are set correctly. The spindle speed curve may not be fully linear if these are set correctly. If this is the case PWM compensation may be used to compensate for this non-linearity.
VFD/Spindle Type 2: Clockwise (CW) / Counter-clockwise (CCW)
This VFD type connects to the controller using a connection for clockwise rotation (CW) and one for counter-clockwise rotation (CCW). The markings on your EdingCNC controller are named tool on and tool direction in case tool direction is not available, an aux output must be used. The Tool On output is used as for the CW signal and the Tool Dir is used as CC
Off | Off | Off |
|---|---|---|
Off | On | Turning counter-clockwise |
On | Off | Turning clockwise |
On | On | Undefined* |
*Consult the manual of your VFD to see the behavior of the spindle when both inputs are active. This is unintended and undefined behavior and will be avoided by the CNC720.