RS-232 Program Transfer on CNC Machines: DB9–DB25 Cable Pinout and CNCCOM Settings

14 July 2026

Mentor CNC Editorial Team

On modern CNC controls, file transfer via USB memory, Ethernet and networks has become widespread. However, many older CNC lathes and vertical machining centers still in production use an RS-232 serial communication link for program transfer.

With an RS-232 connection you can:

  • Send programs from a PC to the CNC machine.
  • Back up programs from CNC memory to the PC.
  • Receive multiple programs in a single batch.
  • Archive important programs stored in machine memory.
  • Connect older controls that have no USB or network port to a computer.

Simply plugging in a cable is not enough for a successful transfer. The cable pinout and the PC-side COM port, baud rate, data bits, parity, stop bits and flow-control settings must all match.

In this article we cover the RS-232 transfer cable with a 9-pin female connector on the PC side and a 25-pin male connector on the CNC side, the settings of the CNCCOM communication program, and how to send and receive programs.

What is RS-232?

Traub TX8i-S CNC control panel

RS-232 is a method of serial data communication between two devices. In CNC applications one end of the link is the control unit and the other end is a computer or a USB-to-RS-232 converter.

Data travels over the cable character by character. For reliable communication, both sides must agree on: COM port, baud rate, data bits, parity, stop bits, flow control, program start/end characters and end-of-line characters.

The Windows serial communication stack allows baud rate, data bits, parity, stop bits and flow-control options such as CTS/DSR and XON/XOFF to be configured individually (Microsoft Learn).

CNC RS-232 DB9–DB25 cable wiring diagram

The wiring diagram at hand includes a 9-pin female DB9 connector on the computer side, a 25-pin male DB25 connector on the CNC side, the data lines, the control/handshake lines, signal ground and the cable shield.

RS-232 C transfer diagram (Alt text: CNC RS-232 program transfer cable diagram with DB9 female on the PC and DB25 male on the CNC)

DB9–DB25 pin connection table

PC side DB9CNC side DB25Function of the line
22PC RXD – CNC TXD data line
33PC TXD – CNC RXD data line
75PC RTS – CNC CTS
84PC CTS – CNC RTS
57Signal ground, SG
1 and 46DCD/DTR to DSR control link
68 and 20DSR to DCD/DTR control link
Connector shell1Shield connection

Some control lines in the diagram are bridged:

  • Pins 1 and 4 on the PC side connect to pin 6 on the CNC side.
  • Pin 6 on the PC side connects to pins 8 and 20 on the CNC side.
  • The cable shield connects to pin 1 on the CNC side.

This is not a simple three-wire cable using only TX, RX and GND. It is a more complete communication cable that also carries the RTS, CTS, DTR, DSR and DCD control lines.

⚠️ Important: This diagram must not be treated as universal for all CNC controls. Before wiring, compare it with the pin table in the electrical and communication manual of the control unit you are using.

Which CNC control was this cable made for?

The help screen inside CNCCOM.EXE identifies the program as “Fanuc 15-M RS-232 Communication Software”. The help section also shows cable connections with DB25 male on the Fanuc side, DB9 female on the PC side, and alternatively DB25 female on the PC side.

The diagram should therefore be treated as a cable example prepared specifically for RS-232 program transfer between a Fanuc 15-M and a computer. A similar connection may work on other Fanuc models, but it must be verified separately for every model and machine builder.

What is the CNCCOM program?

CNCCOM is an MS-DOS based data transfer program written for communicating with older Fanuc controls over RS-232. Its main functions are:

KeyFunction
F1Opens the communication settings
F2Sends a program from the PC to the Fanuc control
F3Receives a program from the Fanuc control to the PC
F4Views and edits a CNC program
F5Splits batch-received programs by their O numbers
F6Saves the communication settings
ESCReturns to the previous screen or cancels the operation

CNCCOM is an old program and may not run directly on current Windows systems. Nevertheless, the RS-232 communication logic it uses is exactly the same in today’s serial transfer programs.

CNCCOM communication options

SettingOptions
COM portCOM1, COM2, COM3, COM4
Baud rate300, 600, 1200, 2400, 4800, 9600, 19200
Data bits7 bits, 8 bits
Stop bits1 stop bit, 2 stop bits
ParityEven, None, Odd

