Integrating Custom CHM Context-Sensitive Help Files into CFC Blocks and Libraries in SIMATIC PCS 7
In SIMATIC PCS 7 and STEP 7 CFC, integrating custom context-sensitive help files (CHM format) for proprietary block libraries requires declaring the S7_help and S7_help_id attributes in the block's SCL or STL source code and deploying the compiled CHM file to the centralized S7FKBST directory or project Global help folder. When an engineer selects the block in CFC and presses F1, the CFC Editor uses these attributes to open the CHM file directly to the corresponding topic ID.
Table of Contents
- Architecture of Context-Sensitive Block Help in PCS 7 CFC
- Help System Directory and Attribute Matrix
- Declaring S7_help Attributes in SCL and Block Properties
- Authoring and Mapping Topic IDs in HTML Help Workshop
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Architecture of Context-Sensitive Block Help in PCS 7 CFC
In professional SIMATIC PCS 7 engineering environments, plant standard libraries (custom corporate block libraries) must provide seamless, integrated documentation. When an automation engineer places a custom function block (FB) into a Continuous Function Chart (CFC) and presses the F1 key, the system should instantly open the exact technical description, pinout list, and functional algorithm for that specific block.
This functionality is managed through the STEP 7 Context-Sensitive Help Architecture:
1. Source Block Attributes: During block compilation in SCL or STL, system attributes (S7_help and S7_help_id) are embedded directly into the compiled block header in the offline block folder.
2. Help File Location: The compiled HTML Help file (.chm) must reside in recognized search paths within the STEP 7 installation directory (S7FKBST) or the project/library's Global\Help folder.
3. HTML Topic ID Mapping: The internal help project must link numeric topic identifiers (IDH_...) to individual HTML content pages via an alias and map header file.
Without these declarations, pressing F1 on a custom block generates the default warning: Help for block FBxxxx not found.
Help System Directory and Attribute Matrix
Understand the file system locations and language codes utilized by the STEP 7 / CFC help engine:
C:\Program Files (x86)\Siemens\Step7\S7FKBST\<Library_Path>\Global\Help\<Lang_Code>\...\Help\0001\ or ...\Help\enu\...\Help\0007\ or ...\Help\deu\S7_help Attribute'MyLib_Help.chm')S7_help_id Attribute1001)System configuration note: Ensure CHM files are unblocked in Windows file properties to permit ActiveX rendering.
Declaring S7_help Attributes in SCL and Block Properties
To configure context-sensitive help in the block source code:
- Add System Attributes in SCL Source:
* Open the SCL source file for the custom function block.
* In the block header section preceding variable declarations, declare theS7_helpandS7_help_idsystem attributes:
scl FUNCTION_BLOCK FB1500 TITLE = 'Custom Motor Controller' { S7_m_c := 'true'; S7_tasklist := 'OB100,OB35'; S7_help := 'PlantLib.chm'; S7_help_id := '1500' } AUTHOR : 'Engineering Team' FAMILY : 'DRIVES' VERSION : '1.0' - Alternative: Configure via STEP 7 Block Properties:
* If working with compiled blocks without SCL source access, open the block folder in SIMATIC Manager.
* Right-click the block, select Object Properties.
* Navigate to the Attributes tab.
* Add attributeS7_helpwith valuePlantLib.chm.
* Add attributeS7_help_idwith value1500. - Deploy Help File to Target Directories:
* CopyPlantLib.chmto:
C:\Program Files (x86)\Siemens\Step7\S7FKBST\
* To ensure portability when archiving the project (.zip), also copyPlantLib.chminto:
<ProjectPath>\Global\Help\0001\PlantLib.chm
Authoring and Mapping Topic IDs in HTML Help Workshop
The compiled CHM must map the numeric ID (1500) to the HTML document:
- Create Topic Mapping Header (
mapping.h):
* In a text editor, create a header file defining the ID:
c #define IDH_FB1500_MOTOR 1500 - Create Alias File (
alias.h):
* Link the symbolic ID to the specific HTML file:
c IDH_FB1500_MOTOR = html\fb1500_motor_manual.html - Compile in HTML Help Workshop:
* Open Microsoft HTML Help Workshop.
* In project properties, linkmapping.hunder the [MAP] section andalias.hunder the [ALIAS] section.
* Compile the project to producePlantLib.chm.
* Verify that launching the CHM with command linehh.exe -mapid 1500 PlantLib.chmopens directly to the motor manual page.
Verification
Test context-sensitive help in the engineering environment:
1. Open SIMATIC Manager and launch CFC Editor.
2. From the block catalog, drag the custom block (FB1500) into a chart.
3. Click on the block header to highlight it.
4. Press the F1 key on the keyboard.
5. The HTML Help viewer must immediately launch PlantLib.chm and display the specific documentation page for FB1500 without navigation dialogs.
Limitations and Operational Precautions
- Windows security hardening restricts CHM files downloaded from the internet or opened across network shares. Always right-click the CHM file in Windows Explorer, select Properties, and click Unblock.
- Do not store CHM help files exclusively on network drives; local storage under
S7FKBSTon each engineering station is mandatory for reliable execution. - Help file names must not contain spaces or special characters; keep file names to standard alphanumeric characters (e.g.,
PlantLib_V1.chm).
Engineer FAQ
Can a single CHM file support multiple custom blocks?
Yes. A single CHM file can contain documentation for dozens of blocks. Each block is assigned the same 'S7_help' file name, but a unique 'S7_help_id' integer matching its topic map ID.
What happens if S7_help_id is omitted?
If 'S7_help' is defined but 'S7_help_id' is missing, pressing F1 opens the CHM file to its default table of contents or home page rather than the specific block page.
Do custom CHM files migrate when updating PCS 7 versions?
CHM files stored in project 'Global\Help' migrate automatically with project archives. CHM files placed in 'C:\Program Files (x86)\Siemens\Step7\S7FKBST' must be backed up and restored following PCS 7 upgrades.
Technical References
- SIMATIC PCS 7 Programming Instructions for Blocks (A5E32106070)
- SIMATIC STEP 7 V5.5 Creating Help Files for User Blocks Manual
- Microsoft HTML Help Workshop Reference and Compiler Guide
Related Articles
- Authoring Compliant APL Style Function Blocks in SCL for SIMATIC PCS 7
- Managing Custom Library Master Data Across Multiple Engineering Stations
- Automating Software Distribution and Registry Scripts on PCS 7 Workstations
Related Tags
- CHM Help
- S7_help
- S7_help_id
- CFC Editor
- Context-Sensitive Help
- Custom Blocks
- HTML Help Workshop