Custom Online Help for STEP 7 Blocks: PCS7 Integration Guide

David Krause14 min read
HMI ProgrammingSiemensTechnical 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

Overview

Siemens STEP 7 (and its process-industry counterpart PCS 7) ship with a context-sensitive help system that engineers reach by pressing F1 on a function (FC), function block (FB), system function (SFC/SFB), or instance DB inside the SIMATIC Manager. For standard library elements, the F1 key opens the Siemens Win Help / HTML Help tree distributed with the STEP 7 DVD. For user-authored blocks the help is, by default, blank. This article documents the two supported paths to populate F1 with your own documentation:

  1. The lightweight method used in plain STEP 7 — the block's symbolic name and the comment fields visible under Details.
  2. The full custom-help method used in PCS 7 (entry ID 7213962, chapter 3.1 "Aufbau einer Hilfsdatei") — a separate compiled help file that the SIMATIC Manager loads when F1 is pressed on the block.

The PCS 7 method is the only documented mechanism for hooking third-party help (e.g. Adobe RoboHelp output) into STEP 7. The standard STEP 7 help system is not extensible in the same way; engineers commonly confuse the two. If you are working on a non-PCS 7 project, plan on the lightweight path; if you have a PCS 7 license, the full help-file path is available.

The original FAQ referenced by the source is the Siemens Knowledge Base article titled "STEP 7 - How do you link a self-made online help to a programmed block?". The Beitrag-ID and exact URL should be confirmed against the current Siemens Industry Online Support (SIOS) before quoting in customer deliverables.

Prerequisites

Item Required version / note
SIMATIC Manager / STEP 7 V5.5 SPx (HFx as required by your project). Older V5.4 projects migrate upward.
PCS 7 (for full custom help) V8.x or V9.x; the help-file path is documented in Programmieranleitung Bausteine erstellen für PCS 7, Beitrag-ID 7213962, chapter 3.1.
Help authoring tool Any tool that can emit .chm, .hlp, or HTML Help Workshop compatible .hhp projects. Free options: HelpMaker, HTML Help Workshop (Microsoft), HelpNDoc (community edition). Commercial: Adobe RoboHelp.
Target block An FC, FB, SFB, SFC, UDT, or instance DB that is part of the S7 program, with write access to the Symbolic Name, Comment, and Family fields.
File system rights Write access to the STEP 7 project directory and to the common help directory (typically %ProgramFiles%\Siemens\Automation\S7-wnhelp\ or the PCS 7 help folder).

Lightweight Documentation: Symbolic Names and Block Details

Plain STEP 7 (non-PCS 7) does not expose a project-level registration of custom help files. It does, however, render three internal text fields on every block in the SIMATIC Manager under right-click → Object Properties → Details (German: Eigenschaften → Details):

  • Symbolic Name (Symbolischer Name) — short function name, max 24 characters in classic STEP 7.
  • Comment — multi-line plain text, used for the short description that appears in the cross-reference and in the F1 pop-up (first 255 characters).
  • Family — vendor or library identifier; the SIMATIC Manager groups blocks by family in the program editor.

These fields travel with the block in the S7 program and are visible in the F1 balloon, the LAD/FBD/ST editor tooltip, and the cross-reference list. They are not a substitute for a full help file, but for small libraries (under ~30 blocks) they are often sufficient and survive project migration without external dependencies.

PCS 7 Custom Help File Architecture

PCS 7 expands the help architecture with a project-level indirection layer. Each block carries a Hilfsdatei (help file) reference that the SIMATIC Manager resolves at F1 time. The mechanism is described in the Siemens manual "Programmieranleitung Bausteine erstellen für PCS 7" (Beitrag-ID 7213962), chapter 3.1 Aufbau einer Hilfsdatei (Structure of a help file).

File layout

A PCS 7 help file is a Windows Help (.hlp) or Compiled HTML Help (.chm) file accompanied by a map file that the SIMATIC Manager reads to associate topic IDs with block names. The map file is a plain text file stored in the same directory as the help and conventionally named hilfsdatei.txt or referenced by the block's Family field.

