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?

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 DB9 | CNC side DB25 | Function of the line |
|---|---|---|
| 2 | 2 | PC RXD – CNC TXD data line |
| 3 | 3 | PC TXD – CNC RXD data line |
| 7 | 5 | PC RTS – CNC CTS |
| 8 | 4 | PC CTS – CNC RTS |
| 5 | 7 | Signal ground, SG |
| 1 and 4 | 6 | DCD/DTR to DSR control link |
| 6 | 8 and 20 | DSR to DCD/DTR control link |
| Connector shell | 1 | Shield 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.
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:
| Key | Function |
|---|---|
| F1 | Opens the communication settings |
| F2 | Sends a program from the PC to the Fanuc control |
| F3 | Receives a program from the Fanuc control to the PC |
| F4 | Views and edits a CNC program |
| F5 | Splits batch-received programs by their O numbers |
| F6 | Saves the communication settings |
| ESC | Returns 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
| Setting | Options |
|---|---|
| COM port | COM1, COM2, COM3, COM4 |
| Baud rate | 300, 600, 1200, 2400, 4800, 9600, 19200 |
| Data bits | 7 bits, 8 bits |
| Stop bits | 1 stop bit, 2 stop bits |
| Parity | Even, None, Odd |
CNCCOM default settings
COM port : COM1
Baud rate: 9600
Data bits: 7
Parity : Even
Stop bit : 1This 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.
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
- Connect the USB-to-RS-232 converter to the computer.
- Open Device Manager in Windows.
- Expand the Ports (COM & LPT) section.
- Note the COM number shown next to the converter.
- 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).
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:
- Press F3 on the CNCCOM main screen.
- Type the file name the program will be saved to.
- The computer switches to waiting-for-data state.
- Select the program to transfer on the Fanuc control.
- Start PUNCH, or PUNCH ALL for a batch transfer.
- When the CNC finishes, press ESC on the computer.
- The received data is saved to the file.
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
...
M30CNCCOM’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
| Problem | Likely cause | What to check |
|---|---|---|
| CNC receives nothing at all | Wrong COM port or cable wiring | COM number, TX/RX lines, READ state |
| Garbage characters arrive | Communication values do not match | Baud rate, data bits, parity and stop bits |
| Transfer stops midway | Handshake or noise problem | RTS/CTS, XON/XOFF, shield and cable routing |
| PC sends but CNC keeps waiting | Control lines not suitable | DTR/DSR and RTS/CTS connections |
| Lines merge together | End-of-line format mismatch | CR, LF and EOB settings |
| Beginning of program missing | Receiver started too late | RECEIVE first, then PUNCH |
| CNC rejects the program | File format or O number wrong | %, O number and program end |
| Buffer or overrun error | Transfer too fast or wrong flow control | Lower baud and correct flow control |
| USB converter not visible | Driver or USB connection problem | Device Manager and manufacturer driver |
| “COM port in use” error | Port opened by another program | Close 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:
- Identify the CNC control model,
- Review the machine builder’s electrical diagram,
- Measure the RS-232 port pins,
- Record the CNC communication parameters,
- 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.