SINUMERIK PCU50.3 File Storage: Recovering Deleted NC Programs

David Krause11 min read
HMI / SCADASiemensTechnical Reference
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

1. SINUMERIK 840D sl Storage Architecture Overview

The SINUMERIK 840D sl control separates operator-side mass storage from the NCK (Numerical Control Kernel) working memory. Two physically distinct media cooperate whenever an NC program is edited, executed, or archived:

  • PCU 50.3 hard disk – a Windows-based partition scheme rooted at F:\ that holds the editable copies of all part programs, workpieces, and tools.
  • NCU static memory – battery-backed SRAM inside the Numerical Control Unit that holds the currently active (loaded) program image used by the interpolator.

Operators interact only with the F:\ tree; the NCU SRAM is populated by an automatic load/unload protocol that the HMI software triggers in response to Load, Unload, Select, and Execute actions. Understanding that protocol is the prerequisite for any successful recovery of a deleted .mpf, .spf, or .wpd.

The active runtime for the architecture described in this reference is HMI v7.30.45 SP2 running on a PCU 50.3, paired with an NCU 7x0.x or NCU 710.x. Newer controller generations (NCU 730.3, SINUMERIK ONE) replace this scheme with CFast-based or SSD-based storage, but the load/unload semantics described here still apply conceptually.

2. PCU 50.3 Hardware and HMI v7.30.45 SP2 Environment

The PCU 50.3 (Type 6FC5210-0DF31-2AA0 in the standard configuration) is an industrial PC with a CompactFlash or HDD subsystem that boots Microsoft Windows Embedded Standard 7. The HMI v7.30.45 SP2 runtime is installed on top of the operating system. The relevant storage characteristics are:

Component Description Implication for File Recovery
System drive C:\ Windows installation, HMI runtime, system services Operator files must never be written here; Recycle Bin is disabled
User drive F:\ Operator part programs, workpieces, HMI user data Default location for mpf, spf, wpd, wks
NCK SRAM (NCU) Static RAM on the NCU module, battery-buffered Loaded programs live here; cannot be browsed from Windows
CFast / HDD type Industrial-grade SLC or MLC media Wear leveling and TRIM may erase deleted clusters immediately
Always confirm the HMI version under Start > System > Version or via the HMI Operator Panel menu before applying any procedure; behavior described here is validated for HMI v7.30.45 SP2 only. Patch levels that diverge (e.g. SP3, SP4) may relocate the dh directory or alter Recycle Bin policy.

3. F: Partition Layout and Program Directories

The F:\ partition follows a strict directory convention enforced by the HMI shell. Programs are only displayed in the program manager when they reside in one of the recognized paths:

F:\
├── dh\
│   ├── wks\
│   │   ├── workpiece_001\
│   │   │   ├── wpd\
│   │   │   │   ├── program.mpf
│   │   │   │   └── subroutine.spf
│   │   ├── workpiece_002\
│   ├── cus\
│   │   └── (manufacturer cycles)
│   ├── cma\
│   │   └── (manufacturer macros)
│   └── arp\
│       └── (archive sub-directories)
└── (other HMI user data)

The wks tree corresponds to the Workpieces entry in the HMI program manager. Each workpiece has its own subdirectory containing a wpd folder that holds the executable .mpf and any number of .spf sub-program files. The HMI scans this tree on startup to populate the selection list, which is why deleted files stop appearing immediately in the operator area.

3.1 Recognized File Extensions

Extension Meaning Storage Editable in HMI?
.mpf Main Program File NCU SRAM when active, F: when not Yes (via HMI editor)
.spf Sub-Program File NCU SRAM when active, F: when not Yes (via HMI editor)
.wpd Work Piece Directory container F: only No (container only)
.wks Workpiece directory (alias) F: only No
.arc NC archive (binary backup) F:\dh\arp No (read by WINPCIN)
.ini HMI configuration F: or C: No (system files)

4. NC Program File Types: mpf, spf, wpd/wks, and Archives

An NC program in SINUMERIK nomenclature is one of three logical objects:

  • Main program (mpf) – the entry point for part execution. The HMI runs a single mpf at a time.
  • Sub-program (spf) – a callable block of code referenced via L or CALL statements from the mpf or from other spf files. Sub-programs can be deeply nested.
  • Workpiece directory (wpd / wks) – a logical container that groups an mpf with the spf files and metadata (tools, setters, comments) belonging to a single part. The HMI requires a workpiece container for program selection; a loose mpf without a wks parent can be selected but loses tool data.

