Best way to e-stop spindle and VFD?

What is the best way to e-stop a spindle with a VFD. Should I simply kill the power to the entire unit or is the a better way?


Hey Martin,

Generally it is not recommendend to cut power to a VFD while spindle runs.

But if your risk assessment requires the immediate cut off from electricity of the whole system (e.g. for cases of fire), you should ensure that the whole installation is completely cut off by an Emergency Switch. This would be Stop category 0 according to EN 60204-1 - STO (Safe torque off). In this mode the spindle would not be decelerated (it would be left coasting), but it is ensured that it produces no more torque. Also it is important that the switch that cuts off power is of a type that stays off after a power failure when power comes back.

one way is to use the safety function of the VFD. Every VFD has Input Terminals which can either be configured as ISO 13849-1 Safety Inputs or can be programmed to trigger the spindle stop / trip event.

There are two ways to trigger such an input. The most usual way is to use a Safety Relay which also has an Emergency Stop Switch connected to it. When using this in emergency case, the spindle is stopped and the installation also has a reset button which has to be pressed before work can be continued. Such a safety wiring is shown here. You also have the possibility to connect an Emergency Switch directly to such an Input on the VFD, without using a safety relay.

This would be Stop category 1 according to EN 60204-1 - SS1 (Safe stop 1). The machine is brought to a controlled standstill, then the STO safety function is activated. This however only applies to the devices connected to the Safety Relay, so if you want it to take care of other devices than VFD/spindle (e.g. also stop the program on your CNC Controller), you have to wire the safety relay in a way that it triggers safety functions of other devices too.

The other way is to use the “Estopped” functionality of the Onefinity/Buildbotics Controller. Unfortunately, the Onefinity Controller (in contrast to Buildbotics Controller) makes use of this functionality only through the software emergency stop button shown on the screen.

:warning: The Hardware Emergency Button on top of the Onefinity Controller Case does NOT trigger this “Estopped” mode, and therefore does NOT take care of stopping the spindle or router if pressed!

But such a Hardware Emergency Button however can easily be wired to the Onefinity controller with two wires as described here. When such an externally wired Emergency Stop button triggers the controller’s “Estopped” functionality, not only the stepper motors of the CNC are disabled, but also the “Stop” command is sent to the spindle using G-code / M command over the ModBus/RS-485 communication, and even a trim router could also be stopped then if it is connected over a SSR or relay to the “tool-enable” functionality / pin on DB-25 I/O connector (see here for this).

Note you could also trigger the safety inputs of the VFD this way in case you don’t have ModBus/RS-485 communication between Controller and VFD.

All this, about connecting and using an Emergency Switch, is explained here and here.

See also this and this.

1 Like

@Aiph5u is captain VFD. To add to his advice (and my current set-up), a VFD can be programmed to stop when the controller stops. You can configure your VFD to require an rs485 communication every x milliseconds (e.g. request for spindle rpm). When it doesn’t get that communication, it can be programmed to retry (or not) x times then stop. The stop can be rapid if you have a breaking resistor (worth the investment) and deceleration is also programmable in the VFD.

I haven’t tried it, but just killing the power to the VFD may result in the spindle coasting to a stop (which is probably not the desired outcome) which can take a while and results in a lot of generated current, which can’t be good (like a dynamo on a bicycle, but you rarely see them these days)

1 Like

Good morning Andy,

:triangular_flag_on_post: OT

they’re hidden nowadays in form of a hub dynamo :slight_smile:


Wow, this is great information!

Before I purchased the VFD/Spindle I had order the Satoer Creation control panel. I still want to see if I can make it work, even if it is only to the the VFD on and off.

What I’m not sure how to handle is if I route the power to the VFD (mostly likely with a really that can handle 3 phase power) and I hit the e-stop on the control panel how do I prevent the VFD from turning off.

My understanding is I could use a safety relay? What is not clear is how to find a safety relay that will turn on with a button and only turn off when the button is off (or not signal) AND the VFD is at zero.

