Restoring a Lost CNC PLC Program via PCIN Serial Load

David Krause8 min read
Serial CommunicationSiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Problem Details

A machine control powers up and posts persistent fault messages instead of reaching a usable operating state. Diagnosis on the control side points to one condition: the PLC program stored in the control is corrupted or absent. Without a valid PLC user program, the CNC/NC kernel cannot exchange interface signals with the machine (mode selection, feed enable, drive enables, EMERGENCY STOP acknowledgement chain), so the control either stops in a fault state or cycles through startup messages.

Typical field symptoms of a missing/destroyed PLC program:

  • Control boots but never releases channel status to RESET/READY.
  • Machine operating panel keys have no effect; no axis enables, no spindle enable.
  • Repeating startup or checksum-class messages that cannot be acknowledged by RESET.
  • PLC status/diagnostics screen shows no user program, an empty program size, or a stop condition.
Scope note: The evidence for this failure describes a Siemens-family CNC serviced with the PCIN serial transfer utility and a commissioning (series start-up) file. The exact control generation is not stated in the source. Before you act, confirm the control type from the rating plate and from the software version screen, because the archive format, the transfer path, and the memory layout differ between control generations. Do not assume the procedure below transfers unchanged to a control you have not identified.

Root Cause

The PLC user program lives in battery-backed or non-volatile memory in the CNC. It is lost or invalidated by a small set of causes:

Cause Evidence to look for Recovery implication
Backup battery depleted / disconnected while the control was de-energized Low-battery alarm history, battery voltage below spec, machine off for weeks/months Both PLC program and machine data may be lost; replace battery before reloading
Interrupted write during a program transfer or NC software update Last service event was a download or version change Reload the full commissioning archive, not a partial PLC-only file
Memory module / SRAM hardware failure Reload fails or is lost again after the next power cycle Hardware replacement required; reload will not hold
Deliberate general reset (memory clear / NCK+PLC clear) performed in service Reset was done without a verified archive on hand Straight restore from the last good archive

Distinguish these two before you touch anything: a program that is gone restores from an archive; memory that will not hold a program needs hardware. The test is simple — reload, power cycle twice, and confirm the program is still present.

Solution: Load the Commissioning Archive with PCIN

PCIN is the DOS-based serial transfer utility used to send and receive data files to and from the control over an RS-232 (V.24) link. The commissioning file (series start-up / start-up archive) is the complete machine image: PLC program, NC and drive machine data, tool and compensation data, and optionally NC part programs, packaged as one punch-tape-format stream.

Prerequisites

  1. A verified commissioning archive for this exact machine and serial number. Machine data are machine-specific; a sister-machine archive will load, but axis compensation, encoder offsets, and drive data will be wrong.
  2. A PC with a real RS-232 port, or a tested USB-to-serial adapter using an FTDI-class chipset. Cheap adapters drop characters at higher baud rates and produce truncated archives.
  3. A correct null-modem cable with hardware handshake lines (RTS/CTS) wired through. Handshake is what prevents buffer overrun on the control side.
  4. A fresh backup battery installed, if the failure is battery-related.
  5. Machine in a safe state: EMERGENCY STOP pressed, main drive power off if the control permits it, no personnel in the working area.

Procedure

  1. Take a receive-side archive first if the control still responds. Even a partial upload preserves tool data and compensation values you may not have elsewhere.
  2. Match the interface parameters on both sides. Set the control's V.24 interface and PCIN to identical values. Typical serial settings for this class of transfer:
    9600 or 19200 baud, 7 or 8 data bits, even/no parity, 1 or 2 stop bits, RTS/CTS handshake, XON/XOFF as configured by the control
    Read the actual values from the control's interface parameter screen; do not guess. Mismatched parity is the most common cause of a transfer that starts and then aborts.
  3. Select the transfer direction in PCIN as "Data Out" (PC to control) and point it at the commissioning file.
  4. Arm the control to read in the series start-up file, then start the send from PCIN.
  5. Expect multiple automatic restarts. While the archive is read in, the control reboots several times as machine data blocks that require a restart become active. This is normal behavior, not a failure. Do not interrupt power, do not cancel the transfer, and do not press RESET during these restarts.
  6. Let the transfer run to completion and wait for the control to settle at the end of the last restart.
  7. Power cycle once manually after completion so all machine data and the PLC program are activated from non-volatile memory.
Warning: Reading in a commissioning archive overwrites drive and axis machine data. If the archive predates a mechanical repair (ballscrew, encoder, motor swap), reference point offsets and compensation tables will be stale. Re-verify reference position and backlash/leadscrew compensation before releasing the machine to production.