The archive (.arc) is a binary snapshot generated by the HMI Commissioning > Create NC archive function or by the SAVE command on the CF card. Archives are not loaded into the NCK; they are unpacked back to F:\dh\wks only.

5. Program Lifecycle: From Hard Disk to NCU Static Memory

The HMI uses a state machine to keep the F: directory and the NCU SRAM in sync. There are four observable states for any given program file:

  1. Not loaded – file exists on F:\dh\wks only. Visible in program manager; not active.
  2. Selected – the HMI has staged the file in the NCK working memory but has not committed it to static memory. Selecting the same program again is a no-op.
  3. Loaded – the file is in NCU static memory; F: copy remains as the source of truth. Editing through the HMI updates both copies atomically.
  4. Unloaded – the file is removed from NCU SRAM; the F: copy remains. Triggered by an explicit Unload action, by a Reset, or by power-off if battery is dead.

The user-visible rule is: anything you see in F:\dh\wks is not currently in the NCU; anything currently executing is not in F:\dh\wks. This rule is the basis for both backup and recovery.

6. File Deletion Mechanics and the Windows CE Recycle Bin

The HMI's program manager is a thin shell that delegates filesystem operations to the underlying Windows Embedded file system. Deleting a workpiece directory therefore does not issue a raw unlink; it uses the standard Windows Recycle Bin mechanism:

  1. Operator highlights a workpiece in the HMI program manager.
  2. The shell prompts: "Are you sure you want to remove the folder xxxx and move all of its components to the Recycle Bin?"
  3. If the operator confirms, the directory tree is moved into RECYCLER on the same drive.
  4. The data is recoverable from the Recycle Bin only as long as the operator has not run Empty Recycle Bin or as long as the bin has not exceeded its size quota.
If the HMI is configured to skip the Recycle Bin for operator files (set in systemconfiguration.ini under [ProgramManager] with RecycleBin=0), deletion is immediate and unrecoverable by any means short of a media-level forensic recovery. Always verify this setting before starting any restoration work.

7. Why Standard Recovery Tools Fail on the F: Partition

Several factors make consumer forensic tools (PhotoRec, Recuva, commercial undelete utilities) unlikely to recover deleted NC programs on a PCU 50.3:

Failure Mode Root Cause Field Symptom
Filesystem unreadable NTFS on a proprietary partition; tools see no valid boot sector Recovery tool reports "unrecognized filesystem"
TRIM issued by SSD controller Industrial SSD firmware zeroes freed blocks within seconds Deleted clusters return all zeros
HMI reuses same directory New workpiece creation overwrites the freed clusters Carving finds only the new program's blocks
Empty Recycle Bin executed Windows overwrites MFT record with free markers MFT entry no longer references original name
Recycle Bin moved off-drive Configuration puts bin on a separate partition that may be encrypted Tool sees bin as foreign volume

The combination of these conditions is why low-level carving (for example, signature-based searches for the %_N_ NC identifier at the head of every program block) returns no matches even on drives that were not encrypted. The blocks are physically intact but logically re-allocated by the time the operator attempts recovery.

8. NC Archive Backup: Restoring Programs from WINPCIN Splits

The supported recovery path is restoration from an existing NC archive. The HMI v7.30.45 SP2 Commissioning menu creates archives as a single .arc file that can be split into individual program files for transfer back to a PCU. The transfer utility is WINPCIN.

8.1 Generating a Split Archive

  1. On the HMI: navigate to Start > Commissioning > NC Archive.
  2. Select Create NC archive. The HMI builds a binary archive on the active CF card or in F:\dh\arp.
  3. Copy the resulting .arc file to a USB stick or a network share accessible from the engineering PC.

8.2 Splitting the Archive with WINPCIN

  1. Install WINPCIN on the engineering PC (Microsoft Windows; available on the SINUMERIK tool CD or as a free download from the Siemens support portal).
  2. Launch WINPCIN. Select File > Open Archive and choose the .arc file.
  3. Use Archive > Split Archive to expand the binary archive into individual .mpf and .spf text files. Each file is given its original workpiece directory structure.
  4. Inspect the output directory. Each text file begins with a %_N_ identifier that includes the program name and path, which can be cross-referenced to the original F: layout.

8.3 Restoring to the PCU

  1. Reconnect WINPCIN to the PCU over Ethernet (default port 1900) or RS-232 (default 9600 8N1).
  2. Select File > Send > NC Program and push the previously split files into F:\dh\wks\<workpiece_dir>\wpd\.
  3. Verify the HMI program manager refreshes and the workpiece reappears.