The VFD can set a signal when at zero, I’m just not sure what I’m looking for in the safety relay.

Thanks for all the great info!!


I’m a little confused so my thought may not be right…

The controller will not switch on the VFD (well not to my knowledge in the albeit limited setups I’ve seen on this forum). The VFD has it’s own power supply.

The VFD powers the spindle.

The controller in our case will signal to the VFD whether to power on the Spindle and at what rpm/frequency.

The VFD and Controller can be configured to stop the spindle quite quickly (breaking resistor)

It is possible (although I don’t think I have seen it here) to get the controller control to switch the power to the VFD but I’m not sure why that is necessary. Are you trying to get to position where you press one switch to power both VFD and Onefinity? If yes, I would, as a compromise, place the power switches to both next to each other

Hey Martin,

the Control Panel in its current version does not support VFDs/spindles. It has an Emergency Stop that cuts power off to the entire installation that you have connected to the corresponding relay. Of course if you attached the VFD to it, it will be cut off from electricity too then. I described this mode above as Stop category 0.

And secondly the Satoer Control Panel has switches to power “on” and “off” the router or “auto” to let the router be powered on and off automatically by the ‘tool-enable’ function of the Onefinity Controller as described above. In this “auto” setting any occurence of a M3 command in the gcode program switches the router relay on, and a M5 command switches it off. This behaviour is similar to VFDs receiving M3 and M5 over ModBus/RS-485 by the gcode program.

But due to the way VFDs work, the Satoer Control Panel has no on/off/auto switches for a spindle driven by a VFD. Such on/off/auto switches are only there for routers/milling motors that are turned on to their running state by a switch. You could say, spindles are always on “auto”, they are controlled by gcode commands from the CNC controller.

I do not understand what you mean. Can you explain this better?

A Safety Relay wiring is shown here. In this case it shows only the VFD attached, but of course you can attach other devices that you want to put in a safe state in case of an Emergency Stop. E.g. you could trigger the CNC Controller “estopped” mode this way too, which would lead to the stepper motors being disabled.

The Safety relay can be triggered by a number of things, e.g. an Emergency Stop Button pressed, an Enclosure door opened, or other failures from devices. It is a question of what you want. And on its output side, the safety relay triggers an action, e.g. it can signal to the VFD that the spindle should be decelerated and put in STO (safe torque off) state.

It is imporant to understand that in fact you have different requirements to an Emergency Stop. First not every Stop mode is an Emergency Stop mode. You may want an Emergency Stop for cases of fire. In this case the Emergency Stop has to cut power from the entire installation on every phase immediately. This is because it is not a good idea to use a fire extinguisher on an installation that is under voltage. Risk assessments may require such a Stop category 0 triggered by an Emergency Switch in a location easily accessible in case of fire.

But you also want an Emergency Stop for the case that you want the spindle and the stepper motors to be stopped in a controlled way immediately, e.g. if there is a human that opened the enclosure, or e.g. in the case you see that you are destroying an expensive piece of wood with the wrong program, e.g. where it is more important that the stillstand is controlled by the device. This would not work if you have the power cut off. Therefore there exist other Stop modes.

Cutting off power from the whole installation is not the right way to do this in these cases, therefore there exist different EN 60204-1 Stop modes. Also not evevery Stop Mode is an Emergency Stop mode. Only modes 0 and 1 are recognised as Emergency Stop, because at the end they reach STO (Safe Torque Off).

The “estopped” mode of the Onefinity and Buildbotics Controller as mentioned here is a mode where certain things are stopped and disabled but the power stays on, therefore Buildbotics has the warning that the “estopped” mode is not recognised as Emergency Stop, but in many cases, this type of stop mode in practice is what you want. But the Controller should be wired to stop the router too (which is not the case with a stock Onefinity CNC), you have to wire it using the ‘tool-enable’ pin like explained in my posting above (which is the same way it is wired in “auto” mode of Satoer Control Panel). Or in case of using a spindle, the Safety Relay that stops the VFD can trigger the “estopped” mode of CNC Controller too.

