GreatLight CNC Machining Factory logo
CNC Machining
Rapid Prototyping
Materials
Industries
News
About GL

Get Instant Quote

CNC communications

What Is Another Name for the RS-232 Port in CNC Machining?

The connector on the back of a CNC control has at least five names, and they all point to the same DB25 or DB9 socket. This page explains where each name comes from, how the serial link actually carries G-code, and when it is still the right choice. Written for engineers and maintenance staff who have to make an old machine talk to a modern PC.

DB25 and DB9COM portRS-232CSerial port
rs-232 port in cnc machining on a control cabinet
Quick answers

Key takeaways

Same socket, different labelsSerial port, COM port, DB25 port and RS-232C all refer to the same physical interface on a CNC control.
Electrical standard, not a protocolRS-232 defines voltage levels and pin behavior. The data format above it is set by the machine builder.
Short cable, slow dataKeep runs under 15 m and baud rates at or below 19,200 for reliable drip-feed on older controls.
Still the fallbackWhen Ethernet or USB fails on a legacy Fanuc or Haas control, the serial link usually still works.
Naming

Why the RS-232 port in CNC machining has so many names

Ask five machinists what the connector on the back of a Fanuc control is called and you will get five answers. The hardware is the same 25-pin or 9-pin D-sub shell. What changes is who is talking. An electrician calls it the serial port. A controls engineer calls it the RS-232C interface. A machine operator calls it the program cable port. A PC technician calls it COM1. All of these names describe one socket.

The confusion starts because RS-232 is a standard for electrical signaling, not for the connector or the software. The original 1960s specification defined voltage levels, pin functions and timing for connecting a terminal to a modem. CNC builders adopted it because it was cheap, well documented and already supported by every computer of the era. They kept the electrical rules and changed almost everything else.

That is why you cannot assume two machines with the same DB25 socket will talk to each other with the same cable. Fanuc, Haas, Mazak, Siemens and Mitsubishi each wired their serial ports a little differently. Some use hardware handshaking on pins 4 and 5, some use software handshaking with XON/XOFF characters, and some ignore handshaking entirely. The name on the label tells you almost nothing about the pinout behind it.

If you are ordering a cable, the part that matters is the machine model and control version, not the connector name. A null modem cable for a 1990s Fanuc 0M will not necessarily work on a 2015 Haas ST-20, even though both have a DB25 port. Get the pinout from the machine manual or from the control builder's connection diagram before you crimp anything.

  • 1
    Serial portGeneric term for any interface that sends bits one at a time over a single pair.
  • 2
    COM portThe logical name Windows and DOS assign to a physical serial socket, such as COM1 or COM2.
  • 3
    RS-232CThe electrical standard that defines signal voltages, pin functions and cable length limits.
  • 4
    DB25 / DB9The physical connector shell. DB25 was common on older controls, DB9 on newer ones.
Signals

What the pins actually do when you send a program

A serial link moves one bit at a time over a single data line. On a DB25 connector, pin 2 carries data from the PC to the machine and pin 3 carries data back. Ground sits on pin 7. The remaining pins handle flow control, which is the part that trips people up. Without flow control, the machine's input buffer overflows and characters are lost, which shows up as corrupted G-code.

Hardware handshaking uses pins 4, 5, 6, 8 and 20. The PC raises DTR on pin 20 to say it is ready. The machine raises DSR on pin 6 and CTS on pin 5 when its buffer has room. When the buffer fills, the machine drops CTS and the PC pauses. This is the most reliable method and the one most CNC builders used before USB became common.

Software handshaking skips the extra wires. The machine sends XOFF (ASCII 19) when its buffer is nearly full and XON (ASCII 17) when it has room again. Only pins 2, 3 and 7 are needed. The catch is that XON and XOFF are ordinary characters. If your G-code file contains those byte values for some other reason, the link can stall. In practice this is rare, but it is why some shops stick with hardware handshaking.

A third option is no handshaking at all. This works only when the file is short enough to fit in the machine's buffer and the PC sends it in one burst. For a 20-line setup program it is fine. For a 2 MB surfacing toolpath it will fail. If you drip-feed long programs, use hardware handshaking and keep the baud rate at 9,600 or 19,200.

  • 1
    Pin 2 (RXD)Data from the PC into the machine control.
  • 2
    Pin 3 (TXD)Data from the machine back to the PC.
  • 3
    Pin 7 (GND)Signal ground. Must be connected on every cable.
  • 4
    Pins 4, 5, 6, 8, 20Handshake lines for hardware flow control.