Element Filename / location Purpose
Compiled help <FamilyName>.chm or .hlp Binary help container with topic HTML pages.
Map file hilfsdatei.txt in the same directory Associates each topic context ID with a block symbolic name.
Block reference Block Family field Tells SIMATIC Manager which compiled help to load.
Context IDs HTML Help Workshop [MAP] section Numeric IDs the help viewer uses to jump to the right topic.

Authoring a Compatible Help File

Any help compiler that can produce Win32-compatible .hlp or .chm with a context ID map will work. The steps below use HTML Help Workshop because it is free, deterministic, and survives PCS 7 version upgrades.

  1. Plan the topic tree. One topic per block is the cleanest pattern. Topic naming convention: block_<blocknumber>_<language>.htm, e.g. block_FB100_en.htm.
  2. Write the topic HTML. Standard HTML 4.01 with inline styles only. Siemens help viewer does not render CSS imports reliably inside .chm; keep CSS inline or in a single <style> block in each file.
  3. Assign context IDs. In HTML Help Workshop, open Project → HTMLHelp API Information and add a numeric context ID for each topic. Choose IDs that match the block numbers for readability (e.g. FB100 → context ID 100, FC12 → 12).
  4. Compile to .chm. Use File → Compile. Output: MyFamily.chm.
  5. Generate the map file. HTML Help Workshop emits MyFamily.h (C header) and MyFamily.map (alias map). PCS 7 expects a flat text map; convert with a simple script or hand-author the file in the format shown below.

Map File Format

The hilfsdatei.txt map file is the contract between the SIMATIC Manager and your compiled help. Each non-comment line binds a context ID to a topic file inside the .chm:

// PCS 7 help map for Family = MYLIB
// Format: ContextID=RelativeTopicPath
100=block_FB100_en.htm
101=block_FB101_en.htm
102=block_FB102_en.htm
200=block_FC200_en.htm
// Localized variants
1100=block_FB100_de.htm
1101=block_FB101_de.htm

The numeric IDs must match the values assigned in the HTML Help Workshop API information dialog. The SIMATIC Manager appends the block's symbolic name as a secondary lookup if the context ID is missing, so keep symbolic names stable across releases.

Linking F1 to a Block

Open the block in the SIMATIC Manager, right-click, and select Object Properties → General → Family (or, in PCS 7, Block Properties → Attributes → Family). Enter the family name that matches the basename of your .chm file (without extension). The Symbolic Name field becomes the default topic label; the Comment becomes the F1 balloon tooltip when no context ID match is found.

Block field Effect at F1
Symbolic Name (e.g. VALVE_CTRL) First-line title in the topic and balloon.
Comment Tooltip body; if a topic is found, used as the TOC entry text.
Family (e.g. MYLIB) Resolves to MYLIB.chm in the registered help directory.
Version / Block checksum Not used by the help system but required for the block to compile.

SCL Source-Level Documentation

When blocks are written in SCL (Structured Control Language), the source text itself can carry help metadata that the SCL compiler propagates into the compiled block. The // HELP and // HELP_END comment markers (and the block header fields KNOW_HOW_PROTECT, AUTHOR, FAMILY, NAME, VERSION, COMMENT) are read by the SCL compiler and stored in the block's interface description. The AUTHOR, FAMILY, and NAME fields together form the help lookup key, identical in behavior to the SIMATIC Manager Object Properties fields.

FUNCTION_BLOCK FB100
TITLE = 'Modulating Valve Controller'
// HELP_BEGIN
// Topic: VALVE_CTRL
// Family: MYLIB
// Context: 100
// HELP_END
AUTHOR : 'PlantEng'
FAMILY : 'MYLIB'
NAME : 'VALVE_CTRL'
VERSION : '2.1'
COMMENT = 'Closed-loop controller for modulating process valves.'
VAR_INPUT
  SP : REAL;    // setpoint, 0..100 %
  PV : REAL;    // process variable, 0..100 %
END_VAR
VAR_OUTPUT
  CV : REAL;    // control value, 0..100 %
END_VAR
BEGIN
  CV := SP - PV;   // simplified pass-through; full PID in FB101
END_FUNCTION_BLOCK

On compile, the SCL editor writes the Family = MYLIB and NAME = VALVE_CTRL into the block header. The SIMATIC Manager uses these to look up context 100 in MYLIB.chm when F1 is pressed.

