IMDHMIControls LibraryShop main store

Troubleshooting

Why MB_CLIENT returns Modbus TCP error 8383 on multi-register reads

Industrial networks Published 5 min read

Short answer

An S7-1500 MB_CLIENT that reads one register but returns error 8383 on a multi-register read has a configuration fault in the call itself, not a TIA Portal version problem. Verify Mode, MB_DATA_ADDR, MB_DATA_LEN, the receive buffer and the CONNECT system data type online, and confirm the server exposes every register in the requested span.

On this page
  1. What status 8383 means on this call
  2. Read the executed call online
  3. Worked example: a 100-register read from 40001 with LEN = 100
  4. Tell an address problem from a length problem
  5. The decision for each case
  6. Questions asked

An S7-1500 MB_CLIENT call that reads one register but ends with status 8383 on a multi-register read is reporting a fault in the call as executed, not a TIA Portal version problem: the same status follows the project from one version to another. The things to verify online are Mode, MB_DATA_ADDR, MB_DATA_LEN, the receive buffer behind MB_DATA_PTR and the system data type of the CONNECT tag, plus the register map on the server. Work through them in order and change one at a time.

What status 8383 means on this call #

8383 is a diagnostic the MB_CLIENT block reports when it finishes the request; it is not a Modbus exception returned by the server. That distinction matters here, because the symptom already proves the path works: a single register reads, so the connection, the routing and the server are alive. What fails is the request itself — the quantity, the buffer or the span exposed on the server.

The same pattern shows up on other Siemens Modbus clients: an S7-1200 MB_MASTER returns an error status but no data for reasons that live in the call, not on the wire. Before decoding the status, record which block revision is executing: expand the MB_CLIENT entry in the TIA Portal instruction pane and read the version shown there, then use the status help of that same revision, because statuses and their meanings belong to a block revision.

One caution: test reads and writes against a live server change its process data with every transaction, so agree the diagnostic window with whoever owns the line before you run repeated calls at it.

Read the executed call online #

Check these at the executing call, online, not on the tag declarations:

  • Mode. MB_MODE = 0 selects a holding-register read. Any other value addresses a different data area, and the comparison against the PC test tool stops being valid.
  • Address. MB_DATA_ADDR = 40001 selects the first holding register, which the block maps to protocol offset 0 in the transmitted request. Entering 1 addresses a different area entirely and is not an equivalent.
  • Length. Watch MB_DATA_LEN at the call itself while the program runs: it must read 100 at the moment of the request, with no other logic writing over the input.
  • Buffer. Follow MB_DATA_PTR to its destination and check the array bounds: the area must hold at least LEN words, in a global DB with non-optimized access or in M memory.
  • Connection. The CONNECT tag must be typed as the system data type the block revision requires — for an IPv4 connection that is a type such as TCON_IP_v4 — not a hand-built structure that only resembles one. Compare its fields with the server's documented endpoint.

Worked example: a 100-register read from 40001 with LEN = 100 #

The inputs come from the call under diagnosis and the machine's register documentation:

  • MB_MODE = 0, a holding-register read.
  • MB_DATA_ADDR = 40001, the first register in the machine's documented map.
  • MB_DATA_LEN = 100, the requested quantity.
  • A holding register is one 16-bit word, the unit the protocol transfers.

The rule in words: the receive area behind MB_DATA_PTR must hold at least one word per requested register, which is two bytes per register.

The arithmetic: 100 registers × 2 bytes per register = 200 bytes, so the destination array must be at least 100 WORD elements long. A correct read response to this request carries the same payload: 100 registers × 2 bytes = 200 data bytes.

The result: the request transmits function 3, starting offset 0 (register 40001), quantity 100, and the destination needs a 100-word array.

The decision: size the buffer to LEN words — an array shorter than 200 bytes cannot accept this answer, so enlarge it to the full 100 words or cut MB_DATA_LEN to half the buffer's byte count (a 50-word array supports LEN = 50). If the buffer already meets the size and the length is correct online, move the search to the server's register map.