Limits

RS-232 was designed for a terminal sitting a few meters from a modem. The standard sets a maximum cable length of about 15 m at 19,200 baud. Push past that and you get framing errors, dropped characters and occasional total loss of connection. In a shop with VFDs, servo drives and welding equipment nearby, 15 m can already be optimistic. Shielded cable with the shield grounded at one end helps.

Speed is the other limit. At 9,600 baud you move roughly 960 bytes per second, which is about 960 characters of G-code. A 500 KB program takes over eight minutes to transfer. At 115,200 baud the same file moves in under a minute, but many older controls will not hold a stable link at that rate. The practical sweet spot for legacy Fanuc and Haas controls is 19,200 baud.

For long surfacing programs, drip-feeding is the answer. The PC sends the file in small blocks while the machine executes, using the handshake lines to pace the flow. This lets a control with 128 KB of memory run a 20 MB toolpath. The catch is that any interruption, a loose connector or a power flicker, stops the cut mid-pass. Keep the cable run short and the PC on a UPS.

The port is not going away on older equipment. A 1998 VMC with a Fanuc 18i control still cuts good parts. Replacing the control costs more than the machine is worth for many shops. A 15 m serial cable and a dedicated PC cost a fraction of that. For shops running legacy iron alongside new machines, the serial link remains the cheapest way to keep both feeding from the same CAM system.

  • 1
    Good fitLegacy controls, short cable runs, programs under 1 MB, one PC per machine.
  • 2
    Poor fitLong cable runs, high-EMI environments, files over 10 MB without drip-feed.
Settings

Getting the communication parameters right

Four settings must match on both ends of the cable: baud rate, data bits, parity and stop bits. The common factory default for CNC controls is 9,600 baud, 7 data bits, even parity, 1 stop bit. Haas often ships with 9,600, 7, even, 1. Fanuc typically uses 9,600, 7, even, 1 as well, though some builders set 8 data bits and no parity. If these do not match, you get garbage characters or nothing at all.

The handshake method is a fifth setting and the one most often missed. If the machine is set to XON/XOFF and the cable is wired for hardware handshaking, the link may work for short files and fail on long ones. Check the machine parameter page, not just the CAM software dialog. On Fanuc controls this is parameter 0102 and the I/O channel setting. On Haas it is in the Settings page under RS-232.

Flow control also depends on the cable. A null modem cable swaps pins 2 and 3 and often crosses the handshake lines. A straight-through cable does not. Using the wrong one is the single most common reason a serial link fails on first try. If you have a straight-through cable and the machine expects a null modem, you will usually see nothing at all or a continuous stream of the same character.

Once the link is up, save the settings. Write the baud rate, parity and cable type on a label and stick it inside the control cabinet door. The next person who has to reconnect that machine will thank you. A serial link that works today can fail after a control battery change wipes the parameters, and having the numbers on hand turns a half-day troubleshooting session into a ten-minute fix.

  • 1
    Baud rate9,600 or 19,200. Higher rates need shorter, better-shielded cable.
  • 2
    Data bits7 with even parity is the CNC default. Some controls use 8 and no parity.
  • 3
    Stop bitsAlmost always 1. A few older controls use 2.
  • 4
    HandshakeHardware (RTS/CTS) or software (XON/XOFF). Must match on both ends.
Procedure

Step by step: connecting a PC to a CNC control over serial

For a machine that has never been networked

  • 1
    Identify the control and connectorWrite down the control model and whether the socket is DB25 or DB9. Photograph the label on the back of the cabinet. This determines the pinout you need.
  • 2
    Get the pinout from the manualFind the RS-232 connection diagram in the machine or control manual. Do not guess from the connector shape. Note whether the builder expects a null modem or straight-through cable.
  • 3
    Build or buy the correct cableUse shielded twisted pair, 15 m maximum. Solder the handshake lines according to the diagram. Label both ends with the machine name.
  • 4
    Set the machine parametersOn Fanuc, check parameter 0102 and the I/O channel. On Haas, open Settings and scroll to RS-232. Set baud, data bits, parity, stop bits and handshake to match the PC.
  • 5
    Set the PC and CAM softwareIn Device Manager, confirm the COM port number. In your CAM post or transfer software, select that COM port and enter the same parameters.
  • 6
    Test with a short programSend a 10-line program first. If it arrives correctly, try a 1,000-line file. Watch for dropped characters or a stalled transfer.
  • 7
    Test drip-feedFor long toolpaths, run a dry pass with the tool clear of the stock. Confirm the handshake pauses and resumes without losing position.
  • 8
    Record the working setupWrite the cable type, COM port and parameter values on a label inside the cabinet door. Save a copy in your maintenance log.
