Integrating Custom CHM Context-Sensitive Help Files into CFC Blocks and Libraries in SIMATIC PCS 7

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

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:

Component / ParameterFile System Path / IdentifierDescriptionPurpose in PCS 7 EnvironmentCentral Help DirectoryC:\Program Files (x86)\Siemens\Step7\S7FKBST\Global STEP 7 block documentation directoryCentralized storage for multi-project engineering stationsLibrary Help Directory<Library_Path>\Global\Help\<Lang_Code>\Project-specific library documentation pathDistributable with project archivesEnglish Language Subfolder...\Help\0001\ or ...\Help\enu\Windows Language ID for English (0x0409)Default fallback language folderGerman Language Subfolder...\Help\0007\ or ...\Help\deu\Windows Language ID for German (0x0407)European multilingual deploymentsS7_help AttributeString (e.g., 'MyLib_Help.chm')Name of target compiled help fileEmbedded in block headerS7_help_id AttributeInteger (e.g., 1001)Context ID matching HTML topic mapNavigates directly to block page

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:

  1. 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 the S7_help and S7_help_id system 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'
  2. 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 attribute S7_help with value PlantLib.chm.
    * Add attribute S7_help_id with value 1500.
  3. Deploy Help File to Target Directories:
    * Copy PlantLib.chm to:
    C:\Program Files (x86)\Siemens\Step7\S7FKBST\
    * To ensure portability when archiving the project (.zip), also copy PlantLib.chm into:
    <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:

  1. Create Topic Mapping Header (mapping.h):
    * In a text editor, create a header file defining the ID:
    c #define IDH_FB1500_MOTOR 1500
  2. Create Alias File (alias.h):
    * Link the symbolic ID to the specific HTML file:
    c IDH_FB1500_MOTOR = html\fb1500_motor_manual.html
  3. Compile in HTML Help Workshop:
    * Open Microsoft HTML Help Workshop.
    * In project properties, link mapping.h under the [MAP] section and alias.h under the [ALIAS] section.
    * Compile the project to produce PlantLib.chm.
    * Verify that launching the CHM with command line hh.exe -mapid 1500 PlantLib.chm opens 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 S7FKBST on 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

Related Articles

Related Tags

  • CHM Help
  • S7_help
  • S7_help_id
  • CFC Editor
  • Context-Sensitive Help
  • Custom Blocks
  • HTML Help Workshop
6 respuestas