Siemens PCS 7: Resolving Error 1739:20 When Deleting SFC Types

David Krause11 min read
Process ControlSiemensTroubleshooting
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 of SFC Types and Deletion Constraints in PCS 7

Sequential Function Chart (SFC) Types in SIMATIC PCS 7 V8.2 with CFC Update 3 are reusable control recipes instantiated as SFC charts within the CFC (Continuous Function Chart) and SFC (Sequential Function Chart) library structure. Unlike ordinary SFC Instances, SFC Types are the templates that generate multiple running charts. Deleting an SFC Type requires the engineering tool (SIMATIC Manager or PCS 7 Engineering Station) to reconcile three distinct reference planes:

  1. Compiled step and transition memory inside the SFC Type container.
  2. Instance references in every Chart folder that consumes the type.
  3. Cross-chart symbol table entries generated by the SFC compiler.

Error 1739:20"Step does not exist (any longer)" — fires when the SFC compiler detects a Step handle that persists in the cross-reference structure while the underlying .scl or .sfc source no longer contains it. Under PCS 7 V8.2 this surfaces most often after:

  • Copying entire SFC charts between S7 Program folders.
  • Modifying an SFC Type while instances exist in the chart tree.
  • Interrupting a compile cycle mid-link.
Error 1739:20 is a type-level reference mismatch, not an instance-level runtime fault. Eliminating instances alone will not clear the error if the cross-reference table inside the SFC type remains inconsistent.

Error Code 1739:20 Specification

Field Value
Compiler ID 1739
Sub-code 20
Full message Step does not exist (any longer)
Severity Error (blocks deletion)
Source SFC compiler (SFCTool.exe)
Scope SFC Type container only
Affected PCS 7 build V8.2 + CFC Update 3
Last verified firmware/ES ES-Software V8.2 SP1 (PG)

The full numeric identifier is composed of a 16-bit main code and a 16-bit detail code. Sub-code 20 falls into the family of structural inconsistency errors generated when the SFC compiler traverses the internal StepObject tree referenced from the chart's STEP_LIST control block. The compiler's reference walker expects every step handle to resolve to a valid STEP_n node; when the handle points to a freed slot, the walker aborts with the error string shown above.

SFC Type / Instance Architecture in PCS 7

An SFC Type under PCS 7 V8.2 is stored in two coupled files inside the program folder:

  • <type_name>.sfc — chart-level structure (steps, transitions, branches, jumps).
  • <type_name>.scl — compilable action and transition logic.

Each instance creates an SFC_DB data block containing working memory, current step pointer, timers, and a back-reference to its parent type via the block attribute SFC_TYPE. The hierarchy maintained by the engineering tool is therefore:

[S7 Program]
  |- Charts/
  |   |- [Type A]      <-- SFC_TYPE source chart
  |   |- [Instance A1] <-- DB-bound copy
  |   |- [Instance A2] <-- DB-bound copy

The compiler uses the parent-child linkage stored in S7P project files. When copying a chart between program folders, the source project's STEP_LIST indices are renumbered but the child's back-reference is not rewritten reliably in V8.2 + CFC Update 3, which is the most common trigger of the 1739:20 failure mode reported in field deployments.

Root Cause Analysis

For error 1739:20 specifically, the SFC compiler has located a step ID in the runtime structure (DB or SFC_RT) that does not have a corresponding definition in the compilable source. The accepted fields report four primary root causes:

  1. Orphaned instance tables — instances removed from the chart tree before their DB references are unreferenced.
  2. Copy-paste between programs — chart copied while Type/Instance index cache was stale.
  3. Interrupted compile — power loss or ES crash during a chart recompile leaves the STEP_LIST half-populated.
  4. Tool-chain firmware mismatch — Type generated under one ES service pack, instance recompiled under another (e.g., V8.2 base → V8.2 SP1).
If deleting internal parts of the SFC Type also produces the 1739:20, the corruption is inside the source chart itself. You cannot repair a corrupted SFC source from inside the chart object — you must rebuild or restore it from archive.

Prerequisites for Recovery

Before attempting the procedure below, verify the following on the Engineering Station (ES):

  • SIMATIC Manager version V8.2 SP1 or later (compatible with CFC Update 3) — see the SIMATIC PCS 7 V8.2 release notes.
  • Local administrator rights on the ES project directory (typically C:\Siemens\Automation\<project>\).
  • A current compressed project archive of the S7 program (created with File > Archive) for rollback.
  • All chart instances unforced (no OCM pin manipulation) and no active batch sessions running on the OS server.

Document the affected SFC Type names, instance count, and the date/time of the most recent successful compile for traceability.

