SINUMERIK 840D PLC OB1: Resolving Red CALL/END CALL Errors

David Krause14 min read
S7-300SiemensTroubleshooting
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

1. Problem Definition: Red CALL/END CALL in OB1

When a SINUMERIK 840D / 840D sl PLC project backup is opened in SIMATIC Manager (Step 7 V5.x), operators frequently encounter networks in OB1 where the CALL and corresponding END CALL (or BEC) lines are rendered in red text instead of the normal black. The diagnostic buffer of the running PLC reports no fault, the machine continues to produce, yet the offline project cannot be compiled and any attempt to download the project as-is is expected to drive the integrated PLC into STOP mode.

The reported networks in the source case were: 1, 4, 5, 6, 7, 8, 11, 12, 14, 18, 25, 26, 28, 30 — twelve networks in a single OB1, all showing the same red CALL marker without a resolvable block operand after the instruction.

Critical field rule: Never download a project that contains unresolved (red) CALL statements to the SINUMERIK integrated PLC. A failed download or a syntactically invalid block will halt cyclic execution of OB1 and place the PLC in STOP, which in turn removes DB handshakes to the NCK and disables all axes.

2. SINUMERIK 840D PLC Architecture Overview

The SINUMERIK 840D / 840D sl numerical control embeds a SIMATIC S7-300-class PLC. The standard configuration uses:

Subsystem Module / Part Typical Order Number
Integrated PLC CPU CPU 317-2 DP 6ES7317-2AK14-0AB0
Integrated PLC CPU (F-variant) CPU 317F-2 DP 6ES7317-6KF00-0AB0
NCU module NCU 710.3 / 720.3 / 730.3 6FC5371-0AA00-0AA0 (series)
PLC basic program library SINUMERIK 840D sl toolbox 6FC5253-7AX00-8AG0 (or current)

The PLC runs an S7-300-compatible instruction set with the cyclic organization block OB1 as the master scheduler. The PLC basic program supplied by Siemens consists of a fixed set of FCs, DBs and OBs that handle the NCK↔PLC interface, the MCP (Machine Control Panel), the HMI signals, axis/spindle handshakes, and the safety-integrated logic where fitted. The PLC basic program blocks are part of the SINUMERIK 840D sl toolbox and must be present in the offline project for compilation to succeed.

The official reference for PLC block architecture is the SINUMERIK 840D sl PLC Function Manual, which lists every standard FC/FB, its parameters, and the calling convention used by the basic program.

3. OB1 Structure and CALL/END CALL Mechanics

In the SINUMERIK 840D, OB1 is reserved for the user program. The NCK-side PLC basic program is normally executed by separate OBs (OB40 for hardware interrupts, OB100 for restart, OB82 for diagnostic interrupt, OB86 for rack failure, OB121/OB122 for error handling). The user OB1 therefore contains only user logic — typically a sequence of CALL FC xxx / CALL FB xxx, DB yyy statements that invoke function blocks implementing mode-group control, axis enabling, tool changer, coolant, lubrication, etc.

Two call syntaxes exist in Step 7:

Syntax Example Display in STL view
Absolute call (FC/FB with number) CALL  FC  19 Black — operand resolves to existing block
Symbolic call (named FB) CALL  "MCP_IFM" Black — symbol table resolves block
Incomplete call CALL  (no operand) Red — operand missing or unresolved

The red rendering is the Step 7 editor's signal that the CALL instruction has no resolvable target. Common reasons:

  1. The called FC/FB number is not present in the offline project (block was stripped from the backup).
  2. The symbol referenced by a symbolic call no longer exists in the symbol table.
  3. The source was originally written in KOP (ladder) or FUP (function block diagram), exported to STL, and the operand token was lost in the conversion.
  4. The basic PLC program library (toolbox) is not installed; standard FCs like FC19 (MCP interface) cannot be resolved and CALL lines render red.

4. Why the Machine Continues Running with a "Red" Backup

The paradox — red blocks in the backup, no fault in the live PLC — is explained by the distinction between the offline project and the online user memory:

  • The PLC on the machine holds the last successfully compiled and downloaded program in its load memory. That program has all CALL operands intact and executes correctly.
  • The backup archive opened on the engineering laptop may be missing optional toolbox blocks, may have been saved with partial blocks, or may have been round-tripped through a third-party tool that stripped the operands after the KOP/FUP→STL translation step.
  • As long as the offline project is not downloaded, the online program is untouched.

