Troubleshooting
Why MB_CLIENT reports 16#80A3 on a valid Modbus TCP response
Short answer
STATUS 16#80A3 from MB_CLIENT is the block's own connection-level error, not a Modbus exception code, so a capture showing a valid FC03 response moves the whole diagnosis to the instruction side: the local connection identity in TCON_IP_v4, the MB_MODE value for the installed V6.0 block, and the destination buffer. Prove the gateway path with one PC client read, stop that client, then match one PLC transaction field by field.
On this page
- What does STATUS 16#80A3 mean in the MB_CLIENT instruction?
- Is 16#80A3 the same thing as Modbus exception 02, illegal data address?
- Why does the same register read work in Modbus Poll but not from the PLC?
- Which MB_MODE value sends which function code in the V6.0 MB_CLIENT?
- Does the connection identifier in TCON_IP_v4 matter for 16#80A3?
- Does 0-based versus 1-based addressing explain this failure?
- What is the fastest test sequence to separate a block fault from a gateway fault?
- Questions asked
MB_CLIENT finishes with ERROR and STATUS 16#80A3 because the block could not complete the transaction over its connection — the status is the block's own connection-level error, not a code the server sent. When the capture shows a normal FC03 response with the right transaction ID, byte count and register data, the gateway path is proven for that exchange and the search moves to the instruction side: which instance owns the connection in TCON_IP_v4, which function the installed V6.0 block really sends for the MB_MODE you set, and where MB_DATA_PTR points. The recorded case is a CPU 1512SP-1 PN (firmware V4.0) reading through an MGate MB3180 (firmware 2.6 Build 24061210, RTU Slave mode, Unit ID 10, TCP port 502), where PC clients read live values all day and every PLC read still ended at 16#80A3.
What does STATUS 16#80A3 mean in the MB_CLIENT instruction? #
Vendors document 16#80A3 in the connection-error range of the STATUS word: a general communication error around establishing or tearing down the connection, and Siemens' parameter documentation says it is reported only after the configured repeated connection attempts have run.
STATUS is an output the block sets when it ends a request; it is not a byte from the server. Every documented description of that status points at the connection layer — checking the connection to the Modbus server, an attempt to re-establish a connection that already exists, or a teardown of one that is gone — so the word says the block gave up over its connection after its retries, not that the device answered badly. The retries also set the timing: seconds of BUSY before ERROR is the retry window, while the capture shows the reply landing immediately.
Siemens Modbus instructions keep the wire and the status word separate, and the sibling fault where why MB_MASTER on an S7-1200 returns an error status but no data looks the same at the bench: a healthy line, a complaining instruction. Read the meaning of a STATUS value from the parameter documentation of the installed block version, never from an exception-code table.
Is 16#80A3 the same thing as Modbus exception 02, illegal data address? #
No — exception 02 is a reply the server puts on the wire, while 16#80A3 is set only inside the block's STATUS output; the capture in this fault holds a normal FC03 response with correct transaction ID, byte count and register data, so no exception frame exists to decode.
A normal FC03 response carries an MBAP header — transaction identifier, protocol identifier, length and unit identifier — followed by function 0x03, a byte count and the register values. Run the arithmetic on every capture: for an example request of 4 registers, the byte count field must read 2 bytes per register × 4 registers = 8, and the recorded capture showed a correct byte count with changing register values. Its transaction identifier and unit identifier matched the request. TCP is a byte stream, so judge the reassembled message rather than packet boundaries.
An exception reply looks different in every byte: the requested function with its high bit set, then an exception code where the data belongs. The recorded capture contains no such frame, so the illegal-data-address explanation fails for that exchange, and no amount of 0-based or 1-based re-addressing, fresh instance DBs or Unit ID changes can move a fault that is not on the wire.
Why does the same register read work in Modbus Poll but not from the PLC? #
The PC tools and the block are different requesters. A laptop client holds one TCP session open while it polls; MB_CLIENT builds its connection from its CONNECT structure and keeps it until DISCONNECT, so a test client left running sits beside the PLC as a second client. Compare the raw requests, not the screen values:
- the function byte on the wire (0x03 or 0x04), never the mode label in a watch table;
- the raw transmitted starting address, in the protocol's own numbering;
- the quantity, and the byte count the reply must carry (quantity × 2);
- the unit identifier — 10 (0x0A) for the serial device behind this gateway;
- the connection lifecycle: which client opened what, and when.
In the recorded tests, Modbus Poll and ModScan read changing values through the same gateway and the same RTU device, so the path, the device and the register map were proven for their requests. The open question was always narrower: what the block's own request said on the wire, and who owned the connection when it ran.
Which MB_MODE value sends which function code in the V6.0 MB_CLIENT? #
In the V6.0 block MB_MODE selects the function directly: MB_MODE = 0 is the combined FC23 read/write, MB_MODE = 1 reads holding registers with FC03, MB_MODE = 2 writes a single register with FC06, and MB_MODE = 3 writes multiple registers with FC16.
A watch table showing a mode value proves nothing about the wire; the transmitted function byte is the only evidence, and your capture supplies it. The test history mixed the modes: MB_MODE = 0 was set expecting the combined read/write, and MB_MODE = 3 was tried believing it produced FC03. In the documented mapping for the installed V6.0 block, MB_MODE = 3 writes multiple registers with FC16, so that configuration never requests holding registers, and the recorded attempts never asserted BUSY at all — a refusal at the parameter level, not a reply problem. At least one tested combination did put FC03 on the wire, and that is the exchange the capture proves, so hold the reference read at MB_MODE = 1 and keep the FC04 and FC23 experiments out of the baseline until one FC03 read closes. Mode mappings differ between instruction versions, so read them from the documentation of the installed block, not from memory.
Holding registers and input registers are different data areas with different function codes; FC03 and FC04 holding-versus-input register reference lays out which area each code reads. One warning belongs here: every mode that transmits a write — FC06, FC16 or FC23 — acts on the device the moment the connection completes, so keep write-mode tests off the live process until the read baseline is proven.
Does the connection identifier in TCON_IP_v4 matter for 16#80A3? #
Yes — TCON_IP_v4.ID names the PLC's local connection, the unit identifier selects the serial device behind the gateway, and the two are unrelated numbers; reusing or colliding on the local identity is exactly the connection state 16#80A3 reports.
The recorded tests confirm the split: Unit ID 10, 1 and 255 changed nothing, while moving the local connection ID from 10 to 1 changed the block's behavior — state transitions began to appear — without ever completing a read. That makes the local identity the priority check. One instance data block owns one connection, and a second instance aimed at the same server with a duplicated identity produces exactly the connection-state failures this status sits in; it is the same ownership conflict behind two MB_CLIENT instances stopping Modbus TCP reads from one server.
Treat the two numbers as independent settings: the local ID names the PLC side of the TCP connection, the unit identifier names the serial destination behind the gateway, and changing one never substitutes for configuring the other. After any parameter change, pulse DISCONNECT, let the block settle, and only then trigger the single test read.
Does 0-based versus 1-based addressing explain this failure? #
Not on its own — the device answered with data, so the address the PLC transmitted exists on the RTU device; keep the raw transmitted address in the comparison anyway, because printed labels and protocol addresses describe the same register with different numbers.
The Modbus convention behind the printed labels is fixed: the wire carries the 0-based offset, and the 40001-style reference adds the block offset on top. Worked example: a device sheet listing holding register 40111 refers to protocol address 40111 - 40001 = 110, transmitted as 0x006E in the request's starting-address field. guide to decoding 0-based and 1-based Modbus register addresses works through the conversions for every data area.
A base mistake leaves a signature: the reply carries data, but the values belong to a neighboring register, or the device answers with an exception. The captured exchange shows neither — the device answered the transmitted address with the values the PC clients saw — so the numbering conventions were not the active fault there, and re-testing both bases could not move a connection-level status. Keep the raw transmitted address in the comparison record anyway; it is the field that catches a base error the moment a different exchange starts failing.
What is the fastest test sequence to separate a block fault from a gateway fault? #
Freeze the configuration that already reaches the gateway, take one PC-client reference read, stop that client, then trigger a single PLC read and match the captured request and response field by field against the block's completion state.
- Write the baseline down once: CPU 1512SP-1 PN, firmware V4.0, MB_CLIENT V6.0, MGate MB3180, firmware 2.6 Build 24061210, RTU Slave mode, Unit ID 10, TCP port 502. Change one item per test.
- Capture one PC-client read of the target registers and keep its raw request and response as the reference transaction.
- Stop every PC client and phone app polling the gateway, and confirm the count of open sessions drops.
- Configure a single MB_CLIENT read at MB_MODE = 1 with MB_DATA_PTR on a non-optimized data block sized for the quantity.
- Pulse REQ once and log REQ, BUSY, DONE, ERROR and STATUS against the capture timeline.
- Match transaction identifier, unit identifier, function byte, starting address and quantity, and re-run the byte-count arithmetic (quantity × 2).
- Read the outcome against the decisions below.
| Test outcome | Where the fault sits | Decision |
|---|---|---|
| Normal FC03 response, then ERROR with 16#80A3 | Instruction side: connection identity and instance ownership | Give the instance its own TCON_IP_v4 parameters and ID, pulse DISCONNECT, rebuild, retest the single read |
| Exception frame on the wire | Device or register map | Recheck the transmitted address and quantity against the device map before touching the block |
| No reply | Gateway or network | Recheck the gateway address, TCP port 502 and the count of open client sessions |
| DONE with an unchanged buffer | Destination behind MB_DATA_PTR | Point MB_DATA_PTR at a non-optimized DB or M area sized to the quantity |
For the recorded case the decision lands in the first row: a valid FC03 response followed by 16#80A3 proves the gateway path and convicts the block's connection handling. The fix lives in the connection identity, the MB_MODE selection and the destination buffer — not in gateway firmware, and not in another round of address offsets.
Questions asked
How do I tell an on-wire Modbus exception from an instruction status word?
A Modbus exception travels on the wire: the reply repeats the requested function code with its high bit set, so a failed FC03 read comes back as function 0x83, followed by one exception-code byte in which 02 means illegal data address. 16#80A3 never appears in any frame; it is set only in the MB_CLIENT STATUS output when the block gives up over its connection.
Why does ERROR appear only after several seconds of BUSY?
The block reports this connection status only after its configured repeated connection attempts have all run, so the seconds of BUSY are the retry window, not a waiting-for-reply timeout. The capture separates the two: the gateway's response lands immediately, while the block's ERROR arrives after the retry cycle closes with 16#80A3.
Does one MB_CLIENT instance hold one TCP connection to the gateway permanently?
One instance keeps its connection to the gateway open until you set DISCONNECT, so a laptop client left polling holds a second session beside the PLC's. Close the test client before the controlled PLC test, and if two block instances must share one gateway, give each its own connection identity and instance data block, then stagger the requests.
Should I update the gateway firmware to clear this error?
Not first. A captured normal FC03 response proves the gateway translated and answered that request correctly, so the failure sits in how the block completes over its connection. Keep the installed firmware as the baseline, run the connection-identity and MB_MODE checks, and touch firmware only if a vendor bulletin names this exact pairing as fixed.