Step-by-Step Diagnostic Procedure

Follow this sequence exactly. Each step generates a verifiable artifact (log, screenshot, or counter diff) that you can attach to a service ticket.

  1. Open the SFC Type in read-only mode. In the component view, right-click the SFC Type and select Open Chart. Write a note of every step name listed in the left pane. If the chart opens at all, capture a screenshot of the step number column.
  2. Count remaining instances. Run a project-wide search with the menu Options > Cross-References (SFC). The result table includes a column Used In; every instance populates one row per chart. Zero rows are required to attempt deletion.
  3. Inspect SFC_TYPE_DB references. Open the Block Folder, locate the data blocks whose name begins with the SFC instance prefix (default SF), and confirm that no DB still carries attribute SFC_TYPE = <name> against a Type you intend to delete.
  4. Trigger a controlled recompile. From the chart menu execute Compile > Charts Only. Capture the log file SFC_COMPILE.LOG from the project log directory. The exact line reporting 1739:20 includes a step number — record it.
  5. Compare internal step indices. Switch to View > SFC Source Text; the displayed textual step list must match the source. Any ID visible only on the right-hand step pane but missing in source text is the orphan.
  6. Check the SFC logbook. Logs > Open SFC Logbook shows the sequence of delete/insert operations. Cross-reference the timestamp around the first 1739:20 occurrence to identify the offending edit session.

Recovery Methods

Select the recovery path that matches the severity of the corruption identified above.

Method A — In-Place Repair (chart still opens)

  1. Inside the SFC Type, locate the orphan step entry flagged in step 5 of the diagnostic procedure.
  2. Select the step, hold SHIFT, then click the transition that follows it. This selects both nodes as required by the SFC editor's deletion handler (steps and transitions are deleted in pairs).
  3. Press DEL. Confirm the prompt Delete selected step/transition pair?.
  4. Recompile with Compile > Charts Only. Repeat the cross-reference check.
  5. If 1739:20 persists, move to Method B.

Method B — Replace-and-Rebuild (Type corrupted, archive available)

  1. De-archive the last known-good .zip archive to a fresh directory using SIMATIC Manager > File > Retrieve.
  2. In the recovered project, export the SFC Type to a Master Data Library: right-click the Type > Options > Charts > Save As Master.
  3. Return to the live project and import the master into the receiving S7 Program folder. Choose Overwrite existing when prompted.
  4. Recompile. The orphan handles are replaced cleanly because the master was generated before the corruption event.

Method C — Archive Rollback (Type unbuildable)

  1. Quiesce the OS server and inform the operator console that an engineering rollback is in progress.
  2. Close SIMATIC Manager on the ES.
  3. Rename the active project directory <project>_old for retention.
  4. Retrieve the most recent S7 program archive into the original path.
  5. Document every modification made between archive timestamp and now in a side-by-side change log so those changes can be reapplied in audited manner.
Method C is the only field-validated resolution when attempts at deletion continue to throw 1739:20 after Methods A and B have failed. Treat this as a controlled change with full IBN paperwork.

SFC Compiler Parameters Relevant to 1739:20

The SFC compiler reads its configuration from the ES registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Siemens\Automation\SFC\<version>\Settings

Parameters that influence deletion behavior:

Parameter Default Effect on 1739:20
StrictReferenceCheck 1 Enforces STEP_LIST ↔ source alignment; set to 0 for legacy forgiving mode (not for production).
AutoCreateAuxSteps 1 Automatically inserts compensating step entries; masking but not fixing 1739:20.
CleanupOrphanInstances 0 Enables silent orphan removal during compile; turn on only when audit is disabled.
MaxCompileLoops 3 Limits retry passes; 1739:20 typically resolves within the first pass if all references are correctly enumerated.

These values map to the dialogue Options > SFC > Compilation in the SIMATIC Manager menu.

Compiler Reference Resolution State Machine

The SFC compiler traverses the type's step graph through the following state machine when processing deletion requests:

[Init]
  |
  v
[Load STEP_LIST] --(missing handle)--> [Emit 1739:20] --> [Abort]
  |
  v
[Resolve names]
  |
  v
[Validate transitions]
  |
  v
[Write back compiled DB] --(OK)--> [Release for delete]
  |
  v
[Type removed from S7 Program]

When the walker enters [Load STEP_LIST] and finds an index without a matching source entry, it transitions to [Emit 1739:20] and aborts. The remaining transitions never run, so the chart cannot be deleted at the operator level.

Data Flow Between Type, Instance, and Compiler

