S7-300 Comment Storage: PG vs PLC Load Memory Reference

David Krause12 min read
S7-300SiemensTechnical 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

S7-300 Memory Architecture and Comment Storage

The Siemens SIMATIC S7-300 PLC family separates program storage into three distinct memory areas, and understanding this partitioning is the foundation for answering the most common service question on these systems: where do my comments actually live after I download? The three areas are:

  • Load Memory (Ladespeicher) — non-volatile storage, historically FEPROM and now almost universally a Micro Memory Card (MMC). Holds the compiled blocks (OB, FB, FC, DB) plus system data blocks (SDB). For CPU 31xC and any CPU 31x running firmware V2.0 or later, the MMC is mandatory because the integrated EPROM was removed.
  • Work Memory (Arbeitsspeicher) — volatile RAM used at runtime. Contains the active code and data block working copies.
  • System Memory — RAM area containing the process image (PII/PIQ), bit memory (M), timers (T), counters (C), and the local stack.
None of these three areas, in their downloaded state, contain the comments or symbols authored in STEP 7 V5.x. Comments and symbols are not compiled into the load image — they remain attributes of the offline project database on the programming device (PG) or PC.

This behavior is consistent from the early STEP 7 V5.x releases through the final V5.6/V5.7 maintenance versions. It is independent of CPU firmware level, MMC capacity, or block count. Refer to the SIMATIC S7-300 CPU 31xC and CPU 31x Operating Instructions and the S7-300 Automation System System Manual for the canonical memory model.

Where Comments Reside: PG/PC Project vs PLC Runtime

A STEP 7 V5.x project is a relational database (typically .s7p for single-project or *.s7l for libraries) that contains the following logical objects:

Object Stored on PG/PC Downloaded to PLC
Symbol Table (S7-Program > Symbols) Yes No
Block Title (block header) Yes No
Block Comment / Block Family Yes No
Network Title (NW > Properties) Yes No
Network Comment (NW > Comment) Yes No
Symbolic Address in LAD/FBD/STL Yes (with absolute resolution at compile) No (only absolute addresses)
LAD/FBD Element Comments (right-click > Insert Comment) Yes No
Variable Comment (in DB) Yes No
Compiled MC7 code Generated Yes
SDB (system data: HW config, net config, PG routing) Generated Yes

The download pipeline strips everything that is not required for runtime. Comments, symbol names, and titles are stripped before the binary load image is written to the MMC. The PLC only receives what the CPU needs to execute logic: MC7 code, DB initial values, SDBs containing the hardware configuration, and (optionally) recipes in the form of DBs.

Download Behavior: What Reaches the PLC and What Does Not

When you select PLC > Download in STEP 7 V5.x, the following sequence executes:

  1. STEP 7 compiles the user program into MC7 machine code.
  2. STEP 7 writes the compiled blocks to a temporary *.s7l-equivalent stream inside the project workspace.
  3. STEP 7 opens an online connection via MPI/PROFIBUS/TCP and writes the blocks to Load Memory on the MMC.
  4. The CPU copies the blocks into Work Memory on the next restart or via PLC > Operating Mode > Restart.

The connection is one-way with respect to documentation. After a download, the PG retains the source project with comments; the PLC retains the executable image without comments. Closing the project and re-opening it from the offline archive on the PG is the only path that retains comments.

Symbol information used at runtime (for example, in SFC diagnostic buffers) is taken from the system diagnostics text strings embedded in the CPU firmware, not from your project symbols. Your DB10.VAR_Pressure becomes DB10.DBD0 in the SDB.

Upload Behavior: Why Comments Disappear After Upload

PLC > Upload Station to PG (or Upload to PG) reads the blocks back from the PLC and reconstructs a partial STEP 7 project. The reconstructed project contains:

  • All blocks that exist in Load Memory, with MC7 code intact.
  • A reconstructed symbol table based on the absolute addresses only.
  • No block titles, no block comments, no network titles, no network comments.
  • No source STL/SCL/LAD source files (only compiled blocks).
  • Hardware configuration reconstructed from SDBs, but without any comments you entered in HW Config (for example, slot comments).

This is a deliberate design choice: comments are presentation-layer data, not part of the control logic. The CPU firmware does not need them to run, so they are not stored. Any field engineer who has uploaded a station after a hard disk crash on the original PG and then wondered why the entire plant looks anonymous has hit this exact issue.

Step 7 Archive (S7AR): Preserving Comments to MMC

STEP 7 V5.x provides a discrete feature to put the entire project — including comments and symbols — onto the MMC. It is the S7 Archived Program (S7AR), accessible via File > S7-Memory Card > Write to Memory Card with the option Save as Archived File (compressed) enabled.

