S7-SCL Package Installation Rules and Decompilation to STL in PCS 7

S7-SCL Package Installation Rules and Decompilation to STL in PCS 7

In SIMATIC PCS 7, do not install standalone STEP 7 S7-SCL packages from external media; S7-SCL is an integrated component provided directly on the official SIMATIC PCS 7 installation media DVD. To add missing S7-SCL to an Engineering Station, run Setup.exe from the PCS 7 DVD and select the S7-SCL component under package modification. Furthermore, when an SCL block opens displaying Statement List (STL/AWL) code instead of high-level SCL, the block was opened from the 'Blocks' folder without its corresponding source file in the 'Sources' folder. SCL compiles into MC7 machine code; without the source file (*.scl), STEP 7 decompiles the block to raw STL.

Table of Contents

Software Distribution Rules: PCS 7 Media vs Standalone STEP 7 Packages

SIMATIC PCS 7 is delivered as a thoroughly tested, unified system bundle. Each major PCS 7 version and service pack integrates specific, validated releases of STEP 7, CFC, SFC, S7-SCL, WinCC, and hardware drivers. A common mistake made by engineers transitioning from discrete automation is attempting to install standalone packages—such as S7-SCL V5.3 from a classic STEP 7 Professional disk—onto a PCS 7 Engineering Station.

Installing standalone STEP 7 packages over PCS 7 breaks system registry entries, corrupts inter-tool communication interfaces (such as the CFC compiler and Master Data Library synchronization), and frequently results in installation abort errors. In PCS 7, S7-SCL is bundled natively on the primary installation media DVD (DVD 1 / SIMATIC PCS 7). If S7-SCL was omitted during the initial engineering setup, it must be installed using the official PCS 7 setup launcher.

Why Compiled SCL Blocks Decompile into Statement List (STL)

When an engineer writes structured control logic in Structured Control Language (SCL), the code resides as high-level human-readable text in a source file within the Sources (Quellen) container of the S7 program. During compilation, the S7-SCL compiler translates this structured text into Siemens MC7 machine language stored inside a Function Block (FB) or Function (FC) in the Blocks (Bausteine) container.

When opening an FB or FC in SIMATIC Manager:

  1. If the associated SCL source file (*.scl) exists in the Sources folder, the editor opens the high-level SCL source text.
  2. If the source file is missing (e.g. project was archived without sources, or blocks were copied from a compiled library), STEP 7 cannot reverse-engineer the high-level language structures (such as CASE, FOR, or WHILE loops). Instead, it decompiles the raw MC7 machine code into the lowest common denominator: Statement List (STL / AWL).
  3. If a block was protected using Know-How Protection ({ S7_m_c := 'true' } / PROTECT) and unlocked without sources, it similarly renders strictly as STL.

Step-by-Step Procedure to Install S7-SCL from PCS 7 Media

Follow this procedure to install or repair S7-SCL cleanly on a PCS 7 Engineering Station:

  1. Mount Official Media: Insert or mount the official SIMATIC PCS 7 installation media DVD (e.g. PCS 7 V7.1 SP3 or V9.0) matching the exact installed system release.
  2. Launch Setup Launcher: Navigate to the root directory and execute Setup.exe with administrative privileges.
  3. Select Package Modification: In the setup wizard, select Package installation or Modify / Update.
  4. Select S7-SCL Component: In the software component selection tree, locate Engineering System -> STEP 7 -> S7-SCL and ensure its checkbox is enabled.
  5. Complete Installation: Follow the wizard prompts to install the validated SCL version and restart the operating system when requested.
  6. Restore SCL Sources: If project blocks open as STL, retrieve the original .scl source files from project engineering backups, copy them into the Sources folder, and compile them to restore SCL association.

S7 Programming Language Architecture and Decompilation Matrix

The following table compares code representations, source requirements, and decompilation behaviors in SIMATIC Manager:

Programming LanguageSource Storage LocationCompiled Binary TargetBehavior When Source File Is PresentBehavior When Source File Is MissingStructured Control Language (SCL)Sources/ folder (*.scl)Blocks/ folder (FB/FC)Opens full structured text editorDecompiles into Statement List (STL)Continuous Function Chart (CFC)Charts/ container (*.cfc)Blocks/ folder (DB/FB)Opens graphic chart editorCannot be decompiled; raw instance DBsStatement List (STL / AWL)Stored directly in blockBlocks/ folder (FB/FC)Opens standard STL code editorOpens standard STL code editorLadder Logic (LAD / KOP)Stored directly in blockBlocks/ folder (FB/FC)Opens graphic ladder diagramReverts to STL if networks are non-standardSequential Function Chart (SFC)Charts/ container (*.sfc)Blocks/ folder (FB/DB)Opens graphic state machine editorCannot be decompiled; raw instance DBs

[!NOTE]
Commercial Accuracy Notice: The S7-SCL compiler is included as part of the SIMATIC PCS 7 Engineering Software license > package (6ES7658-1EX58-0YA5). No standalone S7-SCL license (6ES7811-1CC05-0YA5) is required when running under a > certified PCS 7 Engineering Station installation.

Verification

Verify proper installation and functionality of the S7-SCL development environment:

  1. Component Verification: In SIMATIC Manager, select Help -> About... -> Installed Software. Confirm that S7-SCL appears in the component table with a version matching the PCS 7 compatibility matrix.
  2. Source Creation Test: In the Sources folder, right-click and select Insert New Object -> SCL Source File. Open the file and verify that the S7-SCL syntax-highlighted editor opens without licensing popups.
  3. Block Compilation Test: Author a simple function block in SCL and execute File -> Compile. Verify that the corresponding FB appears in the Blocks folder and imports cleanly into CFC.

Limitations and Operational Precautions

Observe these guidelines when managing SCL source code in PCS 7:

  1. Never Edit Decompiled STL: If an SCL block opens as STL due to missing sources, do not edit the STL code directly. Any subsequent compilation of the original SCL source will completely overwrite manual STL edits.
  2. Include Sources in Project Archives: When archiving projects using File -> Archive, ensure that the project options do not exclude source folders.
  3. OS Version Compatibility: Ensure that old PCS 7 releases (e.g. PCS 7 V7.1 on Windows XP) are maintained strictly on supported virtual machine hypervisors to prevent installer aborts.

Engineer FAQ

Why can't I install my classic STEP 7 SCL CD onto a PCS 7 computer?

PCS 7 requires integrated system software versions. Standalone STEP 7 packages lack necessary PCS 7 wrapper components and conflict with installed library drivers. Always use the official PCS 7 media.

Why does an FB created in SCL display in STL when opened?

SCL compiles into MC7 machine instructions. If the source file in the 'Sources' folder is missing or detached, STEP 7 decompiles the machine code into raw STL because it cannot reconstruct high-level syntax without the source.

Where can I find the SCL source files in a PCS 7 project?

In SIMATIC Manager, expand the S7 Program folder. The high-level text files are stored under the 'Sources' folder with the .scl extension.

Can I import an SCL-generated FB into a CFC chart?

Yes. Once compiled in SCL with attributes { S7_m_c := 'true' }, the FB appears in the SIMATIC Manager block folder and can be dragged into any CFC chart or synchronized via the Master Data Library.

Technical References

Related Articles

Related Tags

  • S7-SCL
  • Software Installation
  • Decompilation
  • Sources Folder
  • STL Decompilation
  • PCS 7 Engineering
6 respuestas