So in fact in most cases will want to have both.

1 Like

Hey Andy,

you can, but are not forced to, have a switch to power on the VFD and the Controller at same time. But it should be avoided to switch the VFD off while spindle runs. Generally to shut down the entire CNC installation would be 1. Stop operation of milling motor (put VFD into spindle stop mode or switch off router) 2. Shut down computer(s) and 3. Power off whole installation.

But Emergency switches is a different thing.

The CNC controller usually does not power on and off the VFD but it controls the state of the spindle, in normal operation, and using the ISO 13849-1 Safety Inputs on the VFD, it can put the Spindle in STO (Safe Torque Off) state. In this state the spindle is separated from power. The controller could do this, but in most cases you would have a Safety relay to take care of this.

I am currently working on the electronics of my VFD enclosure, separate from my main controller enclosure. I plan to use an NVR switch setup on the front of this enclosure, and add the VFD’s safety input to my existing safety switch/circuit that is controlled by a series of Estops. I as well have read about the potential dangers to equipment caused by cutting power to the VFD while the spindle is running.

I think given my equipment and use cases, this will meet my risk assessment needs.

1 Like

I think what I really want is a safety relay that can handle two inputs that operates as follows:

Input 1 is coming from the control panel (router on Switch)

Input 2 is the Zero Speed on the VFD (Technically I would program PD052 with a value of 2, this will turn on when the spindle is at zero)

Switch VFD Action
On On Contact Closed - VFD is on and Spindle is at Zero
On Off Contact Closed - VFD is on and Spindle is rotating
Off On Contact Open - Estop Mode
Off Off Contact Closed - Estop Triggered, waiting for spindle to be a zero

Somewhere in the system I need a signal to trigger the estop on the VFD. I was thinking of using a NC relay powered from the controller to keep open, when I loose power I would let a signal through that trigged the VFD estop. Maybe a battery or Supercap or a power supply not connected to any of the estops.

Maybe I am trying to make the Control Panel work when I should explore a separate solution for powering the VFD and doing controlled e-stops. I was hopeful there would be a way to make it all work


Hey Martin,

I find it difficult to understand what your risk assessment is.

What I described above is:

  1. In case of fire, everything has to be cut off from electricity immediately: Emergency Power off. STO state is entered immediately. This corresponds EN 60204-1 Stop Category 0.

  2. In case of a human (or a cat) cat is in danger to be harmed: Emergency Stop:
    All motors are led to a controlled standstill and after that the STO state of the spindle and the stepper motors is entered. This corresponds to EN 60204-1 Stop Category 1.

  3. In case a gcode program does not behave as wanted: Emergency Stop:
    All motors are led to a controlled standstill.

I think I could better understand what you want if you tell what exactly do you want the safety relay to do in your setup?

according to my Huanyang User’s Manual, this should be set to “3”:


Hey Martin,

If you use what I described above in case of fire, then you don’t prevent that the VFD is powered off. Everything is off then. This is what you want then.

And what I described as the other stop modes, these are modes where the VFD and Controller stay powered, but all motors including spindle or router are powered off.

Note that the Emergency Stop Button on Satoer Control Panel is of the first type, not the second. If you want the second type of stop mode, you need another Emergency Stop button, which is

  1. either wired to pin 23 (“estop”) and ground of DB-25 connector of the Onefinity Controller, which this way would set the Controller in “estopped” mode, which would disable the steppers, send spindle stop command to VFD or stop a router if it is connected using the “tool-enable” pin / functionality,

  2. or wired to a ISO 13849 Safety relay such as a Omron G9SE or a Jokab RT6, which would be wired to the VFD and stop the spindle (and could also be wired to the Onefinity Controller and would put it into the “estopped” mode too in order to disable the stepper motors, and if connected, the router).

Also keep in mind that Emergency Stop (of mechanically moving devices) is not the same as Emergency Poweroff.