Comparison

Serial port names and what each one means

Same socket, different vocabulary

NameWhere you see itWhat it tells you
Serial portMachine manuals, wiring diagramsGeneric interface type, no pinout detail
COM portWindows Device ManagerLogical number assigned by the OS
RS-232CElectrical schematicsVoltage levels and pin functions
DB25 portOlder Fanuc and Mazak controls25-pin shell, pinout varies by builder
DB9 portNewer Haas and Siemens controls9-pin shell, fewer handshake lines
Program cable portShop floor shorthandThe socket used for G-code transfer
COM1 / COM2CAM post-processor settingsWhich physical port the software opens

When to keep the serial link and when to move on

Keep the serial link if the control predates Ethernet and still holds tolerance. Move to Ethernet or USB if you need files over 10 MB, run more than two machines from one PC, or fight cable noise weekly. For most legacy controls, a 15 m shielded cable and a stable 9,600 baud link will outlast the machine.

FAQs

Common questions about the RS-232 port in CNC machining

Is RS-232 the same as a serial port?

RS-232 is the electrical standard. A serial port is the physical socket that carries it. Every RS-232 port is a serial port, but not every serial port uses RS-232. RS-422 and RS-485 use the same DB9 or DB25 shells with different voltage rules.

On a CNC control, the label usually says RS-232C or just SERIAL. Both mean the same socket.

Can I use a USB-to-serial adapter on a CNC machine?

Yes, if the adapter presents a real COM port to Windows. FTDI and Prolific chipsets work on most controls. The adapter must support the handshake lines your machine uses. Some cheap adapters only wire pins 2, 3 and 7, which breaks hardware handshaking.

Set the adapter's COM port number in Device Manager and confirm it does not change between reboots. A shifting COM port is a common cause of failed transfers.

What is the maximum cable length for RS-232 on a CNC machine?

The standard says about 15 m at 19,200 baud. In a shop with drives and welders nearby, treat 15 m as the ceiling and use shielded cable. If you need more distance, drop the baud rate to 9,600 or use an RS-422 converter pair.

A cable that works on the bench may fail on the shop floor once the spindle drive is running. Test with the machine cutting, not idle.

Why does my transfer stop halfway through a long program?

The most common cause is a handshake mismatch. The machine expects XON/XOFF but the cable is wired for hardware handshaking, or the reverse. Check the machine parameter page and the CAM software setting.

A second cause is buffer overflow on the control. Reduce the baud rate to 9,600 or enable drip-feed mode so the PC sends in smaller blocks.

How do I know which COM port my machine is on?

Open Device Manager in Windows, expand Ports (COM & LPT), and look for the serial device. The number in parentheses is the COM port. If you use a USB adapter, unplug it and replug it to see which entry appears.

Write that number down. It can change if you move the adapter to a different USB socket.

Do modern CNC machines still have RS-232 ports?

Many do, often alongside Ethernet and USB. Builders keep the serial port for shops that already have a proven transfer setup. It costs them almost nothing to include and it keeps older CAM workflows running.

If your machine has both, use Ethernet for large files and keep the serial port as a fallback for when the network is down.

Need parts machined on controls that still speak serial?

We run 127 high-precision CNC machines across three plants, including 16 simultaneous 5-axis centers. Upload your model and get a quotation with free DFM analysis within 12 hours.

12-hour quote100% inspectionNDA on request

Follow us

More from the shop floor

We publish setup notes, tooling trials and inspection data from the factory floor.

FacebookTikTokYouTubeLinkedInInstagramThreadsPinterest

Trusted by engineers and manufacturers worldwide

Tesla Ford Motor Company BYD Auto Denso Magna International Boeing Airbus Medtronic KUKA FANUC