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
- Why Compiled SCL Blocks Decompile into Statement List (STL)
- Step-by-Step Procedure to Install S7-SCL from PCS 7 Media
- S7 Programming Language Architecture and Decompilation Matrix
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
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:
- If the associated SCL source file (
*.scl) exists in theSourcesfolder, the editor opens the high-level SCL source text. - 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, orWHILEloops). Instead, it decompiles the raw MC7 machine code into the lowest common denominator: Statement List (STL/AWL). - 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:
- 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.
- Launch Setup Launcher: Navigate to the root directory and execute
Setup.exewith administrative privileges. - Select Package Modification: In the setup wizard, select Package installation or Modify / Update.
- Select S7-SCL Component: In the software component selection tree, locate Engineering System -> STEP 7 -> S7-SCL and ensure its checkbox is enabled.
- Complete Installation: Follow the wizard prompts to install the validated SCL version and restart the operating system when requested.
- Restore SCL Sources: If project blocks open as STL, retrieve the original
.sclsource files from project engineering backups, copy them into theSourcesfolder, 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:
Sources/ folder (*.scl)Blocks/ folder (FB/FC)STL)Charts/ container (*.cfc)Blocks/ folder (DB/FB)Blocks/ folder (FB/FC)Blocks/ folder (FB/FC)Charts/ container (*.sfc)Blocks/ folder (FB/DB)[!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:
- 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.
- Source Creation Test: In the
Sourcesfolder, 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. - Block Compilation Test: Author a simple function block in SCL and execute File -> Compile. Verify that the corresponding FB appears in the
Blocksfolder and imports cleanly into CFC.
Limitations and Operational Precautions
Observe these guidelines when managing SCL source code in PCS 7:
- 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.
- Include Sources in Project Archives: When archiving projects using File -> Archive, ensure that the project options do not exclude source folders.
- 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
- SIMATIC S7-SCL V5.6 for S7-300/400 Function Manual (Entry ID 109751826)
- SIMATIC PCS 7 Software Packages and Licenses Operating Manual (Entry ID 109780813)
- SIMATIC STEP 7 V5.6 Installation and Upgrade Guide (Entry ID 109751842)
- Siemens Industry Online Support FAQ on SCL Decompilation (Entry ID 24209977)
Related Articles
- Best Practices for SCL Function Block Development in SIMATIC PCS 7
- Converting MATLAB Mathematical and State Logic into S7-SCL for PCS 7
- Synchronizing Block Types and Attributes from PCS 7 Master Data Library
- Managing CFC Dynamic Instance DB Allocations and Reserved Ranges
Related Tags
- S7-SCL
- Software Installation
- Decompilation
- Sources Folder
- STL Decompilation
- PCS 7 Engineering