Siemens PN/PN Coupler 'IO Data Invalid (Partially Bad Flagged)': Root Cause and Resolution
When a Siemens PN/PN Coupler (6ES7 158-3AD10-0XA0) bridges a SIMATIC S7-1500/F controller to an S7-300 station, the diagnostic buffer of the IO controller frequently reports Status Error - Transmitted IO data invalid (partially bad flagged) on the X1 interface. The error indicates that the PROFINET IO controller on the remote subnet is no longer producing valid process data, or that the slot mapping between the two coupler sides has been configured inconsistently with the diagnostics-status (DS) byte semantics.
This reference consolidates the field-proven diagnostic steps, hardware configuration rules, and legacy S7-300 integration patterns required to clear the fault on installations that mix a CPU 1516F-3 PN/DP (or 1512F-1 PN), a CPU 315-2 DP, and a CP 343-1 PN / CP 343-4 on the S7-300 side.
1. PN/PN Coupler Functional Model
The PN/PN Coupler is a PROFINET IO device with two physical PROFINET interfaces (X1 and X2) that are galvanically and logically isolated. Each side operates as an IO device on its own subnet. Up to 16 input bytes and 16 input/output bytes can be exchanged per direction, distributed across a maximum of four slots per side.
Data flow direction:
- Data written by the IO controller on subnet A (X1) is mirrored as output data on subnet B (X2).
- Data written by the IO controller on subnet B is mirrored as input data on subnet A.
Slot configuration in the GSD file (GSDML-Vx.x-Siemens-PnPnCoupler-YYYYMMDD.xml) defines byte width and the optional diagnostics-status byte. The standard GSDML exposes slot 1 (basic slot) and slots 1-4 with extensions, including:
- Basic slot without DS
- Basic slot with DS
- Empty slot (zero bytes)
The DS byte is a status byte the coupler uses to indicate the validity of the data coming from the opposite subnet. The IO controller must read the DS byte but must never write it. Attempting to write the DS byte from the application produces the partially bad flagged condition.
2. Symptom: 'IO Data Invalid, Partially Bad Flagged'
The diagnostic text Transmitted IO data invalid (partially bad flagged) originates from the PROFINET IO device diagnostic record set 0x8000 (ChannelDiagnostics) combined with 0x002A (ExtChannelDiagnosis). Per the PROFINET specification, this is the standard DataInvalid qualifier.
Observed location:
- TIA Portal: Online & Diagnostics → PROFINET device → Diagnostics status → Status Error
- HMI / Web server: Quality code = BAD with sub-status partially bad flagged
- STEP 7 V5.5: Module diagnostics of the PN/PN Coupler slot shows channel fault
Hex error code seen in the diagnostic buffer:
ChannelError / ExtChannelError
ChannelNumber : 0x8000 (submodule / slot qualifier)
ChannelProperties : 0x0815 (DataInvalid, Severity = Diagnostic)
ChannelErrorType : 0x002A (Data invalid - partially bad flagged)
ExtChannelErrorType: 0x0000
This is not a hardware failure. The coupler is functioning; it is correctly reporting that the producer on the other side is in STOP, or that the configured slot does not match a real producer.
3. Root Cause Matrix
| # | Root Cause | Detection Method | Resolution |
|---|---|---|---|
| R1 | Diagnostics-Status (DS) byte semantics ignored; application program writes DS byte | Compare slot config on X1 vs X2; verify process image write source | Use slot 1 without DS, or set DS to read-only by selecting Basic slot with DS only on the consumer side |
| R2 | Slot configured with '+DS' extension on both sides; coupler cannot arbitrate dual DS | TIA Portal device view, slot configuration comparison | Reduce to Basic slot v3.0 (no DS) or single-sided DS only |
| R3 | S7-300 has no PROFINET IO controller capability (CPU 315-2 DP) and no CP blocks are loaded | STEP 7 HW Config: check for CP 343-1 PN; check OB1 / cyclic OB for PNIO_SEND/RECEIVE | Add CP 343-1 PN (6GK7343-1CX10-0XE0), call PNIO_SEND / PNIO_RECV in OB1 with PNIO error handling |
| R4 | IO addresses on the legacy DP-side PN interface are fragmented, blocking contiguous send/receive mapping | CP 343-1 PN properties → IO addresses in HW Config | Re-pack IO addresses into contiguous blocks; align with PN/PN coupler slot width (multiples of 8 bytes) |
| R5 | CPU on remote subnet is in STOP | Diagnostic buffer of remote CPU; coupler web server | Place remote CPU in RUN; DS byte will return to 0xFF (valid) |
| R6 | PROFINET device name mismatch on one side | Online → Accessible nodes, compare device name with configured name | Assign PROFINET device name via Topology Editor or PRONETA |
| R7 | GSDML version mismatch between TIA Portal projects on X1 and X2 subnet | Compare GSDML file version installed | Update GSDML for both projects; both must reference the same coupler firmware revision |
4. Step-by-Step Diagnostic Procedure
4.1 Confirm the topology
- In TIA Portal, open Devices & Networks and verify both PN subnets are present with the PN/PN Coupler as the only shared device.
- Right-click the coupler → Properties → General → Catalogue Information and record the order number (must be 6ES7 158-3AD10-0XA0 or compatible variant).
- Record firmware version under Device Information; versions V3.0 and V4.0 are current as of TIA Portal V18.
4.2 Inspect slot configuration
- Expand the coupler in the device view.
- Click each slot (1-4) on X1 side and X2 side.
- For each occupied slot, confirm the Module selection from the catalogue.
The valid Siemens catalogue entries for the PN/PN Coupler are:
- Basic slot v3.0 (no DS) - up to 16 bytes in + 16 bytes out per slot, up to 4 slots
- Basic slot with DS v3.0 (DS present) - one slot only, reserves byte 0 as DS on the input side
- Empty slot
Critical rule: the X1 and X2 sides must mirror each other such that the input width on X1 equals the output width on X2 (and vice versa). Mismatch yields partially bad flagged.
4.3 Disable the DS byte (if not needed)
The DS byte is enabled by default in the GSDML catalogue. If the application does not require a STOP indicator, remove the DS variant from the slot selection:
- In the device view of the PN/PN Coupler, delete the slot currently configured as Basic slot with DS v3.0.
- Insert Basic slot v3.0 in its place.
- Compile and download to both controllers.
This removes the DS-only cause and clears the diagnostic if R1 or R2 was active.
4.4 Verify the legacy S7-300 side
CPU 315-2 DP (6ES7315-2AH14-0AB0) has no integrated PROFINET interface. Communication through the PN/PN coupler requires one of:
- CP 343-1 PN (6GK7343-1CX10-0XE0) with PROFINET IO Controller firmware
- CP 343-1 Lean (6GK7343-1CX00-0XE0) - limited, only certain firmware supports IO Controller
In STEP 7 V5.5 (or TIA Portal with S7-300 target), the CP must be configured as a PROFINET IO controller. Then, in the cyclic OB (typically OB1), the application must call the PNIO send/receive blocks:
// OB1 (S7-300 with CP 343-1 PN acting as PROFINET IO Controller)
// FB 100 "PNIO_SEND" - Standard PN/PN Coupler data producer
// FB 101 "PNIO_RECV" - Standard PN/PN Coupler data consumer
CALL FB 100, DB100 // PNIO_SEND
CPLADDR := W#16#0100 // Logical base address of CP 343-1 PN
SEND := P#DB101.DBX0.0 BYTE 64 // Output area to PN/PN Coupler X2
LEN := 64 // Must match the configured slot width on X2
DONE := M100.0
ERROR := M100.1
STATUS := MW102
CALL FB 101, DB200 // PNIO_RECV
CPLADDR := W#16#0100
RECV := P#DB201.DBX0.0 BYTE 64 // Input area from PN/PN Coupler X2
LEN := 64
NDR := M200.0
ERROR := M200.1
STATUS := MW202
RLEN := MW204
If neither FB is called, the CP never establishes a PROFINIO AR (Application Relationship) with the coupler, and the X1 side permanently reports IO data invalid.
4.5 Validate address contiguity
For the CP 343-1 PN acting as IO controller, the IO addresses used by the send/receive FBs must map to a contiguous range that the coupler can decode as a single slot. In STEP 7 V5.5:
- Open HW Config → select the CP 343-1 PN.
- Open Object Properties → Addresses.
- Ensure the IO addresses for the PN/PN coupler slot start at a byte boundary and are sized exactly to the configured slot width (e.g., 64 bytes in, 64 bytes out).
Avoid using the same address area twice or overlapping with another module; this is a common field error when DP and PN segments are mixed on the same CPU.
5. Specific Configuration Patterns That Resolve the Fault
5.1 Pattern A - S7-1500F to S7-300 (DP master with CP 343-1 PN)
Recommended slot selection on each side of the PN/PN coupler:
| Side | Slot 1 | Slot 2 | Slot 3 | Notes |
|---|---|---|---|---|
| X1 (S7-1500F subnet) | Basic slot v3.0, 64 bytes I / 64 bytes O | Empty | Empty | No DS |
| X2 (S7-300 CP 343-1 PN subnet) | Basic slot v3.0, 64 bytes I / 64 bytes O | Empty | Empty | Mirrored; PNIO_SEND/RECV at CP base |
This is the configuration that field installations have confirmed to clear the partially bad flagged condition. Avoid the '+DS' variant on both sides.
5.2 Pattern B - S7-1500F to S7-300 with diagnostics status monitoring
If the application must monitor STOP state of the remote CPU via the DS byte, configure the DS variant on a single side only:
| Side | Slot 1 | DS role |
|---|---|---|
| X1 | Basic slot with DS v3.0, 1 byte I (DS) + 63 bytes I + 64 bytes O | Consumer of remote DS |
| X2 | Basic slot v3.0, 64 bytes I / 64 bytes O | No DS produced; remote STOP not signaled via DS |
Critical: the DS byte appears at offset 0 of the input area. The application must read it but must not write back to that offset on the output side.
5.3 Pattern C - Bridging to a CP 343-4 (legacy PROFINET CBA)
CP 343-4 supports PROFINET CBA but not IO Controller. Use CP 343-1 PN as IO Controller and treat CP 343-4 only as a passive participant. Do not assign IO addresses on the CP 343-4 for the PN/PN coupler.
6. Verification Checklist
Run the following checks in order after applying the configuration changes:
- Online diagnostics: In TIA Portal, go to Online & Diagnostics on the PN/PN Coupler. Confirm no Status Error and no Data Invalid indicators on either side.
- Diagnostic buffer: On both CPUs, open Diagnostic Buffer. The most recent entry related to the PN/PN coupler should read PROFINET IO: AR established, not Data invalid.
-
DS byte content: In a watch table on the consumer side, the DS byte should equal
16#FFwhen the producer CPU is in RUN, and16#00when the producer is in STOP. -
FB status outputs: On the S7-300 with CP 343-1 PN, watch
PNIO_SEND.DONE = TRUEandPNIO_RECV.NDR = TRUE.STATUS = W#16#0000indicates no error. - Process image: Force a known value at the producer and confirm it appears at the consumer within one PROFINET update cycle (default 1 ms).
7. Troubleshooting Matrix - Symptom → Cause → Action
| Symptom | Likely Cause | Action |
|---|---|---|
| IO Data Invalid immediately after download | Slot width mismatch X1 vs X2 (R1, R2) | Reconfigure to identical widths; remove '+DS' on both sides |
| IO Data Invalid only on X1 side, X2 fine | S7-300 controller in STOP (R5) | Place CPU 315-2 DP in RUN; verify CP 343-1 PN is active |
| IO Data Invalid persists after STOP/RUN cycle | CP 343-1 PN not configured as IO Controller; PNIO blocks missing (R3) | Reconfigure CP; add PNIO_SEND / PNIO_RECV to OB1 |
| Partially bad flagged with DS configured | Application overwrites DS byte (R1) | Remove DS from slot; or fix application to read DS only |
| Coupler flashes SF LED on X1 only | Device name missing on X1 subnet (R6) | Assign PROFINET device name via PRONETA or Topology Editor |
| Coupler boots but no AR established | GSDML version mismatch between projects (R7) | Update GSDML on both sides; match firmware version |
| Intermittent bad-flagged bursts during S7-300 startup | CP 343-1 PN not yet finished AR establishment when OB1 runs PNIO blocks (R3) | Initialize STATUS word; only call blocks after first successful STATUS ≠ W#16#0000 |
8. Firmware, GSDML, and TIA Portal Compatibility
| Coupler Order Number | Firmware | TIA Portal Minimum | GSDML Version Pattern |
|---|---|---|---|
| 6ES7 158-3AD10-0XA0 | V1.0 | V12 | GSDML-V2.31-Siemens-PnPnCoupler-20120829.xml |
| 6ES7 158-3AD10-0XA0 | V3.0 | V13 SP1 | GSDML-V2.32-Siemens-PnPnCoupler-20150114.xml |
| 6ES7 158-3AD10-0XA0 | V4.0 | V15.1 / V16 | GSDML-V2.35-Siemens-PnPnCoupler-20180926.xml |
Mismatched GSDML versions between the X1 project (TIA Portal) and the X2 project (STEP 7 V5.5) can also surface as a slot validation error. Always import the latest GSDML from the Siemens support portal into both engineering tools.
9. Layer-1 / Layer-2 Sanity Checks
Before assuming a configuration issue, validate the physical layer:
- PROFINET cable ≤ 100 m per segment (copper), link LEDs green on both X1 and X2 ports of the coupler.
- No duplicate IP addresses on either subnet. The coupler has two IP addresses, one per side; both must be in their respective subnet range.
- Switch ports used for PROFINET must not be configured with Energy Efficient Ethernet (EEE) or Green Ethernet; disable EEE on managed switches. PROFINET real-time frames are sensitive to latency spikes.
- No managed-switch port-security MAC locking that would drop the coupler's MAC.
Use PRONETA to scan the subnet and confirm the coupler is visible with its assigned PROFINET name and IP.
10. State Diagram of the Diagnostics Bit
[Remote CPU RUN] --AR established---> [DS byte = 0xFF] --> Consumer reads GOOD quality
|
| STOP transition
v
[Remote CPU STOP] --AR remains----> [DS byte = 0x00] --> Consumer reads BAD quality
|
| DS disabled in slot config
v
[No DS in slot] ----AR valid---> [No DS byte present] --> Consumer reads GOOD quality
(cannot detect STOP via DS)
11. Common Configuration Errors Documented by Siemens
The official Siemens hardware manual for the PN/PN Coupler explicitly notes:
- The DS byte is enabled by default; the diagnostic message Data invalid is selected by default and can be disabled for each interface separately.
- If the IO controller of the other subnet is in STOP state, the corresponding slot shows Data invalid in the online diagnostics.
- Slots must be configured symmetrically; the maximum total data width is 16 input + 16 output bytes per side.
These statements are confirmed in the official hardware installation manual for the 6ES7 158-3AD10-0XA0.
12. Reference Links
- Siemens PN/PN Coupler Hardware Installation and Operating Manual (PDF)
- PN/PN Coupler product page (Siemens Support)
- SIMATIC NET PN/PN Coupler Manual Collection
- CP 343-1 PN manual entry
- PROFINET Diagnostics and Error Codes reference
What does 'IO data invalid (partially bad flagged)' mean on a PN/PN Coupler?
It means the PROFINET IO device diagnostic record reports ExtChannelErrorType 0x002A - the producer on the opposite subnet is not delivering valid data, or the slot width and DS-byte configuration on the two sides do not match. It is not a hardware failure of the coupler.
Should I use the 'Basic slot with DS' or 'Basic slot v3.0' for a CPU 1516F-3 to CPU 315-2 link?
For an S7-1500F to S7-300 (CPU 315-2 DP) link, use 'Basic slot v3.0' without DS on both sides. Adding '+DS' on both sides causes 'IO data invalid, partially bad flagged' because both sides try to arbitrate the DS byte.
Does the CPU 315-2 DP need a CP for PROFINET communication through the PN/PN Coupler?
Yes. The CPU 315-2 DP has no integrated PROFINET interface. Add a CP 343-1 PN (6GK7343-1CX10-0XE0) acting as PROFINET IO Controller and call PNIO_SEND and PNIO_RECV in OB1. Without these blocks the coupler shows IO data invalid because no Application Relationship is established.
How do I disable the DS byte diagnostics on the PN/PN Coupler?
In TIA Portal device view, delete the slot currently set to 'Basic slot with DS v3.0' and insert 'Basic slot v3.0' instead. Recompile and download to both controllers. The DS-driven 'Data invalid' diagnostic will no longer appear on that side.
Can I keep using PROFINET CBA with a CP 343-4 and the PN/PN Coupler?
No. The CP 343-4 is a CBA participant only and cannot act as a PROFINET IO Controller. Use a CP 343-1 PN for the PN/PN Coupler side and leave the CP 343-4 out of the PROFINET IO configuration.