CNCCOM default settings

COM port : COM1
Baud rate: 9600
Data bits: 7
Parity   : Even
Stop bit : 1

This setting can be written in short as 9600–7E1, where 9600 is the communication speed, 7 is seven data bits, E is Even parity and 1 is one stop bit.

⚠️ Caution: 9600–7E1 is only the CNCCOM default. It is not mandatory for every Fanuc or every CNC control. The PC setting must always match the communication parameters on the machine.

How to find the COM port on the computer

Modern computers may not have a physical RS-232 port. In that case, use a USB-to-RS-232 converter that supports true RS-232 signal levels. Old USB-to-serial manuals show the converter appearing in Windows Device Manager as e.g. “Prolific USB-to-Serial Comm Port” with a COM number; the COM number can be changed from the port properties if necessary.

Checklist on a current Windows system

  1. Connect the USB-to-RS-232 converter to the computer.
  2. Open Device Manager in Windows.
  3. Expand the Ports (COM & LPT) section.
  4. Note the COM number shown next to the converter.
  5. Select the same COM port in the transfer program.

For example, if USB Serial Port (COM3) is listed, select COM3 in CNCCOM or in whichever communication program you use. Windows can automatically load its own serial driver for compatible USB communication devices; for devices that are not recognized automatically, use the manufacturer’s driver (Microsoft Learn).

ℹ️ A USB–TTL converter and a USB–RS-232 converter are not the same device. A true RS-232 converter must be used on the CNC’s RS-232 port.

Sending a program from the PC to the CNC

1. Check the cable and the communication settings

Baud rate, data bits, parity, stop bits and the handshake method must be identical on the PC and CNC sides.

2. Put the CNC control into receive mode

The Fanuc control is put into READ state so it can accept a program. The key sequence on the panel varies by control model; on some controls you use EDIT mode, the program screen and the READ or INPUT softkey.

3. Press F2 in CNCCOM

Select the program to send. The program can also be opened by typing its full file path, e.g. C:\CNC_PROGRAMS\O1234

4. Start the transfer

Following the on-screen instruction in CNCCOM, press any key to start sending the program.

5. Verify the result

After the transfer, check on the CNC: the O program number, the first and last lines, the M30 or M99 line, and any missing or corrupted characters. For the first test it is safer to use a small trial program instead of a long, critical production program.

Receiving a program from the CNC to the PC

Downloading programs from CNC memory to the PC is extremely important for backups. The receive sequence with CNCCOM:

  1. Press F3 on the CNCCOM main screen.
  2. Type the file name the program will be saved to.
  3. The computer switches to waiting-for-data state.
  4. Select the program to transfer on the Fanuc control.
  5. Start PUNCH, or PUNCH ALL for a batch transfer.
  6. When the CNC finishes, press ESC on the computer.
  7. The received data is saved to the file.
⚠️ The receive screen on the computer must be opened before data output is started from the CNC. Otherwise the first lines of the program may be lost.

Splitting a PUNCH ALL file by O numbers

With PUNCH ALL, multiple programs can be received from the Fanuc control as a single file. For example the file may contain:

O0001
...
M30
O0005
...
M30
O1234
...
M30

CNCCOM’s F5 function scans this batch file and splits the programs into separate files by their O numbers. It asks for a start and end program number, and the programs found are saved to separate files under their own O numbers. This is very useful for bulk backups of the many programs held in CNC memory.

Common problems in RS-232 program transfer

ProblemLikely causeWhat to check
CNC receives nothing at allWrong COM port or cable wiringCOM number, TX/RX lines, READ state
Garbage characters arriveCommunication values do not matchBaud rate, data bits, parity and stop bits
Transfer stops midwayHandshake or noise problemRTS/CTS, XON/XOFF, shield and cable routing
PC sends but CNC keeps waitingControl lines not suitableDTR/DSR and RTS/CTS connections
Lines merge togetherEnd-of-line format mismatchCR, LF and EOB settings
Beginning of program missingReceiver started too lateRECEIVE first, then PUNCH
CNC rejects the programFile format or O number wrong%, O number and program end
Buffer or overrun errorTransfer too fast or wrong flow controlLower baud and correct flow control
USB converter not visibleDriver or USB connection problemDevice Manager and manufacturer driver
“COM port in use” errorPort opened by another programClose other serial communication programs

