IMD SolutionComputing LibraryShop main store

Troubleshooting

Why an RS232 DNC connection shows active but no program transfers

Mini and embedded PCs Published 7 min read

Short answer

An active DNC indication proves only that the RS232 link and handshake work, not that the file rules are met. On this control the transfer was restored by correcting two communication parameters and renaming PC files to bare numeric program numbers; the %PM header and the start-at-both-ends sequence belong to the Device 2 workflow, not to DNC.

On this page
  1. What the active connection proves
  2. Check the serial link first
  3. The file rules that block a good link
  4. Where the transfer stops
  5. The sequence that works
  6. Example: renaming N9010.PM for the DNC path
  7. Why this control stays on RS232
  8. The 9,000-block stop is not a limit
  9. Questions asked

You press the DNC softkey, the control announces an active connection to the PC software, and still not one program moves. The indication is honest but narrow: it proves the RS232 link and the handshake, not the full parameter set and not the file rules. On this class of control the transfer came back after two wrong communication parameters were corrected and the PC files were renamed to bare numeric program numbers. The %PM first line and the start-at-the-machine-then-start-again-at-the-PC sequence belong to the Device 2 workflow; they neither fix nor apply to the DNC path.

What the active connection proves #

The DNC path is deliberately lopsided. At the control you press the DNC softkey and let the PC software connect; the control then displays the active connection, and the only other machine-side step is selecting the target directory. Everything else runs from the PC: you pick the data category (PM, MM and the rest), the control's file list appears on the PC, and you mark one, several or all programs to copy.

With that indication lit you can tick off three things:

  • The selected PC port is open and the cable is carrying data.
  • The control's DNC service is selected and answering.
  • The serial settings at both ends agree well enough to exchange the connection messages.

You cannot tick off the rest: the installation in question still ran with two wrong parameters while the indication showed, and nothing on that screen confirms the selected directory, the transfer category, the filename mapping or the file content format, which is the layer that actually stopped this transfer.

If the connection indication never appears, the fault sits below the file layer and no amount of renaming will help.

  • Confirm the port: with a USB-to-RS232 adapter, verify that the COM port number the software opens is the one the adapter took.
  • Remove switchboxes, adapters and extension cables, and connect the PC straight to the control.
  • Reseat both connectors and check the cable wiring against the pinout the control documentation calls for at each end.
  • Read the serial settings on both sides and compare them field by field: baud rate, data bits, parity, stop bits, handshake.

The working values from the case above were never written down, so take the required settings from the machine's own documentation, record the current values before you change a parameter, and make each change with the machine idle. The same compare-don't-guess discipline applies when serial Modbus communication between a Linux SBC and a PLC drops data.

Each path has its own file convention, and mixing the two is what keeps a healthy link idle.

On the DNC path:

  • The PC filename must be the bare program number: digits only, identical to the number the program carries, with no letter in front.
  • The file handling behind the control is DOS-based, so under the 8.3 convention a name is capped at 8 characters before the extension and 3 after; a four-digit number with a two-letter extension fits with room to spare.
  • A wrong name produces a misleading message: the software claims the file already exists although it does not.

On the Device 2 path:

  • The program must begin with %PM, with the program number on the line beneath; the filename plays no role.
  • You start the transfer at the machine, then start the matching action at the PC. That run between two locations is the Device 2 workflow, not a DNC requirement.

To learn the content format the control accepts, copy one of its own programs to the PC and inspect the file that arrives; reproduce that name and content pattern for everything you send back.

Where the transfer stops #

Symptom Likely stopping point Action
No connection indication at all PC port, cable, serial settings, DNC not selected Verify the physical link and compare every serial setting at both ends
Connection active, no file arrives Communication parameters, selected directory, transfer category, filename, file format Correct the parameters from the machine documentation, select the directory at the control, test with a file the control exported
Works only over Device 2, only with %PM first Device 2 parser requirement Keep %PM for Device 2 and keep that framing out of DNC
Software says the file already exists when it does not A letter in the filename stem, or a stem that differs from the program number Rename the PC file to the bare program number
File list appears, PC programs still rejected PC file differs from the control's native representation Export one control program and copy its name and content pattern
Transfer stops near the same block every time Size boundary versus flow control or sequencing Copy a known-good control program in both directions
Native TCP/IP transfer unavailable Control version below the release that supports it Stay on RS232 DNC and assess the network option separately

The sequence that works #

  1. Press the DNC softkey at the control and wait for the active-connection display once the PC software connects.
  2. Select the target directory at the control, the only other machine-side step.
  3. On the PC, choose the data category, for example PM or MM.
  4. Take the control's file list as it appears on the PC and mark one, several or all programs.
  5. Run one round trip first: copy a program from the control to the PC and back. That proves the path and shows the required file format.
  6. Rename every PC file to the bare numeric program number before sending anything.
  7. If nothing arrives while the indication stays active, go back to the serial-link checks before editing anything else.

