IMDHMIControls LibraryShop main store

Troubleshooting

Why S7-1500 Modbus_Comm_Load needs MODE 4 for RS485 two-wire

PLC programming Published 6 min read By IMDHMI controls team

Short answer

Set the MODE input of Modbus_Comm_Load to 4 for an RS485 two-wire circuit on an S7-1500 CM PtP. MODE 1 describes a full-duplex four-wire point-to-point circuit, so the load never completes: STATUS briefly shows 16#7001, falls back to 16#7000, DONE stays false and the master or slave block reports 16#8282. Code that ran with MODE 1 on an S7-1200 does not transfer that setting to the 1500 port.

On this page
  1. The three symptoms belong together
  2. MODE names the electrical circuit
  3. Change the value and run the load again
  4. When no module is still reported
  5. 16#81E2 is the character layer
  6. The decision for each wiring
  7. Questions asked

Set the MODE input of Modbus_Comm_Load to 4 when an S7-1500 CM PtP RS422/485 HF drives an RS485 two-wire pair. The value 1 that S7-1200 programs often carry describes a full-duplex four-wire circuit, and with a two-wire pair attached the load never completes: STATUS briefly shows 16#7001, falls back to 16#7000, DONE stays false, and the master or slave block reports 16#8282. The correction is one runtime value, not the device configuration and not the library version. Below: what each reading means, where to change the value, and why the framing error that remains afterwards belongs to a different layer.

The three symptoms belong together #

The reported installation: an S7-1511C-1 PN with a CM PtP RS422/485 HF at firmware 1.0.3, configured for two-wire at 9600 baud, with the four-wire value in the call. Hardware diagnostics showed the module fault-free, other instruction versions had been tried, and the same program ran on an S7-1200.

  • STATUS briefly 16#7001, then back to 16#7000: the configuration job started and the block returned to idle without a result. The processing state is too short for a watch table; copy the outputs in the program.
  • DONE never true: no successful configuration stands at the port. Nothing downstream can work until this changes.
  • The master or slave block reports 16#8282: the documented meaning is module not available, and the documented check is the PORT input plus the module's reachability. A green hardware diagnostic does not contradict this, because the Modbus block needs a port that a completed load has configured, and none exists.
  • The same code on an S7-1200 proves that installation's port, not this one. The 1500 port is only configured when MODE matches the attached circuit.

If the load never leaves the idle state at all, with no brief processing state from the first cycle, the request sequence is at fault instead; that case is covered in Modbus_Comm_Load on an S7-1500 CM PtP staying idle at 16#7000.

MODE names the electrical circuit #

MODE tells the Modbus firmware which physical circuit to drive, and the instruction documentation maps each value to one circuit. The two rows that matter here:

MODE Circuit
1 Full duplex, RS485 four-wire mode, point to point
4 Half duplex, RS485 two-wire mode

On a TIA-485 half-duplex network one differential pair carries both directions; the four-wire mode splits transmit and receive over two pairs. TIA-485 defines the signaling, not block parameters, so the match between wiring and MODE is yours to enforce: the device configuration of the CM records what is wired, but only the load block writes the operating mode into the port. With the four-wire value and a two-wire pair attached, the configuration job starts and returns without configuring anything, which is exactly the pattern above. The half-duplex row is the correction, and with it in place the reported port carried serial traffic for the first time. A program commissioned on an S7-1200 keeps whatever value its call carried; a working 1200 installation proves nothing about this port.

Change the value and run the load again #

  1. Open the Modbus_Comm_Load call and find its MODE input, either a constant at the call or a tag written earlier, depending on how the program was built. Set it to 4 for the two-wire circuit.
  2. Cross-reference that tag or constant: initialization must assign the value before the load is requested, and no later logic may overwrite it. A value that is correct in one place and rewritten in another reproduces the fault intermittently.
  3. Trigger the load request again and record the outcome.
  4. Program the application so that master or slave transactions are enabled only after the load block has reached DONE true once.
  5. Re-initializing the port interrupts any exchange running on it, so make the change while the connected device tolerates a communication pause.

When no module is still reported #

With the half-duplex value in place, one of two outcomes follows. If the load block reaches DONE true and the master or slave block still throws 16#8282, the documented remedy is the PORT input: compare the hardware identifier it carries with the identifier of the CM PtP in the compiled hardware configuration, in the rack and slot where the module actually sits. An identifier copied from another project points at a port that does not exist. If DONE never comes true, the fault is still at the load, in the value, the request sequence or a later overwrite, and no register address, baud rate or block version will move it. Do not tune anything downstream while this code stands.

16#81E2 is the character layer #

Once the port configures, the line carries traffic, and in the reported case a second fault surfaced: the receive error 16#81E2, documented as a telegram aborted because of a character-framing error. The receiver could not assemble a valid character, so the fault sits below Modbus and no register address is involved; the block alternated between its processing states and the framing abort without ever reaching DONE. The receive-side walk-through is in why an S7-1500 Modbus RTU master reports receive error 16#81E2.