What to do if garbage characters arrive

If meaningless characters like @##?G??X▒▒ appear on screen, check the communication settings first instead of replacing the cable. The most common causes:

  • PC at 9600 baud, CNC at 4800 baud.
  • PC at 8 data bits, CNC at 7 data bits.
  • One side using Even parity, the other None.
  • One side using 1 stop bit, the other 2.
  • CNC expecting XON/XOFF while the PC uses RTS/CTS.

After making the settings identical on both sides, test again with a small program.

What to do if the transfer stops midway

  • Flow control is selected incorrectly.
  • RTS/CTS lines are missing from the cable or wired incorrectly.
  • The CNC sends an XON/XOFF character but the PC ignores it.
  • The USB–RS-232 converter connection is unstable.
  • The cable runs next to high-power motor or drive cables.
  • The transfer speed is too high for the link being used.

The baud rate can be lowered for testing, but the values on the PC and the CNC must be changed together.

Points to watch when building the cable

  • Verify pin numbers with a meter before soldering the connectors.
  • Remember that pin orientation appears mirrored when looking at a DB9/DB25 connector from the front versus the solder side.
  • Use shielded data cable.
  • Route the cable away from motors, contactors, servo drives and high-voltage cabling.
  • Build the cable and change pins only while the devices are powered off.
  • Never apply random bridges or short circuits to the CNC port.
  • Check every pin with a continuity test before the first connection.
  • Use a true USB–RS-232 converter, not USB–TTL.
  • Cheap converters with unknown drivers can drop the connection during long transfers.

Does this diagram work on every Fanuc control?

No. The diagram matches the CNCCOM help information prepared specifically for the Fanuc 15-M. Even with the same control unit, the machine builder may have used a different connector type, a different handshake wiring, XON/XOFF only, three-wire communication or a different I/O device selection. Before applying the diagram:

  1. Identify the CNC control model,
  2. Review the machine builder’s electrical diagram,
  3. Measure the RS-232 port pins,
  4. Record the CNC communication parameters,
  5. Run a send/receive test with a small program.

Conclusion

RS-232 is still an effective program transfer method for older CNC machines without USB or Ethernet. For a healthy transfer, however, the cable wiring and the communication settings must be considered together. The diagram covered here is a Fanuc 15-M oriented example with a 9-pin female DB9 on the PC side, a 25-pin male DB25 on the CNC side, data and control lines, signal ground and cable shield.

Although the CNCCOM default is COM1, 9600 baud, 7 data bits, Even parity and 1 stop bit, these values are not the same on every control. Always compare the PC and CNC settings. With the right cable, the right COM port and matching serial values, you can send programs to the CNC, back up programs from the CNC, and organize batch downloads by O numbers.

Related content: for similar operations on Mitsubishi controls see our Mitsubishi M70 Program Transfer guide, and for FANUC parameter structure our FANUC 0-MC Parameters and Alarm Solutions article.

Frequently asked questions

Which baud rate should be used for CNC program transfer?

There is no single mandatory value. 4800, 9600 or 19200 can all be used. What matters is that the PC and the CNC are set to the same baud rate.

What is the CNCCOM default setting?

The CNCCOM default is COM1, 9600 baud, 7 data bits, Even parity and 1 stop bit — in short, 9600–7E1.

Can a USB-to-RS-232 converter be used?

Yes, as long as it supports true RS-232 signal levels and has a reliable driver. A USB–TTL converter is not suitable.

The program is being sent but the CNC does not receive it — why?

The most common causes are a wrong COM port, TX/RX wiring, the CNC not being in READ state, or mismatched handshake lines.

Can all programs be downloaded from the CNC at once?

If the control supports it, PUNCH ALL downloads all programs as a single file. CNCCOM’s F5 function can then split that file by O numbers.

⚠️ Mentor CNC disclaimer: This content is prepared for technical training and general information. The CNC control model, the machine builder’s wiring, parameters and electrical installation may differ. Review the official maintenance and connection manual of the control unit before wiring a cable or changing parameters. Wrong pin wiring, incorrect parameters, an unsuitable converter or electrical potential differences can damage the communication port of the CNC control. All work must be performed by qualified, technically competent personnel.