Current IntelPower LibraryShop main store

How-to

Switch a VFD spindle on and off from your CNC control

Variable frequency drives Published 8 min read By Current Intel engineering team

Short answer

You need one dry relay contact across the VFD's forward-run digital input and its common, driven by an output pin through your breakout board. Set the drive's run-command source to external terminals, leave the frequency reference on a fixed source such as the keypad or pot, and fit a flyback diode on a DC relay coil.

A metal lathe with a workpiece in the chuck, its spindle motor at the headstock end cabled to a variable frequency drive mounted on a plate beside the machine
On this page
  1. What parts do you need before you open the cabinet?
  2. Why is one relay contact enough to run the drive?
  3. How do you wire the contact to the drive terminals?
  4. What should your meter show before you trust the logic?
  5. Which drive parameters actually matter for on/off only?
  6. What goes wrong on this wiring most often?
  7. Is serial control worth it instead of the relay?
  8. Questions asked

You can start and stop a three-phase spindle from your CNC control with a single dry relay contact: wire one normally open contact across the drive's forward-run digital input and its common, energize that relay from an output pin through your breakout board, and change one drive setting so the run command comes from the terminals instead of the keypad. No analog speed signal and no serial link are needed. Drive, motor and control wiring stay exactly as they are; you are only adding a switch in parallel with the keypad's run key.

What parts do you need before you open the cabinet? #

A general-purpose relay with the right coil voltage, its flyback diode if the coil is DC, three short control conductors, and your drive manual open to the control-terminal diagram. Nothing on the power side of the drive changes, so no contactor, fuse or cable is added for this job.

Pick the relay by two coil numbers and one contact duty. The coil voltage must match whatever drives it — a 24 V DC coil on a breakout board's relay output, or a 5 V coil only if the board is explicitly rated to switch that coil current. The contact just carries the drive's digital input current, which is a few milliamps of logic-level load, so almost any sealed industrial relay contact qualifies. Keep the contact dry: it switches a logic signal, not motor current.

Why is one relay contact enough to run the drive? #

A VFD's digital inputs are low-current logic inputs, not power contacts. Closing the forward-run input to its common or its internal supply tells the drive to ramp to its set frequency; opening it tells the drive to ramp down and coast. Every amp of motor current is switched inside the drive by semiconductors, so the control side only ever handles a signal.

The relay exists to isolate two circuits that were never designed to share a common. The PC's output circuit is low-voltage logic with a small current rating; the drive's input circuit references the drive's own supply and common, whose voltage and polarity you often cannot see from the outside. A dry contact between them means neither side can damage the other, and it works whether the drive input is sink or source wired.

Some drives and boards can be joined directly. Only skip the relay after both manuals agree on the input voltage, the polarity (sink or source) and the current the board pin may sink or source. If any one of the three is unknown, keep the relay.

How do you wire the contact to the drive terminals? #

Follow this order, and work on the drive control terminals only with the drive powered down and the input locked out — the DC bus inside a VFD stays charged after the line side is off, so follow the drive manual's wait time and test for absence of voltage before touching anything.

  1. With power isolated, identify three terminals from the manual's control diagram: the forward-run input, the common or supply terminal that input closes to, and nothing else. Terminal names and numbering differ by drive; take them from your manual, not from habit.
  2. Wire one normally open relay contact between the forward-run terminal and that common or supply terminal. Two conductors, no polarity on the contact side.
  3. Leave the motor leads on the drive's output terminals exactly as they are. Nothing you wire here belongs anywhere near the motor circuit; the drive already owns that switching.
  4. Wire the relay coil to the breakout board's relay or transistor output, observing polarity on a DC coil, and fit a flyback diode directly across the coil, cathode to the positive side. The diode gives the coil's collapsing field somewhere to go when the pin turns off; the reasoning is the same as the flyback diode on a PWM DC motor circuit described in the knowledge base page on adding a flyback diode to a stalled PWM DC motor.
  5. In the drive parameters, set the run-command source to external terminals. This is the single setting that makes the drive listen to your contact instead of the keypad.
  6. Set the frequency reference source to a fixed value — the keypad, a stored preset, or the onboard pot — and enter a target frequency inside the spindle's rated speed range. For plastic and thin wood, one fixed speed is usually all you need.
  7. Set the acceleration and deceleration ramps conservatively long for the first test, then shorten them only until start current and stop behaviour stay clean.
  8. In the control software, enable the spindle relay output, assign the M3 and M4 codes to the output pin your board uses, and set the pin active-high or active-low to match the board's driver, then save the configuration.
  9. Test with the spindle decoupled from any cutting load: command M3, confirm the relay clicks and the drive ramps up; command M5, confirm it ramps down and stays off.

If your installation also needs the drive's fault relay or an analog reference later, the terminal wiring for both is covered in the article on wiring a 0-10 V speed reference and fault relay to a VFD, and the pushbutton side of remote run commands is covered in the article on wiring start and stop pushbuttons when a VFD replaces a DOL starter.

What should your meter show before you trust the logic? #

Verify the contact and the drive response with a meter before any cut. Here is a worked example with representative numbers you can reproduce on your own machine.

With M5 active (relay de-energized), set the meter to resistance and measure across the forward-run input and its common at the drive terminals: you should read open. Command M3: the same points should read a closed contact, near zero ohms. If your drive's input uses an internal 24 V logic supply drawing, for example, 10 mA, the closed contact carries that 10 mA — well inside any relay contact rating.