This is why the diagnostic buffer shows no error, why MCP/axes/HMI respond correctly, and yet the engineering display shows a dozen networks in red.

5. Root Cause Classification

Red CALL/END CALL lines in OB1 fall into four diagnostic classes:

Class Symptom Likely Root Cause Fix Path
A — Missing toolbox All standard FCs (FC2, FC3, FC5–FC31) flagged red SINUMERIK 840D sl toolbox not installed in Step 7 library Install toolbox; re-integrate blocks
B — Block deleted from project One or two user FCs/FBs flagged red User FC/FB deleted but CALL reference retained Restore block or remove CALL
C — Symbol resolution CALL "name" rendered red Symbolic name not present in Symbol Table (S7-Program > Symbols) Add symbol or convert to absolute
D — KOP/FUP→STL conversion loss CALL with empty operand, code fragment between CALL and BEC Round-trip conversion between editors lost the block token Re-key CALL operand manually

The source case study aligns with Class D — the discussion explicitly notes that the segment between CALL and END CALL is the residual STL generated when Step 7 Manager re-translates a KOP/FUP source.

6. Diagnostic Procedure (Offline + Online)

Follow this procedure before editing any block. It is non-destructive and does not place the PLC at risk.

  1. Open the project read-only. In SIMATIC Manager, right-click the project, choose File > Open as read-only, or use Options > Customize > View > Offline/Online to inspect both views side-by-side.
  2. Establish an online connection. With Accessible Nodes or PLC > Display Accessible Nodes, locate the CPU (default address 2 on MPI/PROFIBUS, or the configured Ethernet IP). Use PLC > Connect to Target System.
  3. Open OB1 in online view. Double-click the online OB1 to display the block currently executing on the CPU. Read each network to record the actual CALL FCxxx / CALL FBxxx, DByyy operand.
  4. Compare online vs. offline. Use Options > Compare Blocks (online/offline). The Step 7 comparator highlights mismatches. Red CALL lines in offline blocks that are identical to the online block confirm a display/serialization issue rather than a logic change.
  5. Check the CPU diagnostic buffer. PLC > Diagnostics/Settings > Diagnostic Buffer. Look for entries with event ID 0x4302 (STOP due to programming error), 0x4570 (OB not found), or 0x4xxx series I/O faults. Absence of any of these confirms the online program is healthy.
  6. Inspect the Symbol Table. If CALL lines reference names like "MCP_IFM", open S7 Program > Symbols and verify each name maps to a valid FC/FB number.
  7. Verify the toolbox library. In File > Open > Libraries, open the SINUMERIK 840D sl toolbox library. If absent, this is the primary cause of red standard FCs.

7. Resolution Path by Class

7.1 Class A — Toolbox Not Installed

Install the SINUMERIK 840D sl toolbox appropriate to the NCU firmware version (e.g., toolbox V4.95 for SW 4.95, V5.3 for SW 5.3). Insert the basic program into the offline project:

  1. Open the toolbox library in SIMATIC Manager.
  2. Drag the Basic Program container into the S7 Program of the offline project.
  3. Recompile all blocks (Program > Compile All, or right-click the Blocks container > Compile).
  4. Confirm CALL lines in OB1 now render black.

The toolbox content and block-level API are documented in the SINUMERIK 840D sl PLC Function Manual (Chapter 2, PLC basic program).

7.2 Class B — Single User FC/FB Missing

  1. Locate the block in the online CPU: right-click Blocks (online) > Download to PG for the suspected FC/FB.
  2. Insert the downloaded block into the offline S7 Program > Blocks.
  3. If the block intentionally does not exist on the machine, edit OB1 to remove the CALL pair entirely.

7.3 Class C — Symbolic Resolution Failure

  1. Open the Symbol Table.
  2. Either add the missing symbol with the correct absolute address (e.g., FC 19) or convert the symbolic CALL to an absolute CALL by deleting the quoted name and entering the numeric operand.

7.4 Class D — KOP/FUP→STL Conversion Loss