Check, at both endpoints:

  • The complete frame as active values, not datasheet values: baud rate, data bits, parity, stop bits.
  • Pair polarity: A and B swapped at one end corrupts every character while the line still shows activity.
  • Termination and bias: terminate the pair at the two physical ends and hold the idle state with bias, or reflections produce framing errors.
  • Common reference: both ends need a signal common within the receiver's common-mode range; a floating reference shows up as intermittent framing.

One rule from the Modbus over Serial Line specification decides direction: a slave that receives a request with a framing error discards it and stays silent. So a master that 'receives garbage' is misframing the slave's reply on its own receiver, while a slave that never answers received a request it could not frame.

Character timing shows how little headroom a wrong rate leaves. At 9600 bit/s, a character of 1 start bit, 8 data bits, 1 parity bit and 1 stop bit is 11 bits, so one character lasts 11 / 9600 = 1.146 ms. The same specification caps the gap between characters at 1.5 character times, here 1.5 × 1.146 ms = 1.72 ms, and requires 3.5 character times of silence between telegrams, here 3.5 × 1.146 ms = 4.01 ms. If the far end transmits at 19200 bit/s, its character lasts 11 / 19200 = 0.573 ms; the 9600 receiver samples each bit at the wrong width, flags a framing error and aborts the telegram as 16#81E2. Above 19200 bit/s the specification fixes the two gaps at 1.75 ms and 0.75 ms instead of character multiples.

The decision for each wiring #

  • Two-wire pair on the CM PtP of an S7-1500: MODE 4 in the runtime call, and the load must reach DONE true once before any master or slave traffic.
  • Four-wire full-duplex point-to-point: MODE 1, with both pairs wired per the module's pin assignment.
  • RS232 or four-wire multipoint circuits: the remaining documented values of the same table; the principle holds, since MODE names the attached circuit.
  • Load completes and framing errors remain: fix the character layer, meaning active frame format, polarity, termination and common reference, before touching register addresses or function codes.
  • Idle status with DONE false: the load never succeeded; check the value, the request sequence and later writers. The module's diagnostics stay green through all of it.

Questions asked

Does the port configuration survive a CPU restart?

No. The configured state is not retentive: after every power-up the port is back at its default and the load must run again before the master or slave block can use it. Put the call where the startup path executes it, otherwise the same module-not-available error returns after every restart even though the wiring and the value are correct.

Can I hold the load request permanently true?

No. The request triggers the configuration job on a rising edge, and the block must keep being called while the job runs. A level that never drops to false produces one edge at the beginning and nothing afterwards, which looks like a block that ignores later corrections. Drop the request after DONE or ERROR and raise it again whenever the port must be reconfigured.

Reads work, writes fail, and the framing error shows in both directions. Is it a register problem?

Not yet. A telegram with a framing or checksum error is discarded before any address interpretation, so the slave never sees the register number. Clear the character layer first: the complete frame format at both ends, pair polarity, termination and the common reference. Only when both directions run clean and a write alone fails does the fault sit in the slave's register map, its function-code support or its write protection.

How do I capture the short-lived status in the program?

Copy STATUS, DONE and ERROR of the load block into its own set of static tags whenever one of them changes, and give the master or slave block a separate set. When both blocks share one monitoring location, the later result overwrites the earlier one and the load's history is lost; a watch table alone samples too slowly to catch the transient processing state.

Keep reading

  • Troubleshooting

    Modbus_Comm_Load on an S7-1500 CM PtP stays idle at 16#7000

    STATUS 16#7000 on Modbus_Comm_Load means the block is idle: it has not processed any request, so DONE and ERROR stay false. Check that the instruction executes on an active path with one fresh REQ edge, that PORT matches the CM PtP RS422/485 HF hardware identifier, and that the Modbus_Master instance DB is linked at MB_DB before polling.

    PLC programming

  • Troubleshooting

    Why MB_MASTER on an S7-1200 reports Modbus error 16#8188

    Error 16#8188 on an S7-1200 MB_MASTER is an operating-mode fault, not a serial link failure. Set MODE 1, DATA_ADDR 30001, a length of 32 and MB_ADDR 1 to read the slave's D000 through D01F block as input registers 30001 through 30032, and hold EN TRUE through the REQ pulse.

    PLC programming

  • Troubleshooting

    MB_CLIENT version change after TIA Portal V16 migration

    A TIA Portal V13 SP1 to V16 migration does not by itself change the drive; it changes which MB_CLIENT revision, CPU firmware and request data the project carries. Compare the instruction version in both archived projects, read the online CPU identity (the replacement CPU may be V4.4 or V4.5), test the older revision in a project copy, and capture one request to confirm address, quantity and word order before judging homing failures as drive faults.

    PLC programming