On the coil side, a typical 24 V DC interposing relay coil with a coil resistance of about 800 ohms draws 24 V ÷ 800 Ω = 0.03 A, that is 30 mA, so the board output switching it must be rated above 30 mA; a 50 mA transistor output passes. Without a flyback diode, the same coil's inductive kick on turn-off can exceed tens of volts and erode or kill the driving transistor — which is why the diode goes across the coil before the first test, not after a failure.

With the drive running, the drive display should show run status and an output frequency equal to the fixed setpoint. Watch the drive output current during acceleration and compare it with the motor nameplate full-load current: the nameplate value is the limit that decides whether your ramp is acceptable. Cycle M3 and M5 several times in a row and confirm there is no trip on stop. Confirm the spindle turns the intended direction; if not, correct it with the drive's direction setting or by swapping any two motor leads with power isolated and locked out.

Which drive parameters actually matter for on/off only? #

Three settings carry the whole job. The run-command source, changed from keypad to external terminals, is mandatory — without it the drive ignores your relay entirely. The frequency reference source, set to a fixed value such as the keypad entry or the onboard pot, decides the speed; with no analog or serial reference wired, the drive has nothing else to follow. The acceleration and deceleration times decide whether starts and stops are clean; too short a decel raises the drive's DC bus voltage as the spinning spindle regenerates, which trips the drive on stop.

Parameter numbers, names and menu paths are specific to each drive series and revision, and imported manuals sometimes swap or mistranslate them. Confirm each function by changing one parameter at a time and observing the effect, rather than trusting a number from a translated table.

What goes wrong on this wiring most often? #

Wrong common. Closing the forward input to the analog or encoder common instead of the digital input common does nothing, or worse. Read the terminal diagram before wiring; one misread costs an afternoon.

Relay chatter under noise. A coil fed from a weak logic pin can drop out when the drive's electromagnetic interference hits, producing spurious stops or limit trips right when the spindle starts. Feed the coil from a proper supply through a board relay or transistor output rated for the coil current, and keep the coil wiring short.

Noise on the control wiring. Route the control conductors away from the drive's output leads to the motor, use shielded cable for the motor leads with the shield grounded at the drive end, and keep the motor leads as short as the installation allows. Spurious run commands or random fault and limit trips when the spindle starts point at noise, not logic.

Restart into a coasting spindle. Commanding M3 again while the spindle is still spinning down can trip the drive on overcurrent. Add a short dwell after M5 in your G-code before the next M3.

Dead board pin. A DC coil without a flyback diode, or a coil current above the pin's rating, takes the breakout board output with it. Check the coil current against the pin rating before first power-up; that check is the worked arithmetic above.

Is serial control worth it instead of the relay? #

Not for on/off alone. A serial link over RS-485, using the drive's communication protocol and a converter on the PC side, adds speed control and status feedback, but it also adds baud rate, address and parity settings on both ends plus the command-source change to communication. Every one of those is a failure point the single relay does not have. If you only machine plastic and thin wood at one or two speeds, take the fixed frequency and the relay; if you later need speed commands from the control, the serial route is the upgrade path, and the drive manual's communication chapter is where the settings live.

Questions asked

Why does the spindle still only run from the VFD keypad after I wire the relay?

The drive is still taking its run command from the keypad. Find the run-command source or command-channel setting in the drive's parameter list, change it to external control terminals, then command M3 and confirm the forward input to common reads closed on a meter and the drive display shows run.

Why does the drive run at zero or the wrong speed when it starts?

With no analog or serial speed signal wired, the drive follows its own frequency reference source. Set that source to the keypad value or the onboard pot, enter a target frequency inside the spindle's rated speed range, and the drive ramps to it every time the relay closes.

Why does the drive trip the moment M5 stops the spindle?

A decel ramp that is too short makes the spinning motor regenerate into the drive and pushes the DC bus voltage past its trip level. Lengthen the decel time, and if the drive supports a braking resistor and still trips at your shortest acceptable ramp, fit one sized per the drive manual.

Can I skip the relay and wire the breakout board pin straight to the drive input?

Sometimes, but only after you read both manuals. The drive's digital input may reference its own internal 24 V supply with a defined polarity, and a logic pin has a small current rating. If voltage, polarity and current all match, a direct wire works; if any of them does not, the relay stays.

Do I need speed control wiring too if I only machine plastic and thin wood?

No. On/off gating plus a fixed frequency is a complete installation for constant-speed work. Set the target frequency once for the material, or turn the drive's pot by hand when you change tools, and let the control switch the spindle on and off with M3 and M5.

Keep reading

  • Explainer

    Motor leakage current that trips a GFCI on a VFD

    A GFCI on a VFD-fed motor trips on high-frequency common-mode current driven through winding-to-frame and cable-to-ground capacitance by PWM voltage edges, not on motor load. Fix it with the lowest documented carrier frequency, short shielded cable, a dv/dt or common-mode filter, and a measured residual current compared against the installed device.

    Variable frequency drives

  • Troubleshooting

    VFD ground fault trip explained when insulation tests pass

    A passed insulation-resistance test rules out steady phase-to-earth leakage but not the high-frequency charging current a PWM output drives through cable capacitance and EMC filters. Read the drive's own fault value before decoding it, verify broadband screen bonding at both ends, separate startup trips from trips after an hour or two of running, and use a lower switching frequency as a diagnostic. Other brands staying online proves nothing about the installation.

    Variable frequency drives

  • Troubleshooting

    Why a noise filter overheats on the output of a VFD

    A noise filter that scorches and leaks on a drive output is almost always an input-side EMI filter being fed PWM voltage: its capacitors and cores burn off every fast edge. De-energize, read its label and rated current, then move it to the input or replace it with a dv/dt filter documented for output duty — a short unloaded test run proves nothing.

    Variable frequency drives