This matches the source case study:

  1. With online OB1 open, scroll to the network number(s) flagged in red offline.
  2. For each affected network, copy the resolved CALL FC xxx operand from the online view.
  3. Switch to offline view, open OB1 in STL, and edit the network: replace the empty operand after CALL with the recorded FC/FB number. Re-key END CALL if Step 7 has stripped it.
  4. Save the block. Step 7 may prompt "Block is inconsistent" — confirm Yes; the next compile pass regenerates the block interface.
  5. Run Program > Compile All. All CALL lines should now render black.
Tip: When in doubt about an operand, right-click the network in online view and use Go To > Location in Block for any FC referenced indirectly. The PLC basic program FCs each have well-defined signatures — do not invent operands; copy the exact operand from online.

8. Safe Download Procedure (Avoiding PLC STOP)

After the offline project compiles cleanly, follow the documented Siemens cold/warm download path:

  1. Back up the current online project first. PLC > Upload Station to PG. Save to a dated folder. This is the rollback path if the new program fails.
  2. Place the machine in a safe state. NCK reset ("Reset" key on MCP), all drives disabled, axes at safe positions, doors closed. Follow the site lockout-tagout (LOTO) procedure.
  3. Switch the CPU to STOP. Use the MCP selector or PLC > Operating Mode > STOP. Note the STOP transition in the diagnostic buffer (event ID 0x4301) for traceability.
  4. Delete the user program blocks. PLC > Clear/Reset. This is required when block interfaces (FB signatures, DB structures) change. If only CALL operands were edited and FB/DB structures are unchanged, this step may be skipped.
  5. Download the corrected blocks. Select the Blocks container > PLC > Download. Confirm only the intended blocks are selected.
  6. Switch to RUN. PLC > Operating Mode > RUN-P. Watch the diagnostic buffer for event ID 0x4302 (which would indicate the download failed) or normal restart event 0x4300 series.
  7. Verify online ↔ offline parity. Options > Compare Blocks again. All blocks should report identical.
  8. Smoke-test the machine. Jog axes, run a dry program (e.g., M00 block with no motion), confirm MCP, HMI, and tool changer respond.
Never use PLC > Download User Program to Memory Card while the PLC is in RUN unless the toolbox documentation explicitly permits a hot-swap for the blocks in question. The standard basic-program blocks (FCs 2–31, FB4–FB7) have interface dependencies on the NCK version and require coordinated download.

9. Toolbox and Software Requirements

For the SINUMERIK 840D sl NCU line, the PLC programming environment requires:

Tool Minimum Version Notes
SIMATIC Manager (Step 7 V5.x) V5.5 + SP4 or later Required for S7-300 project editing; TIA Portal not used for 840D sl PLC
SINUMERIK 840D sl toolbox Match NCU SW version Contains basic PLC program; install to C:\Program Files\Siemens\Automation\S7proj\Lib
S7-PLCSIM (optional) V5.4 + SP5 or later Allows offline simulation of edited OB1 prior to live download
STEP 7 S7-SCL (optional) V5.3 + SP1 or later Useful if user blocks are written in SCL rather than STL/KOP

The toolbox is not optional for the SINUMERIK 840D PLC. Without it, the standard FCs and the symbol table entries for the basic program are missing, and any reference to them in the offline project — including CALL FC 19, CALL FB 4, DB 7, etc. — renders red. The user will not see "errors" in the PLC because the actual online program is unaffected, but compilation and any new download will fail.

The toolbox version must match the NCU software version. Mismatched toolbox and NCU SW combinations can produce SF (System Fault) on the PLC after download due to interface mismatches in DB structures used by the basic program.

10. Verification and Commissioning Checks

After recompiling and downloading, run the following verification matrix:

Check Method Pass Criterion
OB1 renders cleanly Open offline OB1, inspect color All CALL/END CALL black
Compile success Program > Compile All No warnings in output window
Online ↔ offline match Options > Compare Blocks 0 differences reported
CPU diagnostic buffer PLC > Diagnostic Buffer No event ID 0x4302, 0x4570, 0x4xxx
SF LED on CPU Visual inspection Off
MCP response Press each mode selector Mode change reflected on HMI
NCK-PLC handshake HMI > Diagnostics > PLC Interface signals DB updating
Axis enable path Jog an axis in setup mode Feed enable / drive enable / controller enable all active

