Setting up a shop-floor network for CNC machines
A CNC network is not an office network with oilier cables. It carries transfers that must not be interrupted, to controls that must not be exposed, in an environment actively hostile to signal. Here's how to lay one out so it still works in five years.
What you actually need
- A switch with enough ports for every machine, every converter, and the PC — plus a few spare. Metal case, DIN-rail or cabinet mount, and 24V DC power if it lives in a machine panel.
- One serial device server per RS-232-only machine. Controls with native Ethernet plug straight in.
- Cat6 cable, in trunking, routed deliberately rather than draped.
- One PC that runs the DNC software and stays on.
- A written IP plan. This is the piece everyone skips and everyone later wishes they had.
That's the whole bill of materials. A shop of twenty machines does not need a server rack, a domain, or an IT contract — it needs a switch, a plan, and cable run somewhere sensible.
Static addresses, always
Give every machine and every converter a fixed address you chose, and write it down. DHCP is fine for laptops and catastrophic for machines: addresses move when the router reboots, and on Monday morning half the floor is unreachable with no obvious cause. Every "the DNC stopped working and nobody touched anything" call is worth checking this first.
Number the addresses so they mean something. An example plan for a 192.168.10.0/24 network:
| Range | What lives there | Notes |
|---|---|---|
| 192.168.10.1 | Router / gateway | Only if this network needs a route out at all |
| 192.168.10.10 – .19 | PCs | The DNC PC, the CAM seat |
| 192.168.10.20 – .49 | Serial converters | One per legacy machine, numbered to match |
| 192.168.10.50 – .99 | Machines with native Ethernet | 0i-F, 30i/31i/32i and similar |
| 192.168.10.100 + | Everything else | Printers, probes, gauges, the office bridge |
Then make the last octet match the machine number on the floor. Machine 7's converter is .27. Anyone can work out an address from the machine in front of them, and a fault takes seconds to locate instead of a hunt through a spreadsheet nobody updated.
Cable routing, in a building full of drives
- Keep data cable away from spindle drive and VFD cabling. Parallel runs are the problem — where they must cross, cross at right angles.
- Never run data in the same trunking as three-phase power, however convenient the existing tray is.
- Use shielded cable for any run that has to pass near drives or a welding bay, and ground the shield at one end only.
- Route it high or in trunking. Cable across a floor is cable that gets run over by a pallet truck.
- Leave a service loop at each machine. Machines get moved.
- Label both ends of every run, at installation. Nobody ever does it afterwards.
Keep it off the internet
CNC controls run software that stopped receiving security updates many years ago, and often cannot be patched at all. They should not be reachable from anything that reaches the internet. A separate switch with no route out is the simplest possible answer and costs less than an afternoon of downtime.
If the DNC PC also needs the internet — for CAM licensing, for email — give it two network adapters: one on the machine network, one on the office network, and no routing between them. The machines stay isolated and the PC stays useful.
This is also why DNC software that requires a cloud account is a poor fit for a shop floor. Program transfer has no business depending on your broadband. ElectronIx DNC runs entirely on the LAN by design — no cloud, no account, nothing leaving the building.
Wi-Fi: fine for some things, not for drip-feed
Sending a complete program into control memory over Wi-Fi is usually fine — a retry costs a second and nobody notices. Drip-feeding over Wi-Fi is a different proposition: the transfer must not stop for the entire length of the cut, and a machine shop is full of large motors and moving steel. Run cable to every machine you drip-feed, and treat Wi-Fi as the convenience it is rather than the infrastructure it isn't.
A sensible order to do it in
- Write the IP plan first, on paper, before buying anything.
- Wire and address one machine. Prove a transfer end to end, both directions.
- Do the awkward machine second — the oldest control, or the one furthest away. If it works, the rest will.
- Then roll out the remainder; by now it's repetition.
- Photograph the switch and the panel, and keep the IP plan where the next person will find it — taped inside the cabinet door beats a file on someone's desktop.
Read next
Choosing a serial-to-Ethernet converter covers the hardware at each legacy machine, program transfer over Ethernet walks the setup, and the RS-232 reference has the control-side parameters.
Questions
Can I just put the machines on the office network?
You can, and small shops often do. The risks are that office DHCP moves your machine addresses, office traffic shares the wire with a drip-feed that can't be interrupted, and CNC controls run very old software that you do not want reachable from a network with internet access on it. A separate switch for the machines costs very little and removes all three.
Do I need a managed switch?
Not for most shops. An unmanaged metal-cased switch with enough ports is fine for a floor of machines and one PC. Managed switches earn their price when you want VLANs to separate machines from office traffic on shared cabling, or port statistics to chase a fault.
Is Wi-Fi good enough for DNC?
For sending a complete program into control memory, usually yes — a retry costs a second. For drip-feeding, no. A dropout mid-cut is a stopped machine and a potential scrapped part, and a shop floor full of VFDs, welders and moving steel is a hostile radio environment. Run cable to anything you drip-feed.
What cable should I use?
Cat6 is the sensible default and costs little more than Cat5e. In a machine shop, use solid-core cable in trunking for the fixed runs and stranded patch leads at the ends, and give serious thought to shielded cable where the run has to pass near drives or welding.
How far can I run Ethernet?
100 metres per run, which covers almost any shop. That's the practical reason to put a serial device server at the machine rather than running a long RS-232 cable: RS-232 is reliable to roughly 15 metres, and much less in electrical noise.
Should the CNC network have internet access?
No, unless something specific needs it. CNC controls run operating systems that stopped getting security updates a long time ago. An air-gapped machine network is both safer and simpler, and DNC software worth using works entirely on the LAN — nothing about program transfer needs the internet.