Example: renaming N9010.PM for the DNC path #

Inputs, exactly as the case reported them:

  • PC filename: N9010.PM, one letter in front of a four-digit program number.
  • Program number: 9010.
  • Name limit from the control's DOS-based file handling: 8 characters before the extension, 3 after.

Rule in words: on the DNC path the file stem must be the program number itself, digits only, inside the 8.3 limit, with the extension naming the data category.

Arithmetic:

  • Stem: N9010 is 5 characters; drop the leading N and 9010 is 4 characters; 4 is at most 8, so the stem passes.
  • Extension: PM is 2 characters; 2 is at most 3, so the extension passes.
  • Mapping: stem 9010 equals program number 9010, so the mapping passes.

Result: 9010.PM moves in both directions over DNC, and the false already-exists message disappears.

Decision: a stem that is digits only, at most 8 characters long and equal to the program number transfers; anything else gets renamed before you touch the cable or the parameters. A longer stem is blocked by the control's file system itself, so renumber the program instead of fighting the link.

Why this control stays on RS232 #

The software's documentation starts native TCP/IP transfer at control version V410, and the control in this case reports V330, so for this software the physical path is RS232. The supplier's second tool, the one that puts an Explorer-style file view on the control for pulling data from the PC, is a separate path again; its required parameters and its failure point were never identified here, so do not use it to troubleshoot the RS232 route that is proven. Where a control does carry a network interface, keep that link away from the office network as described for networking a DOS CNC control to Windows 10 safely.

The 9,000-block stop is not a limit #

No block ceiling near 9,000 is known for the DNC software; that figure was simply where Device 2 quit on this machine while the parameters and filenames were still wrong. Once the two parameters were corrected and the files renamed, DNC ran normally, which marks the stop as an installation symptom, not a product limit. When a transfer keeps dying near the same block, copy one of the control's own programs in both directions: if that round trip passes, the boundary lives in your file, in its name, format or flow control, not in the link. And read a Device 2 success for what it is: proof that the PC port, the cable and one control path can move data, and nothing about the DNC parameters or the filename mapping.

Questions asked

Why does the software report that the file already exists when it does not?

The message is a naming fault dressed as a file fault. The control requests files by program number, so a stem with a letter in it, or one that differs from the number inside the program, derails the comparison the software runs against the control's directory, and the result is misreported as a duplicate. Nothing needs deleting; renaming the PC file to the bare program number clears the message and the transfer starts.

Can an older control reach the PC over the network instead of RS232?

Only through a side door. Native TCP/IP transfer in this software begins at control version V410, so a V330 control cannot use it. An NFS server can give an older control a network route, but only when the Ethernet option is physically present and activated through a machine constant; confirm that hardware exists before you investigate the route at all. Without it, RS232 with DNC or Device 2 is the whole menu.

Device 2 transfers work, so doesn't that prove the cable and the settings are fine?

It proves the PC port, the cable and one control communication path can move program data, which makes Device 2 a good fallback and a good diagnostic. It proves nothing about the DNC side: Device 2 reads the program number from the %PM block and ignores the filename, while DNC depends on the communication parameters and the numeric filename mapping. Expect to fix those separately even while Device 2 keeps working.

Should I copy the machine constants from a colleague's identical machine?

No. Constants reflect installed hardware, licensed options and the machine builder's integration, so a value that works elsewhere can quietly disable a path on your control. Change one parameter at a time, so any regression points at a single value, and step straight back if the transfer gets worse. Compare against the machine's own documentation, never against another machine.

Keep reading

  • Troubleshooting

    Why an Industrial PC Pings an S7-1500 but Runtime Stays Disconnected

    Ping proves the IP path only. When Runtime shows the S7-1500 disconnected with an unsafe-connection error, make the IE General interface, the Windows adapter and the Runtime connection resolve to the same NIC, make the station name and PROFINET device name match, then trust the certificate in both directions.

    Operating systems on the plant floor

  • Selection guide

    What makes a single-board computer OEM-ready

    A single-board computer is OEM-ready when it passes six gates in writing: a temperature grade that covers the air inside the enclosure, at least five years of availability with a last-time-buy policy, RoHS and REACH files, locking connectors rated for 100 or more mating cycles, I/O tested to IEC 61000-4-2 Level 3, and supply terms that work at 10 to 20 units a year. Miss one gate and the board is wrong for production, whatever the prototype showed.

    Mini and embedded PCs

  • How-to

    Connecting an SLC 5/03 PLC to an industrial remote access router

    Connect the SLC 5/03's 9-pin channel 0, left in its default DF1 mode, to the router's serial port with a null-modem RS-232 cable at 19,200 baud, keeping it under 3 m. The rectangular port is DH-485 on RS-485 wiring at 19.2 kbps, needs an interface module, and must never meet an Ethernet jack.

    Remote access and virtualization