Registration: Telling SIMATIC Manager Where the Help Lives

PCS 7 reads a project-level setting that points the F1 handler at one or more help directories. The setting is stored in the STEP 7 project file step7.nva / S7pjV5.mdb and is also controllable through the registry for system-wide help paths. The canonical PCS 7 procedure:

  1. Copy MYLIB.chm and hilfsdatei.txt into the PCS 7 common help directory, typically C:\Program Files\Siemens\Automation\PCS7\Help\ or the language-specific subdirectory (\en, \de).
  2. In the SIMATIC Manager, open Options → PCS 7 → Library Help Registration (path label varies by PCS 7 version) and add the family name MYLIB pointing at the file.
  3. Restart the SIMATIC Manager to re-index the help cache. The .chm is locked while the manager holds it open.
  4. For multi-user / multi-language deployments, distribute the same .chm to every engineering station. PCS 7 does not replicate help binaries automatically across SIMATIC Logon shares.
On Windows 10 / 11 64-bit, the legacy WinHelp viewer (winhlp32.exe) is no longer shipped. .hlp-based help files therefore require the Microsoft WinHelp32 replacement or must be recompiled to .chm. Plan your authoring pipeline to emit .chm only.

Verification Procedure

After registration, validate that F1 routes correctly for every block in the family. The following checklist is the field-accepted acceptance test.

  1. Open the SIMATIC Manager and navigate to the S7 program containing FB100.
  2. Click once on FB100 to select it, then press F1. The expected behavior is that the configured help viewer launches, the table of contents expands to the MYLIB family, and the FB100 topic opens at the top.
  3. Repeat for FC200 and at least one instance DB (e.g. DB100, the instance of FB100). The instance DB must resolve to the same topic as its parent FB; this confirms the indirect lookup works.
  4. Open a block that does not belong to MYLIB (e.g. a standard Siemens FC) and press F1. The standard Siemens help must still open — a broken family registration must not break the default help chain.
  5. Switch the SIMATIC Manager UI language (e.g. English → German) and re-test FB100. If you ship a German block_FB100_de.htm, F1 must route to the German topic when the UI language is German.
  6. Close and reopen the project; re-test F1 on three blocks chosen at random. This confirms the registration survives a project restart and is not dependent on session state.
  7. From a second engineering station, open the same project across a remote desktop session or terminal server, and repeat step 2. This confirms the help files were distributed correctly and that no path mapping is hard-coded to C:\ on a specific machine.

Troubleshooting Matrix

Symptom Likely cause Fix
F1 opens an empty help window or the default Siemens TOC only. The Family field on the block is empty, or the .chm basename does not match the family name (case-sensitive on Windows NTFS). Open the block's Object Properties, set Family to the basename of the .chm (without extension), and re-save.
Help viewer launches, jumps to the family TOC, but the topic is "Topic not found". The context ID in hilfsdatei.txt does not match the context ID in the HTML Help Workshop API table, or the topic HTML file path is wrong relative to the .chm root. Re-compile the help and verify the [MAP] section in the .hhp; reload the hilfsdatei.txt.
F1 does nothing; no help viewer launches. No help is associated with the block; the family registration is missing in the project settings. Re-run the registration step in Options → PCS 7 → Library Help Registration and restart SIMATIC Manager.
Help viewer opens but the page renders as raw HTML tags. The .chm contains an external CSS import that the viewer blocks, or the HTML uses HTML5 elements not supported by the embedded IE engine. Inline all CSS in a single <style> block; restrict the document type to HTML 4.01 Transitional.
Help works in the office but not on the plant engineering station. The .chm and hilfsdatei.txt were not distributed to the target station, or the help directory path differs. Copy both files to the equivalent help directory on the target station; verify the language subdirectory exists.
German UI shows English topics. Only the English block_*_en.htm files were authored, or the German hilfsdatei.txt entries are missing. Author the localized HTML files and add the 11xx-range entries to the map file (see example above).
F1 works for FCs and FBs but not for instance DBs. The instance DB carries its own Family field that overrides the parent FB's; an empty Family on the instance is the expected behavior — the lookup should fall through to the parent FB. Leave the instance DB Family empty. If the field is filled, clear it.
Error "Cannot open help file: MyLib.chm" at F1 time. File lock from a previous session, missing read permission, or path with non-ASCII characters. Close all help viewer windows; check NTFS permissions; move the file to a path using ASCII only.

