Resolving SINUMERIK 840D/828D Simulation Alarm 6540 Errors
Problem Overview
Field reports across SINUMERIK 840D sl and 828D machine tools document a recurring simulation failure in which the SINUMERIK Operate HMI stops launching the workpiece or tool-path simulation. The active NC program continues to be edited, loaded, and executed, but the graphical simulation view either returns a blank canvas, fails to render the workpiece, or terminates before the first G-code block is drawn.
The alarm condition driving this behavior on affected controllers is Alarm 6540 with the diagnostic text "Zu viele Verzeichnisse im NC-Speicher" (English: "Too many directories in the NC memory"). The alarm is raised by the HMI simulation runtime when it attempts to allocate a temporary working directory for the simulation scratch area and the NC file system has reached the configured directory-count ceiling or the underlying storage medium has become fragmented.
Simulation on SINUMERIK controllers is a software-only function that runs on the HMI, not on the NCK. Therefore the symptom presents identically on the SINUMERIK Operate on PC (IPC) and on the SINUMERIK Operate embedded on the PPU (Panel Processing Unit) of the 828D and on the TCU/NCU of the 840D sl. Operators frequently assume the NCK has lost program memory, but the actual fault condition is contained within the HMI's simulation cache.
Affected Controllers and Software Versions
Alarm 6540 has been observed on the following configurations. The shared root cause is the simulation cache management logic introduced with the SINUMERIK Operate V4.x generation and carried forward into V5.x and V6.x.
| Controller | Display / HMI | SINUMERIK Operate Version | Notes |
|---|---|---|---|
| SINUMERIK 840D sl | TCU + NCU 710.3 / NCU 720.3 / NCU 730.3 | V4.5 SP3 and later, up to V6.20 | Both NCU-based and PCU-based HMI variants affected |
| SINUMERIK 840D sl (Upgrade) | PCU 50.5 with Windows 10 IoT | V4.93 / V5.x | Simulated CFast storage of PCU can show same symptom |
| SINUMERIK 828D | PPU 24x.3 / PPU 28x.3 | V4.5 SP3 and later, up to V6.20 | Compact Flash / SSD on PPU is the scratch storage |
| SINUMERIK 828D (Software NCK) | SW 828D on industrial PC | V4.7 SP4 and later | Local temp folder on PCU mirrors PPU behavior |
| SINUMERIK ONE | NCU 1750 / NX 10 / NX 15 | V6.13 and later | Inherits 840D sl directory-count logic; same recovery path applies |
Root Cause Analysis
The simulation runtime of SINUMERIK Operate allocates a subdirectory tree under /tmp/simulation/ (Linux-based PPU/PCU) or under C:\Program Files (x86)\Siemens\Automation\SinumerikHMI\temp\simulation\ (Windows-based PCU/IPC). Each launched simulation creates one or more nested directories per active channel, per workpiece, per tool, and per view plane. The directory-count limit on a single partition is governed by:
- The journaled file system inode ceiling (default 65,536 subdirectories per partition on ext3/ext4 with default
mke2fsparameters) - The internal
HMESimDirLimitparameter shipped inslsimconfig.xmllocated at/system/etc/ - The free space threshold of the underlying medium (CFast on PPU 24x/28x, SSD on PPU 26x, hard disk on PCU 50.5)
When the directory count crosses the threshold, the HMI raises alarm 6540 and refuses to launch any further simulation. Restarting the HMI does not clear the alarm because the subdirectories persist on the storage medium.
Fragmentation of the scratch storage amplifies the issue on older CFast cards that have seen many power-on hours. Read/write errors on aging media can corrupt individual simulation scratch directories, leaving "ghost" entries that count toward the limit even though the contained files are unreadable.
Alarm 6540 Specification
| Field | Value |
|---|---|
| Alarm Number | 6540 |
| Alarm Class | Power-On / Reset Clearable (HMI-side) |
| German Text | Zu viele Verzeichnisse im NC-Speicher |
| English Text | Too many directories in the NC memory |
| Clear Criterion | Alarm is cleared automatically once the offending subdirectory tree is purged via the HMI menu or the directory count drops below the threshold |
| NCK Effect | None. The NCK continues executing programs. Only the HMI simulation is impaired. |
| Reaction | No NCK Stop, no axis disable, no read-in inhibit. Pure HMI fault. |
| Acknowledgement | CANCEL key on HMI; alarm does not need a Reset. |
Symptoms and Diagnostic Indicators
Operators and service engineers should collect the following evidence before applying the fix, to confirm Alarm 6540 is the root cause and not a different simulation fault:
- Selecting Simulation > Start from the program operating area returns immediately to the editor with no simulation view.
- The HMI alarm log (accessed via the ALARM soft key in any operating area) shows entry 6540 at the time of the failed simulation launch.
- The simulation tool bar appears briefly but collapses, or the 3D view window stays blank while the simulation time counter advances.
- Manual NC start from the same program executes successfully on the machine, proving the part program itself is valid.
- Switching to the Details and further views (German: Details und weitere Ansichten) panel shows a placeholder file path that cannot be opened by the file system.
If items 1, 2, and 4 are simultaneously true, Alarm 6540 is almost certain. Item 5 in particular points to the directory-count issue rather than a graphics driver or OpenGL fault on the HMI panel.
Resolution Procedure (Recommended Path)
The official Siemens recovery procedure clears the simulation scratch area through the HMI commissioning menu. Do not delete files manually from /tmp on a PPU or from the Windows temp folder on a PCU unless instructed to do so by Siemens service personnel, because the simulation runtime writes control files alongside the cache that are required to keep part-program versioning consistent.
Prerequisites
- Access level: Service or Manufacturer password level on the SINUMERIK controller. The default Service password for legacy systems is
SUNRISE; the default Manufacturer password isCUSTOMER(uppercase). Modern systems require the customer-specific password. - No active NC program running. The simulation scratch clear can be invoked while a program is selected but not started; do not invoke it during a running program.
- Backup of any unsaved tool lists or work offsets if the controller is not on a network share.
Step-by-Step Procedure (SINUMERIK 840D sl and 828D)
- Press the MENU SELECT key (horizontal key with the house/select icon) on the operator panel.
- Navigate to Inbetriebnahme (Commissioning).
- Open the HMI submenu.
- Press the >> (horizontal right-arrow) extension soft key, located in the lower right of the soft-key bar. This exposes the second-level HMI menu that contains the simulation maintenance functions. On SINUMERIK Operate V5.x and later this soft key may be labeled weiter (continue).
- Select the soft key labeled Simulation Urlöschen (English on some locales: Delete Simulation or Simulation Reset).
- A confirmation dialog appears. Confirm with OK.
- The HMI removes the subdirectory tree under
/tmp/simulation/(or the Windows equivalent) and clears the alarm. - Return to the program operating area and re-launch the simulation to verify.
Step-by-Step Procedure (SINUMERIK ONE / Operate V6.20+)
On SINUMERIK ONE running Operate V6.20 the same path remains valid, but the menu layout is flattened. The combined key sequence is:
- MENU SELECT > Inbetriebnahme > HMI > >>
- Soft key Sim. Urlöschen (abbreviated)
- Confirm OK
If the SINUMERIK ONE is configured with HMI on IPC, the menu is identical to the 840D sl PCU 50.5 layout. The legacy path works on all SINUMERIK Operate versions from V4.5 SP3 onward.
Verification
After the Simulation Urlöschen operation completes, perform the following verification sequence:
- Navigate back to the program operating area and select the previously failing part program.
- Press the Simulation soft key and then Start.
- Confirm that the 3D view window renders the workpiece stock with the loaded tool.
- Use the simulation time slider or Program Control to step through the first 10 NC blocks. Verify tool changes and motion paths render.
- Open the alarm log and confirm that no further 6540 entries have been logged.
- As a final check, restart the HMI from the Diagnostics menu and re-launch the simulation. A clean post-restart launch confirms the directory tree was successfully purged.
Workarounds and Related Issues
If the recommended path does not resolve the alarm, or if the alarm reappears within hours, the underlying storage medium is suspect. Apply the following escalation steps in order.
Workaround 1: Manual Cleanup via Service Shell (PPU only)
On a SINUMERIK 828D PPU 24x/28x, authorized service personnel with the appropriate access level can open a service shell via SSH or via the diagnostics menu. The following commands remove only the simulation cache, not part programs or tool data:
mount -o remount,rw /
rm -rf /tmp/simulation/*
rm -rf /var/tmp/sim_*
sync
mount -o remount,ro /
Workaround 2: PCU 50.5 / IPC Cleanup
On a Windows-based PCU 50.5 or industrial PC, the temp folder is normally purged at each HMI reboot. If it is not, stop the SinumerikHMI service via services.msc and then manually remove the contents of:
C:\Users\HMIOperator\AppData\Local\Temp\Siemens\Sinumerik\simulation
Restart the HMI service. This is the only Windows-side manual procedure approved by Siemens for clearing the simulation cache.
Workaround 3: TIA Portal / WinCC Unified Cross-Reference
Operators who are also running TIA Portal V18 or later with WinCC Unified on the same engineering station sometimes confuse the SINUMERIK simulation fault with a WinCC Unified RT simulation problem. The two are independent. WinCC Unified simulation is enabled from Extras > Settings > Simulation in TIA Portal and runs on the local PC, not on the SINUMERIK controller. If the controller-side simulation is fixed but the engineering-side RT simulation still fails, see the Grundlagen zur Simulation (RT Unified) documentation. Running the WinCC Unified Configuration wizard once after installation is the documented cure for the most common RT-side fault.
Preventive Maintenance
The directory-count ceiling is not lifted by Alarm 6540; it is a soft limit enforced by the simulation runtime. The following preventive actions reduce the likelihood of recurrence.
- Schedule a quarterly Simulation Urlöschen from the commissioning menu on every controller that runs more than 4 hours of simulation per shift.
- Avoid leaving dozens of simulation sessions open in parallel. Each retains its own subdirectory until the editor closes.
- Replace CFast media on 828D PPUs that have crossed 30,000 power-on hours. Aging CFast is the dominant hardware contributor to fragment-related 6540 alarms.
- On PCU 50.5 controllers, exclude the simulation temp directory from antivirus real-time scans to prevent the antivirus from locking files while the simulation runtime is writing to them.
- Audit the
slsimconfig.xmlparameters annually; theMaxSimDirsvalue should be left at the default of 4096 unless justified by an OEM change request.
Related Alarm Codes
| Alarm | Text | Relationship to 6540 | Recommended Action |
|---|---|---|---|
| 6541 | Schreibfehler im NC-Speicher | Sibling fault raised when scratch storage is read-only or full | Check storage medium, then apply Simulation Urlöschen |
| 6550 | Zu viele Dateien im NC-Speicher | File-count ceiling instead of directory-count ceiling | Archive and delete old part programs from /mpf and /spf |
| 8060 | Simulation nicht verfügbar | Generic simulation unavailable raised when license is missing | Verify license bit for 3D simulation; replace CF/SSD if persistent |
| 17001 | Speichermedium HMI voll | HMI-side disk full | Apply HMI Urlöschen and expand archive |
Escalation Path
If Alarm 6540 reappears within 24 hours of the Simulation Urlöschen operation, escalate to the machine tool builder (OEM) with the following evidence:
- Alarm log export via Diagnostics > Logs > Save to USB
- Screenshot of the HMI version displayed at startup
- Output of
df -handdf -ifrom the PPU shell (manufacturers only) - Screenshot of the slsimconfig.xml parameters in the HMI diagnostics menu
The OEM typically forwards this package to the regional Siemens support channel with reference to the controller's CF card serial number.
Glossary
| Term | Definition |
|---|---|
| HMI | Human Machine Interface; the SINUMERIK Operate software running on the PPU or PCU |
| NCK | Numerical Control Kernel; the interpreter that runs the part program on the machine |
| PPU | Panel Processing Unit; the integrated CNC + HMI hardware of the 828D |
| PCU | PC Unit; the industrial PC hosting the HMI software on the 840D sl |
| Simulation Urlöschen | OEM German phrase for the menu function that deletes the simulation scratch directories |
| CFast | CompactFlash SATA card used as boot/scratch medium on 828D PPUs |
What does Siemens Alarm 6540 mean on a SINUMERIK 840D or 828D?
Alarm 6540 means "Too many directories in NC memory." It is raised by the HMI simulation runtime when the scratch directory tree under /tmp/simulation/ (PPU) or its Windows equivalent (PCU) has exceeded the configured limit, or the storage medium is fragmented. The alarm stops new simulation sessions but does not affect NCK program execution.
Where is the Simulation Urlöschen menu in SINUMERIK Operate?
Navigate via Menu Select > Inbetriebnahme > HMI > >> (extension soft key), then select the soft key Simulation Urlöschen. The path is consistent from SINUMERIK Operate V4.5 SP3 through V6.20 on both 840D sl and 828D.
Can I delete the simulation temp folder manually instead?
Manual deletion from /tmp on a PPU is not recommended and can cause data loss of unrelated files. Manual deletion from the Windows temp folder on a PCU is acceptable only after stopping the SinumerikHMI service. Always prefer the HMI menu procedure first.
Why does Alarm 6540 return hours after I cleared it?
Recurrence within hours indicates an aging CFast card or SSD on the PPU, a corrupted slsimconfig.xml, or an unusually high number of simultaneous simulation sessions. Replace the storage medium if the controller has accumulated more than 30,000 power-on hours.
Is Alarm 6540 the same on a SINUMERIK ONE as on a 840D sl?
Yes. SINUMERIK ONE running Operate V6.13 or later inherits the same simulation scratch directory management and raises the same 6540 alarm. The recommended Menu Select > Inbetriebnahme > HMI > >> > Sim. Urlöschen path is unchanged.