How to Send a NC File to a CNC Machine
A practical walkthrough for engineers and shop leads. It covers what a clean NC program looks like, how to move a nc file to a cnc machine over USB, Ethernet, DNC or drip feed, and what to check before the first cut. Read it and you can judge which transfer path fits your machine and your part.

In this article
- 1
- 2
- 3
- 4
- 5
- 6
- 7
Key takeaways
What a nc file to a cnc machine actually contains
An NC file is plain ASCII text. It holds a sequence of G-codes and M-codes that move the machine: spindle speed, feed rate, tool changes, coolant, and every toolpath coordinate. The CAM software writes it after post-processing, so the same toolpath becomes different text for a Fanuc, a Siemens or a Heidenhain control.
That post-processor step matters. A file posted for a Haas mill will not run cleanly on a Siemens 840D without editing. Check the header for the control name and the unit system before anything else. G20 is inches, G21 is millimeters. Mixing them is one of the most common reasons a first article comes out at the wrong scale.
File size drives the transfer method. A simple 2.5D pocket program is often under 50 KB and fits any control. A 5-axis surfacing program for a large mold can pass 20 MB, which is far beyond the memory of an older mill. Know the size before you choose the port.
- 1Check the header firstControl type, units, work offset number, and program number.
- 2Strip what the control rejectsComments with unsupported characters, stale tool lists, CAM notes.
- 3Keep one revision rulePart number, operation number, date. Nothing else in the file name.
Choosing a path to send a nc file to a cnc machine
USB is the fastest path on any control built after about 2005. Copy the file to a FAT32 stick, insert it, and load from the memory card screen. Keep the stick dedicated to the shop. A stick that also carries office files is how a control picks up a folder structure it cannot read.
Ethernet is the cleanest option when the machine sits on the shop network. Map a folder on the machine to a folder on the CAM workstation, then drag the file across. Set a fixed IP for the control. DHCP leases that change overnight break the mapped drive, and the operator finds out at 6 a.m.
RS-232 remains common on older lathes and mills. It is slow but reliable. Use a short shielded cable, set the baud rate to match the control (9600 or 19200 is typical), and turn off hardware handshaking only if the control requires it. A wrong parity bit gives you a garbled first line and nothing else.
Drip feed, also called DNC, streams the program from the PC line by line while the machine cuts. Use it when the file is larger than control memory. The trade-off is real: if the PC sleeps, the cable is bumped, or the network drops, the cut stops mid-path. Never drip feed a finishing pass on a part you cannot remake.
- 1USBFast, offline, best for files under ~100 MB on modern controls.
- 2EthernetBest for repeat jobs and shops with a stable network.
- 3RS-232Slow but dependable on pre-2005 controls.
- 4Drip feedOnly when memory is the limit, and only on roughing or non-critical passes.
Loading and checking the program at the machine
Once the file is on the control, the work is not done. Read the first 20 lines on the screen and the last 20. The first block should set the work offset and the safe Z height. The last block should cancel cutter compensation, retract, and stop the spindle. If either end looks wrong, stop there.
Run a dry run with the tool clear of the stock. Most controls offer a dry run or machine lock mode that moves the axes without cutting. Watch the distance-to-go display. Feed hold is your friend on the first pass. A single rapid into a vise costs more than the whole setup.
Single block through the first tool change, then let it run. On a 5-axis job, slow the rotary feed override to 50 percent for the first few degrees of tilt. Collisions on rotary axes happen in the first second, not the tenth minute.
- 1Read both ends of the fileFirst block safe, last block clean.
- 2Dry run with clearanceConfirm the toolpath envelope before metal is cut.
- 3Single block the first toolThen release the override once the path is proven.
Sending a nc file to a cnc machine at an outside shop
When you hand a job to a machining partner, the file is only half the handoff. The other half is the setup sheet: work offset origin, stock size, tool list, and the revision you expect back. Without it, the shop guesses, and guesses show up as a part that matches the model but not the drawing.
Agree on the transfer channel up front. Email attachments are fine for a 200 KB lathe program and useless for a 40 MB mold program. Most shops prefer a secure upload link for anything over a few megabytes, and that link should sit behind an NDA when the geometry is sensitive.
Version control is the part that fails quietly. Name files with part number, operation, and date. If a shop has two revisions of the same program open on two machines, someone will run the old one. A one-line email confirming the revision prevents most of these errors.
For regulated work in aerospace, medical devices or automotive, the program travels with records. Traceability means the shop can show which revision ran on which machine on which date. Keep the file name stable across that chain so the records match.
- 1Send a setup sheet with the fileOrigin, stock, tools, revision expected.
- 2Match the channel to the sizeEmail for small text files, secure upload for large ones.
- 3Confirm the revision in writingOne line by email, not a phone call.
Step by step: send a nc file to a cnc machine
Follow the order. Skipping a check moves the risk to the spindle.
- 1Post the program for the right controlSelect the correct post-processor in CAM. Confirm G20 or G21, work offset number, and the program number the control expects. Wrong post equals manual editing at the machine.
- 2Clean the fileRemove CAM notes, stale tool comments, and unsupported symbols. Keep line numbers off if the control generates its own. Save as plain ASCII, not .docx or .pdf.
- 3Name the revisionUse part number, operation number, and date. Example: 20451-OP2-2026-02-14. No spaces, no personal names, no 'final' or 'new'.
- 4Pick the transfer pathUnder ~100 MB and a modern control: USB or Ethernet. Large file or small memory: drip feed. Pre-2005 control: RS-232 at the baud rate in the machine manual.
- 5Copy and verify the byte countCompare the file size on the PC and on the control. A truncated transfer is silent. If the sizes differ, re-send before loading.
- 6Load into control memoryUse the memory or program directory screen. Confirm the program number matches your setup sheet. Overwrite the old revision, do not leave both.
- 7Check offsets and tool dataWork offset, tool length, cutter compensation, and spindle warm-up. Set rapid override to 25 percent for the first approach.
- 8Dry run, then single block, then runDry run with clearance, single block through the first tool change, then release the override. Watch distance-to-go on the first Z approach.
Which transfer path fits your job
Match the file size and control age to the path. When two paths fit, choose the one with fewer people touching it.
| Path | Best for | Watch out for | Typical file size |
|---|---|---|---|
| USB stick | Modern controls, offline machines | Mixed-use sticks, folder structure errors | Under 100 MB |
| Ethernet / mapped drive | Repeat jobs, networked shops | DHCP lease changes break the mapping | Under 500 MB |
| RS-232 serial | Pre-2005 lathes and mills | Wrong baud or parity garbles the first line | Under 1 MB |
| Drip feed (DNC) | Files larger than control memory | PC sleep or cable bump stops the cut | Any size |
| Secure upload to partner | Sending a job to an outside shop | Unclear revision, no setup sheet attached | Any size |
| Email attachment | Small text programs | Mail gateways block .nc files | Under 5 MB |
Questions engineers ask before the first cut
Why does the control show an error when I load my NC file?
Nine times out of ten it is a character the control cannot parse. Curly quotes, em dashes, and non-ASCII symbols from a word processor will trip a Fanuc or Heidenhain parser.
The other common cause is a line number conflict. If the control generates sequence numbers and your file also carries them, the loader stops at the first block. Strip them in the post-processor.
Can I send a nc file to a cnc machine over Wi-Fi?
Some newer controls support it, but we avoid it on production machines. A dropped packet during drip feed stops the cut mid-path.
If the machine only offers wireless, keep the file on a USB stick or a local wired bridge and treat wireless as the backup path, not the primary one.
What is the difference between DNC and drip feed?
They are often used as the same thing. Strictly, DNC is the network that distributes programs to several machines, and drip feed is one machine streaming a program it cannot store.
For the operator, the practical difference is scope. Drip feed concerns one control and one cable. DNC concerns the shop network and who owns the file server.
Should I send the STEP model or the NC file to a machine shop?
Send the STEP or native CAD model plus the 2D drawing. The shop generates the NC file from the model, because the post-processor must match their machine and control.
Send a finished NC file only when both sides agreed on the exact control, the exact setup, and the revision. That is common on repeat orders, rare on a first article.
How do I keep the NC file confidential?
Use a secure upload link rather than plain email, restrict access to the people who need it, and put an NDA in place before geometry changes hands.
For regulated programs, keep the transfer log. It should show who sent which revision, when, and to which machine.
Why did the part come out at the wrong scale?
Check G20 and G21 first. An inch program run in millimeter mode is off by a factor of 25.4. It is the fastest way to scrap a part.
If units are correct, check the work offset and the tool length. A wrong tool length shifts Z, not the scale, but the two mistakes look similar on the first article.
Send your NC file or your CAD model to our shop
GreatLight runs 127 high-precision CNC machines in Dongguan and Singapore. Upload a STEP file and we return a quotation with free DFM analysis within 12 hours, plus an NDA on request. Uploads stay secure and confidential.
12-hour quoteFree DFM analysis100% inspectionNDA on request