Verification

  1. PLC present and running: open the PLC diagnostics/status screen and confirm a non-zero program size and RUN state with no stop condition.
  2. Interface signals live: toggle a hardware input (a limit switch or a panel key) and watch the corresponding PLC input bit change in the status display. This proves both I/O bus and program execution.
  3. Persistence: power the control down for at least 5 minutes, then back up. If the program is gone again, the fault is memory hardware or battery, not data.
  4. Alarm list clean: the startup fault messages must clear after RESET. Any remaining alarm now describes a real machine condition, not a missing program.
  5. Axis referencing: reference each axis and compare the displayed machine position at a known fixture or reference block against the pre-fault record.
  6. Drive data: confirm drive machine data / motor selection matches the nameplate on each motor before the first jog. Run each axis first at the lowest override.

Reading Fault Messages Correctly Before You Blame the PLC

Not every fault flood on a machine originates in the control's PLC. Separate the alarm sources by code namespace before starting a restore, because a drive-side trip looks nothing like a lost PLC program and needs no archive load.

Source Code format Example Meaning
Siemens SINAMICS G120C drive F (fault) / A (alarm) + 5 digits F30001 Overcurrent detected in the power unit; shutdown via IGBT protection
Siemens SINAMICS G120C drive F + 5 digits F07011 Motor overtemperature
Siemens SINAMICS G120C drive F + 5 digits F07902 Motor stalled/blocked
Rockwell PowerFlex 525 drive F + 3 digits F004 Undervoltage — DC bus below approx. 380 V DC on a 480 V supply
Rockwell PowerFlex 525 drive F + 3 digits F005 Overvoltage — DC bus above approx. 810 V DC, typical of regenerative braking; extend the decel time or fit a dynamic brake resistor

The Siemens list manual documents, for every fault and alarm, the cause, the reaction (OFF1/OFF2) and the acknowledgement mode — use it to decide whether a fault self-clears, needs a manual acknowledge, or requires a power cycle. See the SINAMICS G120C List Manual (LH13) and the PowerFlex 525 product information.

Judging Whether the Message Flood Itself Is the Problem

When a control comes back after a restore, operators often report "too many messages." Use published alarm-management benchmarks rather than opinion to decide whether the alarm configuration needs rationalization:

Metric Benchmark value Assessment
Average alarm rate < 1 alarm per 10 minutes Very likely acceptable (EEMUA 191)
Alarms per operator per hour < 6 Target value
Alarms per operator per hour > 30 Severely deficient
Peak rate after an upset max. 10 alarms per 10 minutes Upper bound for manageable response

ANSI/ISA-18.2 (2009) is consistent with EEMUA 191 and forms the basis of IEC 62682. Reference: alarm management standards and guidelines overview. If a restored machine still exceeds these rates in steady state, the problem is alarm design — duplicated, chattering, or non-actionable messages — not the PLC restore.

Preventive Measures

  • Take a commissioning archive after every commissioning, machine data change, and PLC modification. Store two copies off-machine, one of them off-site.
  • Record the serial interface parameters used for a successful transfer directly in the machine file. Recovering those settings under pressure wastes hours.
  • Replace backup batteries on a scheduled interval with the control powered on, so memory retention is never dependent on the battery during the swap.
  • Label each archive with machine serial number, control software version, and date. An unlabeled archive is a liability during a breakdown.
  • Keep one known-good RS-232 cable and one known-good serial adapter in the service kit, tested against a live control, not just a loopback plug.

Why does the CNC restart several times while the commissioning file loads?

Machine data blocks read in from the archive require a control restart to become active. The control reboots automatically at those points during the read-in. This is normal — let the transfer run to completion and do not cut power.

Can I load a commissioning archive from an identical sister machine?

It will load, but axis compensation, encoder/reference offsets, drive data, and tool data are machine-specific. Use it only as an emergency base, then re-verify referencing, backlash and leadscrew compensation, and drive/motor assignment before production.

The PLC program disappears again after every power cycle. What is wrong?

The data restore succeeded but retention failed. Check the backup battery voltage first, then suspect the SRAM/memory module or its supply. Reload, power down for at least 5 minutes, and if the program is gone again the fault is hardware.

What serial settings should I use in PCIN?

Read the actual values from the control's V.24 interface parameter screen and mirror them exactly in PCIN — baud rate, data bits, parity, stop bits, and handshake. Enable hardware RTS/CTS handshake and use a null-modem cable with those lines wired; mismatched parity is the most common cause of an aborted transfer.

How do I tell a drive fault from a lost PLC program?

Check the code namespace. Drive faults carry drive-specific formats such as F30001 or F07011 on SINAMICS G120C, or F004/F005 on a PowerFlex 525. A missing PLC program shows as no user program in the PLC status screen and dead interface signals, with no drive fault code attached.

Back to blog