bg

CNC not receiving a program over RS-232: step-by-step fixes

The control shows nothing, prints garbage, raises an alarm, or stops just before M30. RS-232 problems look alike, but the cause is always in one of a few places: the PC's port, the cable, the port settings, the program format or the handshake. Check them one link at a time, in this order, and you will find it.

Before you start: who waits for whom

  • Sending to the control: put the control in its receive mode (on many controls EDIT mode, then READ or INPUT). On Fanuc controls LSK appears while the control waits for data. Then start the transfer on the PC. In DNC Precision you can also click Transmit first: it waits until the control signals that it is ready.
  • Receiving from the control: start receiving on the PC first (Receive in DNC Precision), then press PUNCH or OUTPUT on the control.
  • Drip feed: the control runs the program as it arrives, so it is usually started with Cycle Start in its serial-run mode. See drip feed.

Step 1: the PC's serial port

  1. Open Device Manager, Ports (COM & LPT), and note the COM number of the port or adapter you use. A USB adapter can get a new number when it is plugged into another USB socket.
  2. Do a loopback test: connect pins 2 and 3 of the port (9-pin connector), open a terminal program on that COM port and type. Every character must come back. If not, the port, the adapter or its driver is the problem.
  3. With a USB adapter, use a known brand with a current driver. See USB-to-serial adapters for CNC.

Step 2: the cable

  • Crossed or straight. The PC and most controls are both data terminals, so transmit and receive must cross: a null-modem cable. Some controls or adapters need a straight cable. The control's manual shows its pins.
  • Signal pins. 9-pin: transmit 3, receive 2, ground 5. 25-pin: transmit 2, receive 3, ground 7.
  • Handshake lines. 9-pin: RTS 7, CTS 8, DTR 4, DSR 6, DCD 1. 25-pin: RTS 4, CTS 5, DSR 6, DCD 8, DTR 20. Many controls refuse to work while their DSR, CTS or DCD input is low, so these lines must be wired through or bridged in the connector as the manual shows. A cable that "works one way only" is often missing one of them.
  • Length. RS-232 is meant for about 15 m (50 ft) at high baud rates. Longer runs work with good cable at 9600 baud or less; for long distances use RS-422/RS-485 or a network adapter.

Pinouts and ready-made cable diagrams: RS-232 pinouts and cables.

Step 3: port settings on both sides

The baud rate, data bits, parity and stop bits must be the same on the PC and on the control. Read them on the control's settings or parameter pages rather than guessing: many controls use 7 data bits, even parity and 2 stop bits for ISO code, others 8 data bits, no parity and 1 stop bit. After changing parameters, some controls need to be switched off and on.

Also check:

  • Which input the control reads. Controls with several inputs (RS-232, memory card, USB, Ethernet) select one with a setting such as Fanuc's I/O CHANNEL. It must point to the RS-232 port you use.
  • ISO or EIA code. If the control punches EIA (RS-244) code, switch its output to ISO (ASCII). DNC Precision works with ISO code.

Settings collected for many controls: CNC and DNC settings.

Step 4: program format

  • Start and end. Most controls expect % at the start and the end of the program; some need blank characters (leader) or an end-of-block first.
  • Line ending. LF, CR LF or CR. A program that arrives as one long line has the wrong line ending.
  • Program number. Some controls need the O number on the first line, or store the program under that number.
  • The end of the program. M30 followed by an end-of-block and %. A transfer that stops just before the last lines usually means the end does not match what the control expects.

Step 5: handshake

Both sides must use the same method:

  • Software (XON/XOFF). The control sends XOFF when its buffer is full and XON when it is ready again. Some controls use other characters than the standard ones (XON #11, XOFF #13). Some wait for XON before the first character.
  • Hardware (RTS/CTS or DTR/DSR). Needs the handshake lines in the cable. If you do not use hardware handshaking, the control may still need those lines high.

One shop's control received programs but would not send until XON/XOFF was switched on the PC side: the handshake is often the last missing piece.

Symptoms and causes

SymptomMost likely causeCheck
Nothing happens, no errorWrong COM port, wrong cable, control reads another input, control not in receive modeSteps 1, 2 and 3 (I/O channel)
Garbled charactersBaud rate, data bits, parity or stop bits differ; EIA codeStep 3
Parity, framing or communication alarmPort settings differ; a poor USB adapter or groundSteps 1 and 3
"DR off" or similar alarmDSR input of the control is lowStep 2 (handshake lines)
Buffer overflow alarmHandshake method differs; USB adapter buffer too largeStep 5; USB adapters
Program arrives as one long lineWrong line endingStep 4
Stops at the last lines (M30, %)Program end formatStep 4
Receives from the control but cannot sendXON/XOFF or hardware handshakeStep 5
Works from an old PC, not from a new one with a USB adapterAdapter, driver or its bufferStep 1; USB adapters

On many Fanuc controls the three communication alarms read: 85 communication error (overrun, parity or framing: port settings), 86 DR off (DSR line) and 87 buffer overflow (handshake). Newer series show them as SR0085, SR0086 and SR0087.

How DNC Precision helps

  • Raw data log. It records every byte the control sends, so you can see the real start and end characters, line endings and code before you set the format. Right-click the machine and choose Show transferred data to watch a short program arrive.
  • One configuration per machine with its port, handshake, format, character translation and delays, saved once and reused.
  • Delays before each line or between characters for slow or old controls, and waiting for XON before sending.
  • Messages per machine in a log, so a failed transfer at night can be traced in the morning.

The Free Edition handles one machine and is free for any use, so you can check a connection before you buy anything. Download DNC Precision.

Questions

Why does my CNC not receive a program over RS-232? Usually one of five things: the PC uses another COM port than you think, the cable is wired for another device, the port settings (baud rate, data bits, parity, stop bits) differ between the PC and the control, the control reads from another input (its I/O channel points to a card, USB or Ethernet), or the handshake lines are not wired or not set. Check them in that order, one at a time.

What does LSK mean on a Fanuc control? LSK (label skip) means the control is waiting for data and skips everything until the first end-of-block. If LSK stays on and nothing arrives, the control is ready but the data does not reach it: check the cable, the PC's COM port and the handshake.

Do I need a null-modem cable for a CNC? Often yes, because the PC and most controls are both wired as data terminals, so transmit and receive must cross. Many controls also expect their handshake inputs to be high, so the connector at the control end needs the handshake lines wired or bridged as the control's manual shows.

Why does the transfer stop at the end of the program? Usually the program end does not match what the control expects: the end character (often %), the line ending, or a missing end-of-block after M30. If it only happens with a USB-to-serial adapter during a long transfer, the adapter's buffer can overflow the control's buffer.

Can I test the RS-232 port without the machine? Yes. Connect the transmit and receive pins of the port (pins 2 and 3 on a 9-pin connector), open a terminal program and type: every character should come back. That proves the port and the adapter work; then test the cable the same way at its far end.

What is DNC software | DNC server mode | Drip feed | RS-232 troubleshooting | Wireless DNC | USB-to-serial adapters | Machine data with DPRNT | DNC software compared | Edit programs before sending | CNC and DNC settings | RS232 pinout and signals

Product Buy Download Support Contacts Site map
Copyright © 1999 - 2026, AGG Software.
All rights reserved.. Terms of use | Privacy policy