Detailed WINPCIN field procedure is documented in the SINUMERIK Operate Programming and Operating Manual, available through the Siemens Industry Online Support portal. Archive handling semantics are covered in the SINUMERIK 840D sl Commissioning Manual, also at the same Siemens Industry Online Support site.

9. Preventive Backup Strategy and Versioning Workflow

Because forensic recovery on the F: partition is unreliable, the only field-proven approach is to capture archives on a fixed schedule. Recommended policy:

  • Daily incremental – HMI Create NC archive scheduled via the HMI's batch planner; output pushed to a UNC path on the shop floor server.
  • Per-shift full – same procedure but full archive (include all workpieces), retained 30 days.
  • Per-tool-change full – triggered by an HMI tool change event in the program list, capturing the program set associated with the new tool.
  • Pre-edit snapshot – any time an operator opens the editor, the HMI automatically writes a *.bak to the same directory; do not disable this in systemconfiguration.ini.
Disable the HMI's "Empty Recycle Bin on shutdown" option (under System > Settings > Storage) to give the operator a second chance to undelete a recently removed workpiece.

10. File Transfer Utilities and Connectivity

Utility Transport Default Port Use Case
WINPCIN TCP/IP or RS-232 1900 (TCP) / 9600 baud (serial) Archive split, program send/receive
RCS Commander TCP/IP 22 (SFTP) Direct file access to F: from engineering PC
HMI USB stick menu USB mass storage n/a Offline archive copy, large file movement
SINUMERIK Integrate Server TCP/IP, OPC UA 4840 Centralized program management across multiple PCUs

Always confirm the PCU 50.3 firewall rules permit the chosen transport before starting a recovery; by default, the HMI blocks inbound TCP 1900 and requires explicit activation in System > Network > Firewall.

11. Verification Checklist After Recovery

  1. Confirm the restored workpiece appears in HMI > Program Manager > Workpieces with the correct name and last-modified date.
  2. Open each mpf and spf in the HMI editor and verify the first line begins with %_N_<name>_<path>.
  3. Select the workpiece, then Load, and confirm the HMI log records the load operation without error (look for NCK error 0 in the diagnosis log).
  4. Execute a dry run (single block) of the restored program with the spindle disabled to confirm runtime behavior.
  5. Trigger a new NC archive and verify the restored programs are captured in the resulting .arc file.

If any step fails, re-verify the source archive integrity by re-running the WINPCIN split and checking the output .arc checksum against the original.

12. Related Configuration Files and Diagnostic Paths

The following HMI-side files are useful when diagnosing deletion or recovery issues:

  • F:\dh\wks\<workpiece>\wpd\*.mpf / *.spf – operator program source.
  • C:\Program Files (x86)\Siemens\Automation\SINUMERIK_Operate\systemconfiguration.ini – controls Recycle Bin, auto-archive, and editor behavior.
  • F:\dh\arp\*.arc – current archives.
  • F:\dh\cus\*.com – manufacturer cycles, also subject to the same deletion rules.
  • F:\user\<operator>\ – per-operator settings, not typically subject to the program lifecycle.

Where does a loaded NC program actually live on a SINUMERIK 840D sl with PCU 50.3?

While loaded, an NC program resides in the battery-backed static memory of the NCU module, not on the F: hard drive. The F: drive holds the editable source-of-truth copy in F:\dh\wks\<workpiece>\wpd\. The HMI synchronizes the two locations during Load, Unload, and Edit operations.

Can deleted mpf or spf files be recovered with standard undelete tools?

Usually no. The F: partition uses NTFS, but the HMI empties the Recycle Bin quickly and SSD-level TRIM can zero the freed clusters within seconds. The only reliable recovery path is restoration from a previously created NC archive split through WINPCIN.

What is the difference between .mpf, .spf, and .wpd?

.mpf is the main program file executed by the NCK, .spf is a sub-program file called by the mpf, and .wpd is the work piece directory container that groups an mpf with its spf files and tool data for selection in the HMI program manager.

How do I split an .arc archive into individual program files?

Copy the .arc file from F:\dh\arp to a USB stick or network share, then open it in WINPCIN on an engineering PC and use Archive > Split Archive. The output is a directory of plain-text .mpf and .spf files you can re-send to the PCU.

Does disabling the Recycle Bin on PCU 50.3 improve security?

It improves auditability by ensuring deletion is final, but it removes the operator's last chance to recover an accidentally deleted workpiece. The recommended setting is to keep the Recycle Bin enabled with a 10 percent volume cap and to disable the Empty Recycle Bin on shutdown option, then rely on a daily NC archive policy for permanent backups.

Back to blog