Short answer: lay the box in three zones — line power, main switch and fuses at the bottom, drives and the e-stop contactor in the middle, 24 V logic at the top — fuse every branch at 125% of its continuous current, and wire the e-stop through a contactor that removes all power from the spindle and axis drives while the logic supply stays live. Keep 2 in [50 mm] between VFD output wiring and your signal loom, and put the EMI filter on the drive's input side. NFPA 79 gives the stop its shape: Category 0 cuts power instantly, Category 1 ramps down first. The sections below follow the build in the order you will meet it.
Where does everything go inside a CNC control enclosure?
Split the backplate into three horizontal zones: line entry, main switch and branch fuses at the bottom, drives and the e-stop contactor in the middle band, and the 24 VDC supply, controller and sensor terminals at the top, with every gland in the bottom wall. Bottom entry earns its place twice: your glands sit where hose water and coolant run away from them, and the line wiring reaches the switch and fuses over the shortest run in the box. The drives take the middle band so the hot cases get free air on both sides, and the logic rides on top, clear of the line-voltage loom it never shares duct with.
On a 127/220 V service the line voltage comes phase-to-phase: land the two phases and the ground, and cap the neutral at the inlet unless something inside needs 127 V. Read the plate on your 30 A main switch before you mount it, because it must carry 250 VAC at 30 A; a DC marking alone describes a different interrupting duty.
Run one duct row per zone and fill it halfway. NFPA 79-2012 13.5.2 caps wiring duct fill at 50% of the duct's cross-section, which in practice is all round cables allow anyway, and NFPA 79-2015 13.3.1 admits nonmetallic duct inside an enclosure only as flame-retardant material proven by the IEC 60332-1 test. The backplate and DIN rail layout guide works through rail spacing and duct sizing, NEC 312.6 sets the bending space that large switch feeds need at their terminals, and controller enclosure cable entry for machine wiring settles which wall each cable should pierce.
Where do the fuses go, and at what rating?
One fuse, or one 2-pole breaker, in each branch immediately after the main switch, sized at 125% of that branch's continuous current and rounded up to the next standard rating — that is the whole method. The branch fuse protects the wire behind it, and only that. Your drive and your power supply look after their own electronics; the fuse clears a fault before the conductor cooks. Fuse makers' application guides set a fuse-and-switch combination at 125% of the continuous load current, a margin that carries the element through switch-on inrush, so round up to a standard value — 2, 4, 6, 10, 16, 20 or 25 A — and use time-delay elements anywhere inrush lives.
Worked example for a 2.2 kW bench CNC on 220 V, with the arithmetic shown for the supply branch: a 24 VDC supply with a 10 A output at 90% efficiency draws (24 x 10) / 0.90 = 267 W from the line, and 267 W / 220 V = 1.2 A. Then 1.2 x 1.25 = 1.5 A, so the next fuse up is a 2 A time-delay element.
| Branch | Continuous current | Math | Fuse | Wire |
|---|---|---|---|---|
| Spindle VFD, 2.2 kW | 13 A (drive data sheet) | 13 x 1.25 = 16.3 A | 20 A time-delay | 12 AWG copper |
| Power supply, 10 A output | 1.2 A input | (24 x 10 / 0.90) / 220 = 1.2 A; x 1.25 = 1.5 A | 2 A time-delay | 16 AWG |
| Logic distribution, sensors and controller | 10 A full load | full load | 5 A | 18 AWG |
| Contactor coil and e-stop string | 0.1 A coil current | smallest useful size | 1 A | 18 AWG |
Landing line voltage on terminals brings its own rules for covers and creepage; power supply enclosure safety for mains wiring lists them in order.
How do you wire an e-stop that actually cuts motion?
Run a normally-closed, latching red mushroom button in series with the contactor coil: press it and the contactor opens both phases feeding the spindle and axis drives in about 20 ms, while the logic supply keeps the controller, sensors and the stop string itself alive. NFPA 79 exists to protect operators, equipment and work-in-progress from the electrical and fire hazards of industrial machinery, and it defines the stop before anything else. Its three stop categories, and where each belongs on a CNC:
| Category | What happens | Where it belongs |
|---|---|---|
| 0 | Power leaves the machine actuators immediately; the stop is uncontrolled | Bench routers, lead-screw mills; the default e-stop |
| 1 | A controlled stop with power still applied, then power removed at standstill | Lathes and gantries where a slam stop drops an axis or wrecks a part |
| 2 | A controlled stop with power left on | Normal feed hold; keep it off the e-stop string |
The same standard shapes the button: a mushroom-head or palm-type actuator that latches in the operated position until you twist or pull it back, red on a yellow background in IEC 60204-1 practice. NFPA 79 also asks for protection against unexpected restart after a power loss, which three-wire control gives you for free.
- With the inlet unplugged, verify absence of voltage at the switch terminals, then mount the button within reach of the operator position, on the door or a pendant.
- Wire one side of the control branch through the button's NC contact, and through any further NC e-stop buttons in series, to the contactor coil; return the coil to 0 V.
- Put the contactor's two main poles in series with the two phases feeding the spindle VFD and the axis drive supply, so both lines open together.
- Land a NO auxiliary contact of the contactor in parallel with a momentary start button feeding the coil, so the contactor stays in only after you press start — that is the restart protection.
- Add the drive's controlled-stop input as a parallel path for normal stops; the hard NC string remains the backup that works without the controller.
Decide the category by the machine: a bench router takes Category 0 and coasts to a stop, while a ballscrew gantry earns Category 1, where the controller ramps the drives down and the contactor opens on a short delay.
Why a contactor instead of a DPDT relay?
Because the job is breaking an inductive 13 A load, not switching logic: a DPDT relay is rated around 10 A of resistive load, and its contacts are built to close cleanly, not to break a live drive input hundreds of times. A contactor is built the other way round — arc chutes and contact sweep for inductive current, an AC-3 rating that states making and breaking motor loads, and a coil sized for continuous duty. The choice in one line each:
| Component | Built to | Use it for | Keep it away from |
|---|---|---|---|
| Ice-cube relay, 10 A resistive contacts | Logic switching | Contactor coils, lamps, sensor signals under 6 A | Any feed to a drive or motor |
| 2-pole contactor, 25 A AC-3 | Making and breaking motor current | The line feed to spindle and axis drives, both poles in series | Logic you want switched quietly and often |
| Safety contactor, monitored redundant contacts | Opening inside an assessed stop function | Stop circuits rated under ISO 13849 | A shop machine carrying no such assessment |
Leaving the VFD energized and commanding a stop over a control signal is a fine way to make normal stops; it spares the contactor and the mechanics. Keep the hard string anyway, because on the day the controller hangs, the NC contacts still drop the coil.
EMI filter before or after the VFD?
Before: put the EMI filter in the line ahead of the drive, with under about 12 in [300 mm] of wire from filter to drive terminals, and bond its case to the ground bar through bare metal. The drive's switching stage pushes high-frequency current back onto the supply, and the filter's whole job is to keep that noise inside the box — so it belongs where the noise leaves, at the input. Between drive and motor, the part long cables want is a dv/dt filter or a reactor, a different component that limits voltage stress at the motor terminals; add one past about 50 ft [15 m] of cable, and skip it on a bench machine with 6 ft of motor cable.
Mounting decides whether the filter works at all. Bolt it metal-to-metal to the backplate or a grounded bracket with the finish removed — NEC 250.12 requires paint, lacquer and enamel off threads and contact surfaces at grounding connections — and land the drive's PE on the same bar. The grounding and bonding guide covers the door bond and bar layout, and VFD enclosure rating, size and cooling takes the drive itself from there.
How far apart do power and signal wires need to be?
Hold 2 in [50 mm] of air between the VFD output runs — or any line-voltage loom — and the signal wiring, run them in separate duct, and cross at 90 degrees where they have to meet. That figure buys the coupling margin. Drive outputs switch on a 2–8 kHz carrier with edges fast enough to couple capacitively into a parallel wire, and panel practice puts safe spacing for discrete sensor signals at about 2 in [50 mm]; double it, or add shielded twisted pair, for encoder and analog lines. Your inductive proximity sensors will shrug off residual noise; step-and-direction and analog inputs will not.
Use shielded VFD cable from drive to spindle motor and keep the braid unbroken: land it 360 degrees around at the metal gland, and land the drive-end shield on the drive's PE terminal. Do not finish the shield on a 4 in pigtail, because at those frequencies it only works as a cylinder. The same rules at drive scale are in servo drive and computer wiring separation in one enclosure, instrument signal cable enclosure layout covers the quiet side, and switching power supply noise in an enclosure traces the hum you will chase if you skip this.
What do you check before first power-on?
Walk a ten-minute list: ground continuity under 0.1 Ω from the door, backplate and every drive case to the ground bar, then an e-stop drop test, a restart test and a separation spot-check.
- With the inlet still unplugged, measure from the ground pin to the backplate, the door strap and each drive PE terminal: every reading under 0.1 Ω on your meter's lowest range.
- Walk the fuse table at the door: 20 A on the drive branch, 2 A on the supply, 5 A on the logic distribution, 1 A on control.
- Press the e-stop during a light cut: the drive display and the axis supply die together, and the logic rail holds the controller up.
- Pull the inlet plug mid-program and restore it: nothing restarts until you press start.
- Sight along the ducts: 2 in [50 mm] still stands between the drive output loom and the signal loom, and both ducts sit at or under half full.
- Tighten each gland hand-tight plus a half turn, and leave a drip loop below the box.
What size and cutouts do you order?
For the worked example — one 2.2 kW drive, a 10 A supply and a controller — order a 24 x 20 x 8 in stainless wall-mount box, with 23.88 x 19.88 x 7.88 in inside, which holds the three zones with room for wiring and spares. Heat gets its own arithmetic, and the CNC enclosure sizing article walks it: the drive sheds about 66 W at full load (3% of 2.2 kW), the supply 27 W (267 W in, 240 W out), the controller and relays about 15 W — 66 + 27 + 15 = 108 W, a load that article turns into a temperature rise for a sealed box.
Order gland holes with the box rather than cutting them in the field: 1/2 and 3/4 in NPT or M20 and M25 metric match the standard fittings, and UL 50's Table 71-1A standardizes the matching knockout diameters. Set the zones and every hole in the enclosure builder, or send a drawing through the custom stainless cutouts page; either route is delivered in 10 business days, counted from your approval of the drawing.
A dry shop takes the 24 x 20 x 8 in box in 304 stainless; where coolant mist and washdown reach the wall, order the same body in 316L. Both are rated NEMA 4X / IP66 by the manufacturer; not UL listed — and if your inspector needs a listed box, the UL 50E and NEMA 250 listing guide explains what that evaluation adds. Draw the zones before you order, and the wiring above becomes a connect-the-numbers job on install day.
Enclosures in this article
| Enclosure | Material | Outside H x W x D / display | Rating |
|---|---|---|---|
| 24 × 20 × 8 in | 304 stainless | 24 x 20 x 8 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
| 24 × 20 × 8 in | 316L stainless | 24 x 20 x 8 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
Questions
Do you fuse the 220 VAC side or the 24 VDC side of the power supply?
Both, for different jobs. The line side carries the energy, so fuse it at 125% of input current: a 10 A, 24 V supply at 90% efficiency draws (24 x 10 / 0.90) / 220 = 1.2 A, and 1.2 x 1.25 = 1.5 A, so fit a 2 A time-delay fuse ahead of it. On the low-voltage side, one 5 A or 6 A breaker protects the distribution wiring feeding the sensors and the controller.
Can the e-stop cut the 24 VDC supply too?
It can, but you pay for it in sensor state, stop-string supervision and clean restarts. NFPA 79's stop categories target the machine actuators, and the controller counts as less hazardous equipment that may stay powered. Drop motion power only: the contactor opens both phases to the drives in about 20 ms while the controller, sensors and the stop string itself stay live. If a written risk assessment says the logic must drop as well, add a second contactor for the logic line.
What size contactor does a 2.2 kW spindle drive need?
On 220 V single phase the drive draws about 13 A, so use a 2-pole contactor rated 25 A AC-3 with both poles in series, one in each phase. A relay marked 10 A resistive will stick or weld after a few hard openings of that load. Wire the coil for 24 VDC from the always-on logic supply, so the contactor still drops out if the line-side control wiring fails.
How long can the cable between the EMI filter and the VFD be?
Keep it under about 12 in [300 mm]. The filter works by giving switching noise a short, direct metal path back to the case, and a long lead radiates before the noise ever reaches that path. Mount the filter metal-to-metal on the backplate or a grounded bracket with the finish removed, and land its ground wire on the same bar as the drive's PE terminal.