PS: What I forgot to say, the models G9SE-221-T05 and G9SE-221-T30 have the capability to additionally switch after 5 or 30 seconds delay.

I want two things

A) big red button to kill power to everything. This is incase of fire or smoke. Maybe best to simply wire a magnetic switch as the main on/off for the controller and VFD.

B) This is me being lazy and wanting to use the Control Panel to turn the FVD on/off. I understand it is designed for routers and I’m trying to force it to work with a VFD. My thinking is if I can find a relay that works they way I want and does not kill power until the VFD says it is at zero and the estop is pressed then it would work.

I also like the thought of removing all power from the VFD (using the arm switch) when I change bits.

Maybe the best solution is to use the Control panel for what is good at, and separate the on/off function to something different.

I keep thinking that they make safety switches that will monitor if the VFD is at zero before killing the power, so maybe they make one that does what I am looking for.

In the past I would do something like this with a PLC, but that seems overkill.

Thanks for the guidance.


Hey Martin,

thanks for explanation, now I understand better.

I think it can be done the way you want and it’s not that complicated. Unfortunately today I have no time, I will come back later!

Hey Martin,

thanks for explanation, now I understand better.

Yes, that is what I think is the best for this case of risk. It should be on a location easily accessible. It has to be a high load disconnector with arc extinguishing because in case of Emergency the appliance may be running (with high currents).

Of course it would be possible to wire a a simple logic on a VFD output terminal which is programmed to switch when spindle reaches zero speed and to wire it to a relay which would switch off the VFD.

But using the Router on/off/auto switch of the Satoer Control Panel for this makes no sense.

First, if you switch on the power to the VFD, nothing happens. In practice, you would switch the VFD on in the same moment you switch the CNC controller on and the rest of the machine. In every VFD manual, you are warned to ** NOT ** start or stop the inverter by switching the magnetic contactor on the input. The only way to start or stop the inverter is by the FWD or REV command, and the way to stop it is by the STOP comand. These commands can, according to Command Source Selection in VFD, be given either by the Operator Panel on the front of the VFD or by the CNC Controller, by entering manually g-code M3/M4/M5 Commands in the MDI field or by encountering these M3/M4/M5 commands inside a g-code progamm runnning.

Also if you would use the router on/off/auto of the Satoer Control Panel to swich the VFD on, what would be in “auto” mode? Then it would power up the VFD everytime the controller encounters a M3 or M4 command, and powered off on every M5 command! This is not the way you use a VFD-driven spindle. The way a VFD-driven spindle is started and stopped, as explained above, is NEVER by switching VFD on and off. It is only started and stopped by the FWD, REV, and STOP commands.

This is not necessary. In STO (safe torque off) mode of the VFD, the spindle is powerless. It is a safe mode to prevent humans can be harmed.

Even in STOP mode, spindle is powerless and unlikely to move.

There is much more danger by running a cnc router without enclosure (broken bit debris in your eye, ouch) or insufficient filter in your dust collection (lung cancer) than to manually change a bit on a spindle in STOP mode.

I didn’t do a good job explaining.

I only want to use the Control Panel as a on/off powers switch for the VFD, not to turn the spindle on/off

If I use a smart relay I can turn power on from the control panel and only turn the power off when the spindle is at zero AND the control panel is off. This allows the power to the VFD to only be turned off when the spindle is idle.

All other control (run, stop, etc) would be either manual or from the CNC controller. Most likely the CNC controller.

I could also program it such when I press the oh shit button it would trigger an e-stop to the buildtronic, which would then estop the Spindle. I mean the soft e-stop, not the hard kill power e-stop.

I think I have all them parts needed as I have a few PLC’s leftover from a project I did a few years ago. They are Siemens 8 channel Logo PLC’s.

I know I’m being stubborn in trying to use the Control Panel, but it looks good, replaces the game pad and I think I can do everything I want with existing parts.

I think the key points you have made are:

Let the Buildtronic control the spindle or do it manually.

Don’t kill power to the the VFD or Spindle, do a controlled stop.