Archive Type Extension Includes Comments Includes Symbols Includes Source Files Downloadable Directly by CPU
S7 Program (active) (internal block stream) No No No Yes
S7 Archived (S7AR) *.s7ar / *.ard Yes Yes Yes Yes (auto-extract at startup if slot empty)
User Card (backup) Various user files Depends on file Depends on file Depends on file No

The S7AR is a compressed container. When the CPU boots with an MMC containing only an S7AR file, the firmware detects the archive, decompresses it into Load Memory, and brings the CPU to RUN (provided no syntax or HW config mismatch is detected). Comments in the S7AR survive the round trip — but they remain in the archive, not in the running Load Memory. Re-uploading the station to a new PG recovers the comments from the S7AR on the MMC, not from the running blocks.

An S7AR can be password-protected. If you generate an archive without knowing the password, you cannot extract it later. Passwords are mandatory when commissioning a machine that the integrator does not want copied — they are not optional safety features.

MMC Capacity, Partitioning, and Hardware Reality

S7-300 MMCs were historically marketed by their usable capacity, not the raw NAND capacity. A card sold as "32 KB" typically shipped as a 16 MB raw device with a 32 KB logical partition pre-formatted for PLC use. This partitioning has been a continuous source of field confusion since the MMC replaced integrated FEPROM in the CPU 31xC family.

Article Number (Siemens) Marketed Capacity Raw Capacity Typical Use
6ES7 953-8LF00-0AA0 64 KB 16 MB Small programs, legacy 31x
6ES7 953-8LG00-0AA0 128 KB 16 MB Small/medium programs
6ES7 953-8LJ00-0AA0 512 KB 16 MB Medium programs
6ES7 953-8LL00-0AA0 2 MB 16 MB Large programs, S7AR storage
6ES7 953-8LM00-0AA0 4 MB 16 MB Large programs + S7AR
6ES7 953-8LP00-0AA0 8 MB 16 MB Maximum for S7-300

The remaining capacity on the card, beyond the formatted PLC partition, is exposed as a FAT16 file system accessible from any Windows PC with a standard SD/MMC adapter (older cards) or via the S7-MMC Adapter (6ES7 791-2BA00-0AA0). This means you can manually copy .s7ar, .s7p, .pdf, .dwg, and other documentation files to the card and store the entire project archive alongside the PLC program. See SIMATIC S7-300 CPU 31x Operating Instructions, section on MMC handling.

The marketing-cap vs raw-cap discrepancy is intentional: Siemens formats only what the firmware needs for the Load Memory partition and leaves the remainder user-accessible. Third-party tools such as the S7 Tool (free, hosted on Siemens support pages) can re-partition cards to use the full capacity for PLC storage if needed, but doing so removes the FAT16 partition and your ability to store archives on the card.

Workarounds for Comment Preservation

Field engineers who need to preserve comments across downloads, PG swaps, or audit cycles have several practical options:

  1. Generate an S7AR on every commissioning milestone. Write the S7AR to MMC, eject the card, and treat it as a controlled document. This is the canonical Siemens-recommended procedure.
  2. Export the project as a STEP 7 archive on the network share. File > Archive produces a compressed *.zip-compatible file with full comment fidelity.
  3. Source files (STL/SCL/LAD). Options > Manage STL Source Files lets you generate compilable ASCII source files containing network titles and network comments. Source files can be checked into version control (Subversion, Git) and recompiled on any PG that has the matching STEP 7 version and the matching library blocks installed.
  4. PDF printout of the program. File > Print on the blocks folder produces a printable program listing with comments. Use this as an audit artefact.
  5. Re-attach source files after upload. Options > Manage STL Source Files > Insert Source File on an uploaded station lets you paste comments back into the offline blocks — but only if you still have a clean copy of the source file.
LAD network comments and rung comments are entered by right-clicking the first row of the rung and selecting Insert Comment/Label, or by selecting the first row and using Edit > Insert Comment/Label. This is the same workflow documented in non-Siemens platforms such as the AutomationDirect Ladder Diagram editor (AutomationDirect LAD Comment/Label Help); the data lives in the same place — the offline project — and behaves identically at upload/download.

Comparison with TIA Portal and Other Platforms

The behavior is materially different in TIA Portal, which is why the question comes up so frequently from engineers migrating from V5.x.

Behavior STEP 7 V5.x TIA Portal (S7-300/400/1500)
Comments on download Stripped from PLC image Stripped from PLC image (same)
Comments on upload Lost Lost (same)
Symbol table on upload Lost Lost (same)
Project on MMC S7AR supported SIMATIC MC archive / TIA Portal project on card
Library handling Separate libraries in project Master copies in library, types attached as instances
Source files STL/SCL source export supported Limited; PLC tag comments exported via TIA Portal Openness