Authoring Tool Comparison

Tool Cost Output PCS 7 / STEP 7 compatibility
Adobe RoboHelp Commercial subscription .chm, WebHelp, PDF Full — used by Siemens documentation teams internally.
Microsoft HTML Help Workshop Free, distributed with older Visual Studio / Windows SDK .chm Full — reference implementation for context IDs.
HelpMaker Free, open source .chm, .html, PDF, ePub Full — produces compatible [MAP] sections.
HelpNDoc (community edition) Free for personal / open-source use .chm, HTML, ePub, Kindle Full — context IDs are exported cleanly.
Sandcastle (Microsoft) Free, open source .chm from XML doc comments Requires post-processing of the .h map file; workable but not turnkey.

Best Practices and Field Notes

  • Keep one .chm per logical family. Granular families (e.g. MYLIB_VALVES, MYLIB_MOTORS) make maintenance and re-use easier than a single monolithic help.
  • Author the help file in a source-controlled format (e.g. RoboHelp .xpj, HelpMaker .hmk) — never commit only the compiled .chm. Topic text will inevitably need corrections and the diffs must be reviewable.
  • Mirror the help directory structure to your source tree: /doc/help/MYLIB/ for the source, /doc/help/MYLIB/build/ for the compiled artifacts. The build step is a single command in HTML Help Workshop (hhc MyLib.hhp) and should be wired into your CI.
  • Reserve a context-ID range per engineer or per team to avoid collisions when multiple libraries are merged into a single PCS 7 master project. The Siemens convention is to allocate ranges of 1000 IDs (e.g. 1000-1999 for the Valve team, 2000-2999 for the Motor team).
  • Test F1 from a non-admin account. SIMATIC Manager on a locked-down engineering station will silently fail to read the help directory if the user lacks traversal rights, and the error message is unhelpfully generic.
  • When migrating from STEP 7 V5.x to TIA Portal, custom .chm help files are not portable. TIA Portal uses a different help integration (information system based on the HelpViewer plug-in). Plan a re-author pass if you are targeting TIA Portal for the same library — see the Siemens "Working with STEP 7" manual for the documented migration scope.
  • Document the family registration in the project README. New engineers will not know that Object Properties → Family is the bridge between a block and its help; a one-line note in the project root saves an afternoon of investigation.

Frequently Asked Questions

Can I register a custom help file in plain STEP 7 (non-PCS 7)?

No. The full custom-help file path is a PCS 7 feature, documented in Programmieranleitung Bausteine erstellen für PCS 7, Beitrag-ID 7213962, chapter 3.1. In plain STEP 7 you are limited to the symbolic name, comment, and family text fields visible under Object Properties → Details in the SIMATIC Manager.

Which help file format does PCS 7 accept — .hlp or .chm?

Both, but .chm is strongly recommended. Windows 10 and later no longer ship winhlp32.exe, so legacy .hlp files require a third-party viewer. Recompile any existing .hlp sources to .chm with HTML Help Workshop before distribution.

How do I make the F1 key open the correct topic for a specific block?

Set the block's Family field to the basename (without extension) of your compiled help, ensure the Symbolic Name matches a topic in the hilfsdatei.txt map file, and verify the context ID in the .chm's HTML Help Workshop API table. Press F1 on the block in the SIMATIC Manager to confirm.

Can I use Adobe RoboHelp output directly with STEP 7?

Yes — RoboHelp can compile to .chm. You must additionally generate the hilfsdatei.txt map file (RoboHelp emits a .ali alias file that can be converted) and register the family in PCS 7. The Siemens Knowledge Base article titled "STEP 7 - How do you link a self-made online help to a programmed block?" walks through the registration step by step.

Do custom help files survive a STEP 7 / PCS 7 project migration or backup?

The block-level Family, Symbolic Name, and Comment fields are saved with the S7 program and migrate cleanly. The .chm and hilfsdatei.txt files are external to the project; you must back them up separately and redeploy them to every engineering station that opens the migrated project.

Back to blog