The data exchange on each compile pass is illustrated below:

 +-----------------+      +---------------------+      +-------------------+
 |  SFC TYPE       |<---->|  Cross-Reference    |<---->|  SFC INSTANCES    |
 |  .sfc / .scl    |      |  (STEP_LIST)        |      |  (DB-bound)       |
 +--------+--------+      +----------+----------+      +---------+---------+
          |                          |                          |
          +--------------------------+--------------------------+
                                     |
                                     v
                          +----------+----------+
                          |  SFC Compiler       |
                          |  (SFCTool.exe)      |
                          +----------+----------+
                                     |
                                     v
                          +----------+----------+
                          |  SFC_COMPILE.LOG    |
                          |  (1739:20 entry)    |
                          +---------------------+

The compiler acts as the single point of truth: it requires three-way agreement among the Type source, the cross-reference list, and the instance DB blocks. Any unilateral change — for instance, deleting an instance DB manually from the offline block folder — breaks the triangle and surfaces as 1739:20.

Verification and Validation

After applying any recovery method, perform the following verification:

  1. Recompile Charts Only. Log file SFC_COMPILE.LOG must contain 0 error(s), 0 warning(s).
  2. Open the SFC Type in Read/Write mode. Confirm both source-text view and chart view report identical step counts.
  3. Re-run Options > Cross-References (SFC); every entry under Used In must be a valid chart folder.
  4. Generate the Change Log under Options > Logs > Create Change Log. The deletion event must be recorded with an OK status.
  5. On the OS server, perform a PCS 7 OS Compile and verify the operator faceplates still open for the surviving instances.
A clean verify run should also be repeated on the OS side: an offline deletion that succeeds on the ES may still appear online until the next OS download.

Preventive Measures

  • Lock instances before Type edits. Use the ES function Options > SFC > Lock Instance to disallow modifications while you change the Type. Unlock only after successful compile.
  • Master-data library discipline. Always keep one canonical SFC Type in the master-data library and import copies — never edit a Type in a hot project folder.
  • Single-program copies. When copying charts between S7 Program folders, copy the Type together with all instances in one operation rather than sequentially.
  • Pre-compile validation. Configure the hook Chart > Pre-Compile Check (when enabled by the master data library recipe) to run StrictReferenceCheck on every save.
  • UPS-backed ES. Use a UPS on the Engineering Station to prevent V8.2 interrupted-compile edge cases that lead to orphan step handles.
  • Update discipline. Track the hotfix catalog for V8.2 — Siemens periodically issues patch builds that improve orphan-reference recovery. Always check the Siemens Product Support portal prior to a planned Type refactor.

PCS 7 V8.2 Update Considerations

PCS 7 V8.2 ships with multiple service packs; the bug pattern reported here is most reproducible on the V8.2 SP1 + CFC Update 3 baseline. Operators should:

  • Avoid partial ES upgrades; the SFC compiler is sensitive to mixed DLL versions of SFCTool.exe and SFCObj.dll.
  • If a 1739:20 event reoccurs within hours of a fix attempt, escalate to the Siemens support channel with the entire SFC_COMPILE.LOG plus the cross-reference export — see the entry form on the Siemens Industry Online Support page.
  • Always run an SFC reference rebuild (Options > SFC > Reset References) after a Type edit before any further chart deletion.

For the upstream SIMATIC SFC manual that covers type/instance lifecycle in detail, refer to the SIMATIC SFC for SIMATIC PCS 7 manual.

What does SIMATIC PCS 7 error 1739:20 mean?

Error 1739:20 with message Step does not exist (any longer) indicates the SFC compiler has located a step handle in the chart's reference table whose underlying source entry has been removed. The chart cannot be deleted until the reference table is reconciled.

Can I delete the type after removing all instances?

Not always. Removing instances clears the Used In cross-reference, but the Type's own STEP_LIST may still carry orphan entries after a copy or interrupted compile. Run Cross-References (SFC) plus a controlled recompile before attempting deletion.

Why does deleting inside the type also throw 1739:20?

The corruption has already propagated into the type's source file. Manual editing inside the type cannot repair it; you must rebuild from a master-data library copy or restore from archive.

Is this bug fixed in a later PCS 7 release?

Improvements to orphan-reference handling have appeared in successive service packs. Always consult the release notes linked from SIMATIC PCS 7 V8.2 documentation and the most recent SP before deploying a remediation.

Can StrictReferenceCheck = 0 hide 1739:20?

Setting StrictReferenceCheck = 0 in the SFC compiler registry forces a permissive mode that suppresses orphan-detected errors but does not fix the reference state. Use it only in legacy/test engineering environments, never in a live process cell.

Back to blog