Don’t worry about arming or disarming the VFD

Add a breaking resistor.

And many others.

I greatly appreciate the schooling in how FVD’s operate and the proper way to set them up.

I have another question and I’m promise to stop. When adding a breaking resistor do you still need to worry about a controlled e-stop or does the braking resistor simply help speed up the slowing down of the spindle.

Many Thanks!


I have been looking into this while waiting for my VFD to arrive. From what i understand the biggest benefit in our use case is that we can safely decrease the deceleration time of our spindle without tripping an over current. This would be particularly helpful when an Estop is activated at high spindle RPM. I did learn that not all VFDs, particularly the less expensive, have the internal circuitry that allow the addition of braking resistors. I believe the VFD manual will give minimum specs - resistance value and wattage in particular.

Hey Martin,

No need to stop as long as things remained unclear or help is useful for you :slight_smile:

The braking resistor does exactly this. It helps not only if you want to quickly reach a full standstill but also allows for faster slowing down on speed changes.

I do not know if you can add a braking resistor to a Huanyang VFD, I read that some models are not prepared for it, but every VFD has some built-in brake circuit with a minimal brake resistor anyway. On my VFD you can attach one of two recommended, differently sized braking resistors, which allow for more braking torque which means decreasing the possible spindle decelaration time.

:triangular_flag_on_post: A spindle is an induction motor, and such a motor, when its power is cut, immediately acts as an induction generator and produces power. The chopper circuit inside the VFD consumes the power that the motor produces and transforms it into heat in the braking resistor, thereby slowing the motor down. The smaller the resistor value in ohms is, the more power it will dissipate into heat, but the higher the resistor’s rated power has to be and the bigger it is and the hotter it gets (you can burn your fingers on it).

:triangular_flag_on_post: You can choose the time for the deceleration by a setting in the VFD.

As for the Emergency Stop and/or Switching off, the updated IEC 60204-1 standard explicitly states that the activation of the STOP function of a VFD may be regarded as a category 0 stop. That means “Safe Torque Off” (STO), the spindle is made powerless and therefore cannot exert any torque.

Category 0 Stop means uncontrolled stop by immediate power removal to the spindle. However this also means that because of the spindle being disconnected from power, the drive cannot generate any brake torque and the spindle is left running free (coasting).

What we would want in most cases is not free-run (coasting) of the spindle but reaching a controlled standstill of the motor (decelerating) within a short time, and only after that, cutting spindle from power (“Safe Torque Off”). This is what Category 1 Stop means. Since it reaches “Safe Torque Off” too, it is regarded as a valid Emergency Stop mode too (as well as Category 0 stop is).

As for STOP command in a VFD, you can program the behaviour of what it does on STOP, whether the spindle is left coasting or decelerated within a given time.

Note that if you set the deceleration time shorter than your braking resistor can achieve, this could lead to a VFD trip, which would abort the braking and make the spindle powerless immediately, with no regard whether it was at standstill already or it is still coasting.

But the important thing is that it is clear that when you give the STOP command, finally the spindle reaches the powerless state. It does it anyway.

Okay, this is already good. But I do not understand why you don’t simply turn the VFD on at the same moment you turn the rest of the CNC machine on. This is the usual way to switch the VFD on.

Also what is when you put the router switch of Satoer Control Panel in “auto” mode? If you use the “router” relay of Satoer Control Panel to switch the VFD on and off, it will be switched on and off everytime your g-code program encounters a M3/M4 rsp. M5 command. This is not what a VFD likes. In the manual of my VFD it says:

Do not turn on the power and then turn it off again more than once every 3
minutes. Doing so may damage the Inverter.

Also the M3/M4 and M5 commands in your program would already have been received by the VFD from the Controller, via the ModBus/RS-485 connection! It would make no sense for a VFD to receive a M5 (STOP) command from the Controller, and be switched off too.



I keep forgetting the control panel is smart. I will keep that in mind as I move forward.

Next step is to find relays for the dust collection as it 220V.