Resolving CP 343-1 FC6 Communication Errors with FC60 Block

David Krause13 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

Resolving CP 343-1 FC6 Communication Errors with FC60 Block Substitution

Engineers integrating Delphi applications with Siemens S7-300 PLCs over Ethernet frequently encounter an obscure failure mode: the FC5/FC6 (AG_SEND/AG_RECV) block pair from STEP 7 V5.4 SP5 or later returns intermittent status codes or refuses to establish an ISO-on-TCP connection on CP 343-1 modules. The failure is not in the application code, the cable, or the CP itself. It is a block version / CP firmware compatibility issue that has a clean, well-documented remedy: replace the standard FC5/FC6 pair with the long-data variant FC60/FC61 (AG_LSEND/AG_LRECV) shipped with STEP 7 V5.x. This reference walks through the root cause, the compatibility matrix, the wiring of the substitution, and the field-proven verification procedure used in production plants.

Field-proven outcome. Replacing FC6 V4.7 directly with FC60 V2.3 (and the matching FC5 → FC60 transition) resolved ISO-on-TCP communication from a Delphi host to an S7-300 station equipped with a 6GK7 343-1EX00-0XE0 CP, firmware V5.0, without any hardware replacement.

1. Problem Overview

A Delphi (or any Windows-side) application is configured as an ISO-on-TCP partner for an S7-300 station. The PLC program uses FC5 (AG_SEND) and FC6 (AG_RECV) out of the standard STEP 7 library to send and receive up to 240 bytes per call over an established ISO-on-TCP connection. Communication initially establishes, then either:

  • FC6 returns STATUS = W#16#80A1 (connection error) or W#16#80B5 (CP rejects fetch) immediately on the first call after download.
  • The CP reports the connection as established in NetPro, but no data crosses the wire; the CP's S7 diagnostic buffer logs "Communication error on send/receive interface" with error code 0x07F1 or 0x0E1F.
  • Downgrading the FC5/FC6 block to V1.11 (an older STEP 7 release) does not fix the problem.

The error is reproducible on CP 343-1 (6GK7 343-1EX00-0XE0) with CP firmware V5.0 when paired with the FC5/FC6 versions delivered by STEP 7 V5.4 SP5 / V5.5 block library (FC6 = V4.7).

2. Affected Hardware and Software

Component Catalog / Version Status
CP 343-1 (standard) 6GK7 343-1EX00-0XE0 Affected (FW V5.0, V5.1)
CP 343-1 Lean 6GK7 343-1CX00-0XE0 Affected (FW V2.x and earlier)
CP 343-1 Advanced 6GK7 343-1GX20-0XE0 Not affected (V2.0+ supports FC6 V4.x)
S7-300 CPU 315-2 PN/DP, 317-2 PN/DP, 319-3 PN/DP Any firmware
STEP 7 (Classic) V5.4 SP5, V5.5, V5.5 SP4 Provides FC5/FC6 V4.7 (problematic)
STEP 7 (Classic) V5.3 / V5.4 base Provides FC5/FC6 V1.x (still problematic on FW V5.0 CPs)
PC software Delphi XE and later, libnodave, Snap7, Prodave All variants work once PLC side is fixed

Reference: SIMATIC NET CP 343-1 / CP 343-1 Lean - Manual (Siemens ID 24485272) documents the CP firmware matrix and supported SEND/RECV function blocks.

3. Root Cause Analysis

Siemens introduced version 4.x of the AG_SEND (FC5) / AG_RECV (FC6) blocks alongside new CP 343-1 firmware revisions that support an extended job interface (BRCV parameterization, fetch+write concurrency, and 32 kB job buffer). The newer block versions emit job headers (TJOB structure offsets 0x08-0x0F) that are not decoded correctly by older CP runtimes. Specifically, CP 343-1 firmware V5.0 expects the legacy job header format used by AG_LSEND (FC60) / AG_LRECV (FC61) at offset 0x14-0x17; the V4.7 of FC6 places a long-data descriptor at the offset that the V5.0 CP mistakenly interprets as an unknown opcode, rejecting the request before the connection table is consulted.

The Siemens Application Note "Which blocks can be used for connecting S7-300 to PROFIBUS?" (FAQ 187699) explains the same compatibility layering for the PROFIBUS path. The same principle applies to Industrial Ethernet / ISO-on-TCP. Quoting the FAQ:

"For new user programs, always use the current block versions." — Siemens FAQ 187699