For Allen-Bradley ControlLogix and CompactLogix systems, the analogous situation is that the .ACD project file remains on the workstation, while the controller stores only .L5X export-compatible compiled logic. Comments and tag descriptions uploaded via Upload from Logix Designer are populated with the controller-resident text, which is closer to TIA Portal behavior than to STEP 7 V5.x. See the Logix 5000 Controllers Import/Export Reference Manual for the documented behavior.

Field Commissioning Notes and Best Practices

Use the following checklist on every S7-300 commissioning to avoid losing comments:

  1. Before download: File > Archive the project to a known network location. Confirm archive size matches the project size.
  2. After successful download and first RUN: File > S7-Memory Card > Write to Memory Card, select Save as Archived File (compressed), and write to the MMC in the CPU. Verify the file appears when you read the card on a PC.
  3. On every firmware update or hardware change: Regenerate the S7AR. Old SDBs in an old S7AR will not match the new HW config and will be discarded by the CPU on next boot.
  4. Before sending a station to the field: Confirm that the FAT16 partition of the MMC contains S7PROGR.S7AR (or your custom archive name) and any documentation PDFs.
  5. On site: Always pull the MMC before removing the CPU and keep it with the panel. A CPU without MMC loses the program on power removal (CPU 31x with battery backup excepted).

Troubleshooting Matrix

Symptom Likely Cause Resolution
Uploaded station has no comments Comments are not part of Load Memory Use S7AR on MMC; restore from PG backup
Uploaded station has no symbols Symbol table is not part of Load Memory Restore symbol table from offline project
CPU will not boot from MMC after replacement MMC card was not formatted for the new CPU; or S7AR was password-protected with an unknown password Re-write S7AR without password; verify CPU order number (MLFB) matches HW config
Comments present on PG but missing in printout Printout filter set to Block contents only File > Print > Properties: enable block title, block comment, network title, network comment
DB variable comments missing on upload DB was uploaded as compiled, source not present Re-generate source from offline DB and re-attach
MMC shows wrong size in Windows Card is partitioned; FAT16 partition is user-visible, PLC partition is hidden Use S7 Tool to inspect partitions; do not re-format the hidden partition
Cannot write to MMC from PG MMC write-protect tab is set, or card is locked by CPU Remove MMC from CPU, slide write-protect tab, re-insert
S7AR extract fails on CPU STEP 7 version on PG newer than CPU firmware supports for S7AR Match STEP 7 version to CPU firmware release notes; archive on older PG if needed

Specifications: STEP 7 V5.x Comment-Related Parameters

Parameter / Setting Default Effect on Comments
Options > Customize > LAD/FBD > Comment width 24 chars Visible column width in editor only; no effect on download
Options > Customize > Print > Comment Enabled Determines whether comments appear in printouts
Block Properties > Author / Family / Title / Comment Empty Stored in offline project only; not downloaded
Network Properties > Title / Comment Empty Stored in offline project only; not downloaded
Symbol Table > Comment column Empty Stored in offline project only; not downloaded
DB variable Comment field Empty Stored in offline project only; not downloaded
Options > Manage STL Source Files > Generate Source N/A Exports compilable source including comments for version control

FAQ

Do program comments get downloaded to the S7-300 PLC?

No. Block titles, block comments, network titles, network comments, ladder element comments, and symbol names are stripped from the load image before the program is written to the MMC. The PLC only stores compiled MC7 code, DB initial values, and SDBs. Comments and symbols remain on the PG/PC project database.

How do I preserve comments across a hardware swap?

Generate an S7 Archive (S7AR) via File > S7-Memory Card > Write to Memory Card with the option to save as an archived file. The S7AR is a compressed container with comments and symbols intact. Insert the MMC into the new CPU; on power-up, the CPU extracts the S7AR and runs the program. Comments stay in the archive, not in the running Load Memory.

Why is my MMC marketed as 32 KB when Windows shows it as 16 MB?

Siemens MMCs are partitioned: a small formatted partition is exposed to the CPU as Load Memory, and the remainder is formatted as FAT16 for user file storage. The marketed capacity refers to the PLC partition only. Use the Siemens S7 Tool or a standard SD/MMC adapter to inspect both partitions.

Can I upload a station and get the comments back?

No. PLC > Upload Station to PG reads the compiled blocks from Load Memory and reconstructs an offline project without comments or symbols. To restore comments, you must reload the offline project from a backup or open the S7AR from the MMC.

Where are comments stored in STEP 7 source files?

Network titles, network comments, and rung comments are embedded in the ASCII source file generated via Options > Manage STL Source Files > Generate Source. These source files can be checked into version control and recompiled on any PG with matching STEP 7 and library versions, recovering the full annotation set.

Back to blog