11. Edge Cases and Field-Proven Caveats

From documented Siemens support practice and field commissioning notes:

  • Backup obtained from a different NCU SW line. A project archived from a 840D sl SW 4.5 system opened on a SW 5.3 environment will show CALL lines red for blocks whose interface changed. The toolbox provides version-specific FC/FB variants — install the matching toolbox and replace the affected FC/FB pair.
  • FB instance DB misalignment. If an FB in the offline project has a different interface signature than the online FB, the corresponding DB instance shows red. Delete the inconsistent DB and let the next compile pass regenerate it, or use PLC > Download with the "Include user blocks" option to force a fresh instance DB.
  • Multiple projects in same S7 program. If the S7 program contains both user blocks and basic-program blocks, ensure the basic program is referenced (not copied) — copied blocks do not auto-update with NCU firmware changes.
  • MPI vs. PROFIBUS vs. Ethernet routing. Online diagnosis of OB1 over Ethernet to a 840D NCU requires the PG/PC interface to be set to TCP/IP with the NCU's IP address (default 192.168.214.1) and the access list of the NCU allowing the engineering station. If "Go online" fails, check Set PG/PC Interface in the Control Panel and confirm the route via the PLC basic program's FB 9 (if used).

12. Preventive Best Practices

  1. Archive with the toolbox bundled. When taking a project backup, include the toolbox library as a sibling in the archive so that any restore environment has the reference blocks.
  2. Document NCU SW / toolbox version pairs. Tag each archive with NCU software version (e.g., "SW 4.95 SP5") and toolbox version to avoid mismatched restores.
  3. Use the upload-from-station as the canonical source. After commissioning, perform PLC > Upload Station to PG once and compare against the engineering project. Resolve any drift before the next backup cycle.
  4. Prefer absolute calls for the basic program. Symbolic CALLs to FC 19, FC 21, etc. can be lost across toolbox upgrades; absolute calls survive re-installation of the toolbox library.
  5. Always compile-all before download. Step 7's per-block compile can hide cross-block inconsistencies (e.g., interface changes in an FB not propagating to all instance DBs). Program > Compile All catches these.
  6. Use S7-PLCSIM for new logic. When adding a new FC to OB1, simulate in S7-PLCSIM with a stubbed FC 19 before downloading to the live system.

FAQ

Why does CALL appear red in Step 7 even when the SINUMERIK 840D machine runs without any PLC fault?

The red text is an offline-editor indication that the CALL operand cannot be resolved against the blocks present in the offline project. The online CPU still holds the last successfully downloaded program with intact operands, so cyclic execution continues. Common causes are a missing SINUMERIK 840D sl toolbox, a deleted user FC/FB, or operand loss after a KOP/FUP→STL conversion round-trip.

Do I need the SINUMERIK 840D sl toolbox installed to edit the PLC?

Yes. The toolbox supplies the standard basic-program FCs (FC2, FC3, FC5–FC31), FB4–FB7, and the symbol table entries used by OB1. Without it, every reference to those blocks renders red and the offline project will not compile.

Will the SINUMERIK PLC go to STOP if I download a project containing red CALL statements?

In nearly all cases, yes. Step 7 either rejects the download of an inconsistent block or, if a partial download succeeds, the CPU enters STOP on the next restart because OB1 contains unresolved call operands. Always resolve every red CALL before any download, or the PLC will halt and remove NCK↔PLC handshakes.

How do I identify which FC a red CALL was originally referencing?

Go online to the CPU (PLC > Connect to Target System) and open the online OB1. Scroll to the corresponding network — the online view always shows the resolved operand. Copy the operand (for example FC 19 or FB 4, DB 7) into the offline network, save, and recompile.

Can TIA Portal edit a SINUMERIK 840D sl PLC project?

No. SINUMERIK 840D and 840D sl use the SIMATIC Manager / Step 7 V5.x environment with the SINUMERIK 840D sl toolbox. TIA Portal support is limited to SINUMERIK ONE (PLC 1500-based) and later lines. Do not attempt a TIA Portal migration of an 840D sl project without explicit Siemens migration tooling.

Back to blog