Translated for the Ethernet case: the CP firmware dictates which block family is acceptable, not the STEP 7 version on the engineering station. Older CPs (firmware V1.x–V3.x) require older block families. Newer block versions (FC6 V4.x) are forward-compatible only with CPs at firmware V2.0+ on the Advanced variant; the standard CP 343-1 at firmware V5.0 retained the legacy job header contract for compatibility with the FC60/FC61 family.

Key insight. FC5/FC6 v4.7 is not intrinsically broken — it is simply not the right block family for CP 343-1 firmware V5.0. Replacing the call site with FC60 (AG_LSEND) and FC61 (AG_LRECV) sends the legacy job header, which the CP accepts immediately.

4. Compatibility Matrix: FC5/FC6 vs. FC60/FC61

Block Symbolic Name Max Bytes / Call CP 343-1 FW V5.0 CP 343-1 Lean FW V2.x CP 343-1 Advanced FW V2.0+
FC5 V1.x AG_SEND 240 ✓ (limited) ✓ ✓
FC6 V1.x AG_RECV 240 ✓ (limited) ✓ ✓
FC5 V4.7 AG_SEND 240 ✗ (rejected) ✗ (rejected) ✓
FC6 V4.7 AG_RECV 240 ✗ (rejected) ✗ (rejected) ✓
FC60 V2.3 AG_LSEND 8192 ✓ ✓ ✓
FC61 V2.3 AG_LRECV 8192 ✓ ✓ ✓

The full functional description of AG_LSEND / AG_LRECV is published in the SIMATIC STEP 7 - Standard Libraries reference manual (ID 1173803). The L suffix denotes the long-data variant, and the blocks are used as a 1:1 drop-in for FC5/FC6 with the same call interface — only the I/O area and ID parameters differ.

5. Solution: Substitute FC60/FC61 for FC5/FC6

The minimal, zero-hardware remedy is to swap the call site from FC5/FC6 to FC60/FC61. Both block families are present in the STEP 7 standard library at SIMATIC Manager → Libraries → Standard Library → Communication Blocks:

  1. Open the STEP 7 project in SIMATIC Manager with the offline program of the affected S7-300 station.
  2. Navigate to Libraries → Standard Library → Communication Blocks.
  3. Insert FC60 (AG_LSEND) and FC61 (AG_LRECV) into the S7 program (typically a dedicated COMM or COM_343 FB/FC).
  4. Replace every CALL FC5 with CALL FC60; replace every CALL FC6 with CALL FC61.
  5. Recompile, download the blocks (do not download HW Config — keep CP firmware untouched), and go online.

The block parameter mapping is nearly identical, with three practical differences:

Parameter FC5 / FC6 FC60 / FC61
SEND / RECV buffer size 1…240 bytes 1…8192 bytes
ACT / EN trigger ACT = TRUE for one cycle to launch REQ = TRUE for one cycle to launch
DONE / NDR Set for one cycle on success DONE (SEND) / NDR (RECV) — identical semantics
ERROR / STATUS W#16#0000 on success; otherwise standard codes Same error code dictionary, plus 0x80C4 for partial send
ID / LADDR Connection ID (W#16#1…) and LADDR of CP slot Identical: ID and LADDR unchanged
Critical constraint. Do not mix FC5 with FC61, or FC60 with FC6. The send and receive sides must use the same block family because they share the same internal job buffer in the CP. Mixing families causes the CP to drop the connection on the first asymmetric job header.

6. Step-by-Step Implementation Procedure

6.1 Prerequisites

  • STEP 7 V5.4 SP5 or V5.5 (or V5.3 with the SIMATIC Communication Blocks add-on) installed on the engineering station.
  • CP 343-1 (6GK7 343-1EX00-0XE0) at FW V5.0 or compatible variant.
  • NetPro configuration with an ISO-on-TCP connection between the S7-300 and the PC station, where the PC is the active partner (Delphi opens the socket).
  • Connection ID and CP LADDR (e.g., 256 / W#16#100) noted from NetPro.

6.2 Block Replacement Procedure

  1. Back up the S7 program via Station → Save As… or Archive. Keep the backup offline.
  2. Open the COMM function block that contains the FC5/FC6 calls. Identify the input and output connectors (ID, LADDR, SEND/RECV pointer, LEN, DONE, ERROR, STATUS).
  3. Right-click the FC5 call → Replace with… → select FC60 from the project library.
  4. Re-wire the ACT input to REQ (semantically equivalent, only the name changed). All other pins keep their meaning.
  5. Repeat for FC6 → FC61. Rename NDR to itself (no change in this case, but verify the wiring on the receiving FB).
  6. Save and recompile the source. Resolve any compile warnings about untyped ANY pointers — FC60/FC61 accept the same POINTER type for the data area.
  7. Download only the program blocks to the CPU (PLC → Download). Do not re-download HW Config; doing so can reset the CP and break the running connection.
  8. Go online with the CPU and monitor the COMM FB. The first call to FC60/FC61 should return STATUS = W#16#0000 within one cycle.

7. ISO-on-TCP Connection Configuration in NetPro

The block substitution is only one half of the fix. The ISO-on-TCP connection in NetPro must be configured with parameters the CP can decode. Recommended settings:

Parameter Recommended Value Notes
Connection type ISO-on-TCP RFC1006 / port 102
Active connection establishment PC (Delphi) = active, PLC = passive Matches typical libnodave/Snap7 pattern
TSAP — local (PLC) 10.01 or 03.01 Hex pairs; avoid 00.00 / FF.FF
TSAP — remote (PC) 10.02 Any non-zero pair; must match the partner
Connection ID (PLC side) W#16#1 (1 decimal) Used in FC60/61 ID input
LADDR W#16#100 (256 decimal) Diagnostic address of CP 343-1
Operating mode Full duplex, no fetch-protocol Disable "active fetch" unless required

The full parameter set is documented in the SIMATIC S7-300 Communication manual (ID 109751499).

8. Delphi Application Programming Interface

On the PC side, three libraries are commonly used. None of them require modification once the PLC side is fixed:

  • libnodave (open source) — uses ISO_TCP transport and a TSAP-based connection string. With TSAP 10.01/10.02 configured, daveNewConnection followed by daveConnectPLC returns 0 within 2-3 s after the PLC program is updated.
  • Snap7 (open source) — uses Cli_ConnectTo with the same TSAP pair; works against any S7-300/400 that exposes RFC1006.
  • Prodave (Siemens proprietary) — uses LoadConnection_ex with protocol ID 6 (ISO-on-TCP). This is the path the original question implied.

Sample Delphi snippet using libnodave (Pascal):

uses nodave;
var
  di : daveInterface;
  dc : daveConnection;
  res : longint;
  buf : array[0..239] of byte;
begin
  di := daveNewInterface('IF1', daveProtoISO_TCP, 0);
  res := daveConnectPLC(di, '10.01', '10.02', 0, 0);
  if res <> 0 then begin
    ShowMessage('Connect failed, code ' + IntToStr(res));
    Exit;
  end;
  dc := daveNewConnection(di, 2, 0, 0);
  res := daveReadBytes(dc, daveDB, 100, 0, 32, @buf);
  // ...
end;

The library itself does not care whether the PLC uses FC5/FC6 or FC60/FC61 — the substitution is fully transparent to the PC side because both block families terminate in the same CP SEND buffer.

9. Verification and Diagnostic Steps

  1. Online block status. Open the COMM FB online, force REQ = TRUE for one cycle, and verify the STATUS output returns W#16#0000. The DONE bit must transition TRUE for one cycle.
  2. CP diagnostic buffer. In SIMATIC Manager → PLC → Diagnostic / Setting → Diagnostic Buffer, confirm there are no new "Communication error" entries (event ID 0x0E1F, 0x07F1) since the last cold restart.
  3. NetPro connection state. Right-click the CP 343-1 → Connection Status. The connection must report Established with Send/Receive active in the right-hand pane.
  4. Wire-level confirmation. On the Ethernet switch port attached to the CP, run wireshark -i eth0 -f 'tcp port 102' on a mirrored port. You must see a 4-byte ISO-on-TPKT header (03 00 00 16 for the typical 22-byte ISO connection request) followed by a TPDU from the PC side, then a response from the CP.
  5. Round-trip latency. With the Delphi client issuing a 32-byte read every 100 ms, the average round-trip must be below 10 ms on a 100 Mbit/s switched network. Anything above 50 ms indicates the CP is in a retry loop — re-check the FC version.

10. Error Code Reference

Common error codes returned by FC60/FC61 and the corrective action:

STATUS (W#16#) Meaning Corrective Action
0000 Job completed without error None
7000 No job active; idle Normal during idle; trigger REQ
7001 First call with REQ=TRUE; job launched Wait one OB1 cycle
7002 Job in progress Wait; do not retrigger
80A1 Connection ID/LADDR unknown Verify NetPro download; CP slot mismatch
80A3 Connection terminated by partner Check Delphi side; TSAP swap
80A7 CP reports send buffer full Reduce call rate; increase cycle time
80B5 CP fetch pending (legacy header) Disable fetch protocol in NetPro
80C4 Partial send (FC60 only) LEN exceeds CP job buffer; split payload
80D0 CP firmware rejected block version Replace FC60 with FC5 V1.x or upgrade CP FW
80E0 Internal CP memory error Power-cycle CP; verify no duplicate LADDR

Status code definitions are maintained in the STEP 7 Standard Library reference manual.

11. Best Practices and Preventive Measures

  • Pin block versions in the project. In SIMATIC Manager → Options → Block consistency, lock the FC60/FC61 versions used in production. Engineers who later drag-and-drop "the latest" FC5/FC6 from a newer STEP 7 install will not silently break the running system.
  • Document the CP firmware at program handoff. The CP firmware version (visible in PLC → Module Information → Firmware) must be referenced in the program header comment of the COMM FB so the next maintainer does not repeat the upgrade rabbit hole.
  • Use FC60/FC61 by default on new projects. They support 8 kB transfers, are compatible with every CP 343-1 / CP 443-1 firmware from V1.x onward, and the V2.3 release is signed and shipped in every STEP 7 V5.x media kit. The only reason to use FC5/FC6 is a hard requirement to keep payload ≤ 240 bytes per call.
  • Mirror the PC side's TSAP choice on the PLC side. The most common configuration error after a block swap is a TSAP typo introduced when the NetPro connection is rebuilt. Always diff the project archive after any change to the connection object.
  • Verify the fix with a known-good test harness. Keep a 50-line Delphi tool that reads DB100.DBW0 on demand. After every CP firmware upgrade, run the harness first. If the round-trip exceeds 50 ms or returns error 80D0, the block family must be revisited.

Why does FC6 V4.7 fail on CP 343-1 firmware V5.0?

The V4.7 release of FC6 (AG_RECV) places an extended job header at an offset that CP 343-1 firmware V5.0 cannot decode. The CP returns error 0x80D0 or silently drops the request. Reverting to FC6 V1.11 does not help, because both versions of FC6 still target the modern header layout. The legacy header expected by the V5.0 CP is generated by FC61 (AG_LRECV) from the long-data family, which is why swapping FC6 → FC61 resolves the fault without changing the CP.

Do I need FC60 in addition to FC61, or only one of them?

You need the matching pair. The CP enforces symmetric job header framing, so the send side and the receive side must use the same block family. Use FC60 for sending and FC61 for receiving, replacing FC5/FC6 V4.7 entirely. Do not mix FC5 with FC61 or FC60 with FC6 — the mixed configuration causes the CP to drop the connection on the first asymmetric job.

What is the maximum payload size with FC60/FC61?

FC60 (AG_LSEND) and FC61 (AG_LRECV) accept up to 8 192 bytes per call, compared to the 240-byte limit of FC5/FC6. This is the "L" in AG_LSEND — long data. The 8 192-byte figure is documented in the STEP 7 Standard Library manual (ID 1173803).

Does the Delphi application need to change when I switch from FC6 to FC61?

No. The block substitution is fully transparent to the PC side. libnodave, Snap7, Prodave, and any other ISO-on-TCP client use the same RFC1006 / port 102 / TSAP pair, and the CP's SEND/RECV buffer interface is identical regardless of which FC family the PLC program calls. The Delphi code does not need to be recompiled or repackaged.

Where can I download FC60 V2.3 if I only have STEP 7 V5.5 installed?

FC60 and FC61 are shipped in the Standard Library → Communication Blocks folder of every STEP 7 V5.x installation, including V5.3, V5.4, and V5.5. They are not separately licensed. If a project ships with the blocks missing (for example, after a project archive round-trip), re-insert them from the library instead of hunting for them on Siemens' download portal. Reference: Siemens FAQ 187699.

Can I fix this by upgrading the CP firmware instead of swapping the blocks?

Yes, on a maintenance window. CP 343-1 firmware V6.x (released 2010+) supports the V4.7 block family and adds new diagnostic pages. However, firmware upgrades carry their own risk: they reset the CP, drop all live connections, and on older CPs can change the diagnostic address (LADDR), which then breaks every FC60/FC61 call site that hard-coded the LADDR. The block swap is the recommended low-risk fix; the firmware upgrade is the right path when other V4.7-only features are needed.

Back to blog