Tell an address problem from a length problem #

A test tool reading the documented start proves only that the tool's own request works. Record what the tool actually transmits — function, offset and quantity — because a successful single-register read says nothing about a hundred-register span. Then split the difference on the PLC side:

The decision for each case #

  • MB_DATA_LEN does not hold its set value online: logic overwrites the input. Fix the assignment and the multi-register read follows.
  • The receive array is shorter than LEN words: enlarge it or reduce MB_DATA_LEN to match. The worked example above gives the arithmetic.
  • The CONNECT tag is a lookalike structure: retype it with the system data type the block revision requires, such as TCON_IP_v4 for IPv4, and fill the endpoint fields from the server's documentation.
  • Partial reads succeed and the full span fails with the buffer correct: the server's map ends inside the span. Split the reads at the gap.
  • You changed MB_DATA_ADDR to 1 to get any data at all: restore 40001. That value addresses a different Modbus area, so it is not a workaround — the one-register-at-a-time behavior it shows is a different data area, not a partial success.

The version gap between the machine project and your V15.1 station stays a compatibility checkpoint, not the diagnosis: record the executing block revision from the instruction pane and read that revision's status help for 8383 while you make one change at a time.

Questions asked

How many holding registers can one Modbus TCP read request carry?

The Modbus protocol limits a single read of holding or input registers to 125 registers. MB_DATA_LEN above 125 asks the server for more than one response can carry, so it fails even when the receive buffer is large enough and the map is contiguous. Split a longer span into sequential reads that change MB_DATA_ADDR and MB_DATA_LEN between calls.

Where can the MB_CLIENT receive buffer live?

The documented options are a global DB with non-optimized access or M memory. The buffer must be standard-access, because the block writes into it through a pointer, and an optimized DB has no fixed absolute layout. Size it to the requested quantity: LEN words, two bytes per register.

Why does address 1 return data when 40001 returns error 8383?

With MB_MODE set to a register read, MB_DATA_ADDR selects the data area as well as the start. A value of 1 addresses a different Modbus area than 40001, so any data returned from it says nothing about the holding-register span. Keep 40001 and fix the length, buffer or map instead of moving the start address.

Is the difference between TIA Portal V20 and V15.1 the cause?

No. A version gap between the project that runs the server and the station you engineer the client in is a compatibility checkpoint for opening projects, not a diagnosis for 8383. The status reports the call as executed, and that call runs from your compiled block revision. Record the revision from the instruction pane and read its status help before blaming versions.

Keep reading

  • How-to

    Set up a CLICK Plus as Modbus TCP client to an S7-1200

    Yes: make the S7-1200 the Modbus TCP server with MB_SERVER mapped to a data block of INTs, and make the CLICK Plus the client with Send and Receive instructions aimed at the CPU's IP address and port 502. Write the shared register map first; the S7 logic copies physical inputs into it and applies its output words to the real outputs.

    Industrial networks

  • Troubleshooting

    Why two MB_CLIENT instances stop Modbus TCP reads from one server

    Two MB_CLIENT instances each keep their own TCP session to the server, and the FX5U side stops answering when both are enabled. Decode 16#80C5 and 16#80C6 from the working single-instance setup, then read both register groups through one instance with a request sequencer.

    Industrial networks

  • Explainer

    Can a Modbus write change PLC outputs?

    Yes, but not by outrunning the scan. On a Modicon CPU the communication interface reaches data memory only between scans, so a write is applied whole and the next scan either consumes it or overwrites it. The real exposure is that Modbus TCP authenticates nothing: any host that can reach the CPU can write an unprotected holding register your logic unpacks into outputs, so pack status into read-only words, keep commands in a separate writable range, and enforce write protection with an IP access control list.

    Industrial networks