Problem Overview
The A080 diagnostic event generated by the MODBUSCP function block indicates that different instance data blocks (IDBs) were used for the call of MODBUSCP in the warm-restart OB (OB100) and in the cyclic OB (typically OB1 or OB35). The error is reported at the block's ERROR / STATUS outputs and is written to the diagnostic buffer of the CP 343-1 or CP 443-1 communication processor when the CPU goes online with the project.
This condition most commonly occurs in SIMATIC PCS7 V7.1 SP2 projects built with the CFC editor, but it has been observed in STEP7 V5.4 / V5.5 environments as well, particularly after a Download without STOP operation (also called Run-mode download or Configuration in Run, CiR). Because the MODBUSCP block is not designed to accept online reconfiguration of its instance memory, the CPU detects the inconsistency between the initialization context (OB100) and the runtime context (cyclic OB) and raises A080 to protect the integrity of the Modbus/TCP connection.
Affected Components and Versions
| Component | Affected Versions / Part Numbers | Notes |
|---|---|---|
| SIMATIC PCS 7 | V7.1 SP2 (and V7.1 SP1, V7.0 SP4 with retroactive effect) | Most reported on V7.1 SP2 |
| SIMATIC STEP 7 | V5.4 SP5, V5.5, V5.5 SP1 | Required for IDB download handling |
| MODBUSCP block library | MODBUS_PCS7 / MODBUS_CP V1.x and V2.x | Shipped with PCS7 DVD or downloaded from SIOS |
| CP 343-1 | 6GK7 343-1EX30-0XE0, 6GK7 343-1EX21-0XE0 | Used in AS 300 stations |
| CP 443-1 | 6GK7 443-1EX20-0XE0, 6GK7 443-1EX11-0XE0 | Used in AS 400 stations |
| S7 CPU | CPU 315-2 PN/DP, CPU 317-2 PN/DP, CPU 414-3 PN/DP, CPU 416-3 PN/DP | Any CPU hosting the CP |
Understanding the A080 Error Code
The full Siemens diagnostic text for the A080 status returned by the MODBUSCP block reads:
"Different instance DBs were used for the call of MODBUSCP in OB100 and the cyclic OB."
This message is raised by the block's internal consistency check. The block uses two distinct call sites:
- OB100 (warm restart): Initializes the block, opens the Modbus/TCP connection, and clears the receive buffer. OB100 executes only on a STOP-to-RUN transition (cold restart, warm restart, or hot restart, depending on CPU type).
- Cyclic OB (OB1, OB35, OB32): Performs the actual Modbus/TCP transaction — sending requests, receiving responses, evaluating function codes (FC01, FC02, FC03, FC05, FC06, FC15, FC16, FC23), and updating the process image.
Both call sites must reference the same instance DB. If the compiler (CFC) or the programmer (STEP7) generated two different IDBs — for example, because the chart was re-instanced, the chart was deleted and re-inserted, or a Run-mode download split the IDB into a temporary one — the runtime check in MODBUSCP triggers A080 and refuses to bring the connection up.
Root Cause Analysis
There are three primary mechanisms that produce the A080 condition in the field:
1. CFC Regeneration of the Instance DB
When the CFC editor compiles a chart containing the MODBUSCP block, it creates a single instance DB. After the chart is downloaded to the target CPU, the runtime IDB in the CPU's work memory is the reference. If you subsequently:
- Re-open the chart in CFC,
- Modify any parameter on the block (even something cosmetic),
- Recompile, and
- Attempt a Download changes in RUN via CFC's online delta download,
…the CFC compiler may assign a new logical IDB number to the block. The CPU retains the old IDB in its online view, so the next time OB100 fires (after a restart), it sees two different IDBs. Because OB100 already passed without the new IDB, the A080 surfaces.
2. Run-Mode Download Without STOP/RUN
Siemens explicitly documents that the MODBUSCP block is not CiR-capable. Any attempt to download the IDB while the CPU is in RUN, even using STEP7's Download to target system > Entire program to target memory card, leaves the running OB100 instance untouched while the cyclic OB instance is updated. The result is the same inconsistent-IDB condition flagged as A080.
3. STEP7 vs. CFC Handling of Multiple IDBs
CFC has no user-facing mechanism to declare "the same IDB" for two call sites — the editor generates them automatically. In STEP7's LAD/FBD/STL editor, you can manually call MODBUSCP in OB100 and in OB1 using the same multi-instance or the same standalone IDB. The symptom in CFC is therefore more common, but the underlying restriction applies to all editors.
Resolution Procedure
The only sanctioned recovery from a live A080 state is a CPU STOP → RUN transition (a warm or cold restart, depending on CPU type and configuration). Follow the steps below to clear the condition and bring the Modbus/TCP connection online.
Prerequisites
- PG/PC with STEP7 V5.4+ or PCS7 V7.1 SP2 installed and online to the target AS station.
- Read/write access to the project's S7 program and the target CPU's online view.
- Authorization to take the affected CPU briefly to STOP. Coordinate the outage with operations — the Modbus slaves will lose visibility during the restart.
- Documented IP addresses of the CP 343-1 / CP 443-1 and the connected Modbus/TCP devices (default TCP port 502).
Step-by-Step Recovery
-
Verify the project is consistent. In SIMATIC Manager, right-click the S7 program and choose Check Block Consistency. Compile the entire program (or chart) and resolve any warnings about
MODBUSCPor the CP's hardware configuration. - Stop the CPU. Open the online view of the target station, select the CPU, and toggle the operating mode selector to STOP, or send the STOP command via Target system > Operating mode > STOP.
- Download the entire program (not a delta). Use Target system > Download > Entire program to target memory card in STEP7, or in CFC use Chart > Download > Chart to target system on the parent chart. This forces a unified IDB write to load memory.
-
Perform a warm restart. Toggle the mode selector from STOP back to RUN, or issue Target system > Operating mode > RUN (warm restart). OB100 will execute, the
MODBUSCPblock will initialize with the freshly loaded IDB, and the connection will be re-established. -
Verify the A080 has cleared. Open the CPU's diagnostic buffer (CPU > Diagnostic buffer) and the block's online view. The
STATUSoutput ofMODBUSCPshould return16#0000or a normal operating status; A080 should not appear in the buffer after the restart.
Verification
After the restart, perform the following checks:
-
Block STATUS: The
STATUSword of theMODBUSCPinstance should be16#0000(no error) or the active transaction status. A080 =16#A080must not recur. - Connection state: In NetPro, the Modbus/TCP connection to the CP should be in state Established.
- Process data: The configured Modbus registers (holding registers FC03/FC16, input registers FC04, coils FC01/FC05/FC15) should reflect expected values from the slave devices.
- Diagnostic buffer: Look for the entry "MODBUSCP: Connection established to <IP>" after the restart.
Configuring Configuration in Run (CiR) — Why It Is Not Permitted
Configuration in Run allows hot modification of the hardware configuration (adding/removing distributed I/O, changing the AS station count, etc.) without stopping the CPU. The MODBUSCP block is explicitly excluded from CiR-compatible downloads for the following reasons:
- The block maintains a TCP socket state machine on the CP that is initialized exactly once in OB100.
- The block holds the assigned connection ID and the LADDR (logical base address) of the CP; a delta download may not refresh these values safely.
- The block's instance DB contains communication buffers that are sized at first load and cannot be resized online.
Attempting a CiR download on a chart that contains MODBUSCP will either be rejected by CFC's online check or will succeed on the cyclic OB side while leaving OB100 untouched — producing A080 on the next restart anyway.
Best Practices for Avoiding A080
-
Always perform a full STOP/RUN after any change to the
MODBUSCPblock or its instance DB. Treat MODBUSCP as a "startup-only" block from a download perspective. - Avoid modifying the chart online. Make all changes offline, recompile, then download during a planned outage.
-
Single source of truth for IDBs. If you are programming in STEP7 (not CFC), manually place the
MODBUSCPcall in both OB100 and the cyclic OB and point both to the same standalone instance DB (e.g.,DB200). Do not let the compiler generate two separate IDBs. - Document the OB100 call site. In PCS7's CFC, OB100 is auto-generated by the chart compiler. Verify in the generated source that the block call uses the same instance name you see online.
-
Reserve sufficient memory. Each
MODBUSCPinstance consumes ~8 KB work + 9 KB load. On a CPU 315-2 PN/DP (256 KB work), keep the count below 25 instances to leave headroom for the user program. -
Use distinct connection IDs. The block parameter
CON_IDmust be unique across the CPU. Maintain a register of assigned IDs to prevent collisions when scaling. -
Configure watchdog and timeout parameters. Set the block's
TIMEOUT(default 3000 ms) andRETRYvalues to match the network and slave response characteristics. Excessive retries mask transient issues that could appear as A080-adjacent status codes.
Related Status Codes and Their Meanings
| Status (hex) | Meaning | Recommended Action |
|---|---|---|
| 16#0000 | No error / normal operation | None |
| 16#A080 | Different instance DBs in OB100 vs cyclic OB | STOP/RUN restart with full download |
| 16#A081 | Connection not configured in NetPro | Create/check Modbus/TCP connection in HW Config and NetPro |
| 16#A082 | CP not reachable / not in RUN | Check CP LED, network cabling, IP address |
| 16#A083 | Timeout on send/receive | Increase TIMEOUT, check slave availability |
| 16#A084 | Modbus exception from slave (function code > 0x80) | Read slave diagnostic; verify register address and access rights |
| 16#A085 | Invalid function code requested | Verify FUNC parameter against slave capability |
| 16#A086 | Data length mismatch | Check LEN parameter and slave register map |
| 16#A087 | Connection lost / TCP reset | Check network, switch, firewall; verify slave TCP port 502 |
MODBUSCP as documented for PCS7 V7.1 SP2 / V8.0. Newer PCS7 versions (V8.1, V8.2, V9.0) may use a successor block, MODBUSPN or the MODBUS_TCP block from the OpenModbus/TCP library — verify against the manual for your installed version.
Modbus/TCP Background
Modbus/TCP is the encapsulation of the Modbus RTU application protocol over a TCP/IP transport, defined in 1999 by Schneider Automation (now Schneider Electric) and disseminated via the Modbus Organization. It is registered with IANA on TCP port 502 and uses a 7-byte MBAP (Modbus Application) header in place of the RTU address + CRC fields. The transaction identifier in the MBAP header allows the client to multiplex multiple requests on a single TCP socket.
For the MODBUSCP block on the S7 side, the typical data exchange uses the following function codes:
- FC01 Read Coils
- FC02 Read Discrete Inputs
- FC03 Read Holding Registers (most common for process values)
- FC04 Read Input Registers
- FC05 Write Single Coil
- FC06 Write Single Register
- FC15 (0x0F) Write Multiple Coils
- FC16 (0x10) Write Multiple Registers
- FC23 (0x17) Read/Write Multiple Registers
Slave devices return an exception response (function code + 0x80) when an address range is invalid, the requested data length is unsupported, or the function code itself is not implemented. The MODBUSCP block surfaces these exceptions via status codes in the 16#A084 family.
Migration to Newer PCS7 Versions
If you are planning to upgrade the affected AS station from PCS7 V7.1 SP2 to V8.x or V9.x, the MODBUSCP block is superseded by the MODBUS_TCP block in the PCS7 APL (Advanced Process Library) or by the OpenModbus/TCP library from the Siemens Openness / OSS add-on catalog. The newer blocks:
- Support PROFINET-based CP firmware (CP 343-1 PN, CP 443-1 PN) with firmware ≥ V2.x.
- Use the new S7-1500 instruction model when the AS station is migrated to an ET 200SP CPU or a S7-1500 controller.
- Provide more granular status (16-bit extended status word) and integrated diagnostic interrupts.
When migrating, regenerate the charts in CFC, but still perform a full STOP/RUN restart after the first download. The OB100/cyclic-OB IDB consistency rule is enforced by the new blocks as well.
Field-Commissioning Checklist
- Verify the CP 343-1 / CP 443-1 firmware is at the latest revision supported by your PCS7 version (check the Siemens Industry Online Support SIOS portal for the compatibility matrix).
- In NetPro, create a Modbus/TCP connection from the AS to the partner (the slave IP). The connection type is "TCP connection" with the partner role set to Server (the S7 side acts as the Modbus client by default for
MODBUSCP). - Configure the block's
LADDRinput with the diagnostic address of the CP (visible in HW Config > CP properties > Diagnostics address). - Set
REMOTE_IPto the slave's IPv4 address and verify TCP port 502 is reachable (ping+telnet <ip> 502from the PG). - Download the program, STOP/RUN restart, and verify A080 is gone before walking away.
Troubleshooting Matrix
| Symptom | Likely Cause | Action |
|---|---|---|
| A080 after online download | CFC generated new IDB; OB100 instance stale | STOP → full download → RUN |
| A081 after restart | NetPro connection not compiled/downloaded | Compile and download connection configuration |
| A082 immediately | CP not in RUN or wrong IP | Check CP RUN LED; verify CP's IP in HW Config |
| A083 sporadic | Network latency or slave busy | Increase TIMEOUT, check network switch QoS |
| A084 from specific slave | Invalid register address or unsupported FC | Read slave manual, verify register map |
| A087 intermittent | TCP keepalive or firewall aging the socket | Enable TCP keepalive on the switch, verify firewall idle timeout |
| Block exists twice in offline view | STEP7 multi-instance + standalone IDB conflict | Delete the duplicate; ensure both OB calls use the same IDB |
FAQ
What does the A080 error from MODBUSCP mean in PCS7 V7.1 SP2?
A080 indicates that the MODBUSCP block was called with two different instance DBs — one in OB100 (warm restart) and a different one in the cyclic OB. The block detects the mismatch during initialization and refuses to open the Modbus/TCP connection.
Can I clear the A080 error without stopping the CPU?
No. Configuration in Run (CiR) is not permitted for the MODBUSCP block. You must take the CPU to STOP, perform a full program download, and execute a warm or cold restart to clear the condition.
Why does the A080 error appear only in CFC charts and not in plain STEP7?
Both editors are affected, but CFC automatically generates IDBs and re-assigns them on recompile, which is the most common trigger. In STEP7 you can manually ensure that the OB100 and OB1 calls both reference the same instance DB, making the mismatch less likely.
How much memory does a MODBUSCP instance require?
Each MODBUSCP instance requires approximately 8 KB of work memory and 9 KB of load memory, plus the per-call stack usage in OB1/OB35. On a CPU 315-2 PN/DP with 256 KB of work memory, plan for a maximum of 20-25 instances to leave headroom for the rest of the user program.
What is the default TCP port for Modbus/TCP and where is it configured?
Modbus/TCP uses IANA-registered TCP port 502. In the PCS7 project, the port is set on the Modbus/TCP connection properties in NetPro and on the slave device's configuration. The S7 side does not allow changing the client port; the destination port must be 502 unless the slave is explicitly configured for a non-standard port.
Is the MODBUSCP block still available in current PCS7 versions?
PCS7 V7.1 SP2 ships MODBUSCP. From PCS7 V8.1 onward, the block is superseded by MODBUS_TCP in the APL library or by the OpenModbus/TCP blocks. Always check the manual of your installed PCS7 version before reusing the older block name.