IMDHMIControls LibraryShop main store

Troubleshooting

Why a Modbus RTU read and write on one port drops VFD control

Industrial networks Published 7 min read

Short answer

A working Modbus RTU write proves only that the write request and its register are right. When adding a read to the same RS-485 port drops VFD control, the fault is almost always in the read path: an invalid read register, a timeout that overlaps the next transaction, or two requests colliding on one serial master. Keep the port mode that works, add one read at a time, and record the PLC timeout and error code for each.

On this page
  1. Keep the port mode that reaches every device
  2. What a read exposes that a write never tests
  3. One worked example: sizing the response timeout for a read
  4. Isolate the read that breaks the drive
  5. Serialize reads behind writes
  6. Verify over repeated cycles, not one pass
  7. The decision for each case
  8. Questions asked

When writes to a VFD over Modbus RTU work but the first read on the same RS-485 port drops control of the drive, the port mode and the write path are not your problem. Keep the port configured the way that lets every device answer, and troubleshoot the read: an invalid read register or function, a response timeout that fires while the slave is still replying, or overlapping transactions on one serial master. A correct write validates none of these, because a write and a read are separate transactions with separate response handling.

Keep the port mode that reaches every device #

On the reported installation, a temperature and humidity sensor, a valve controller and a damper controller share one RS-485 run with the VFD. Configuring the PLC port for the drive alone silences the other Modbus units, and a Modbus panel mode lets the frequency writes through. That decides the first point: leave the port in the mode that reaches all devices, because no documented alternative mode serves both groups at once. The fault lives in what you add, not in what already works.

Do not treat the successful frequency write as proof the network is sound. It proves the port's serial settings, the drive's slave address, and one write register are all correct. It says nothing about the read function code, the read register reference, the drive's response time to a read, or how the PLC master sequences one transaction after another.

What a read exposes that a write never tests #

A read request fails in ways a write cannot show you:

  • Wrong register or convention. The register may be readable in the drive's map but referenced with the wrong base (zero-based versus one-based) or the wrong function code, so the drive returns a Modbus exception instead of data.
  • Slow read response. A drive can answer a write quickly and take longer to assemble a read reply, especially for a multi-register block. If the master's response timeout is set near the write turnaround time, the read times out and the master may start the next transaction into the middle of the drive's reply.
  • Overlapping transactions. If the PLC logic issues the write and the read concurrently instead of serially, two requests land on the same RS-485 pair and both fail.
  • Bus loading under traffic. A marginal termination or bias problem can survive short write frames and show up on the longer read-reply frames that dominate traffic once polling starts.

The Modbus RTU framing itself only modifies the function code and returns an exception when a slave rejects a request, so an exception response is a gift: it proves the electrical path and tells you which request the drive refused.

One worked example: sizing the response timeout for a read #

Heading case: setting the master response timeout for a four-register frequency-and-status read at 19.2 kbaud.

Inputs. Baud rate 19200 bit/s, the port setting that already carries the writes. Character frame 11 bits (8 data, even parity, 1 stop), the RTU framing with parity. Response frame: slave address, function, byte count, 8 data bytes and the 2-byte CRC, that is 13 bytes or 143 bits. The read request itself is 8 bytes, 88 bits.

Rule in words. The timeout must exceed the wire time of the longest expected reply plus the slave's internal processing time and the bus turnaround, so the master never transmits while the drive is still driving the pair.

Arithmetic.

  • Request wire time: 88 bits divided by 19200 bit/s equals 4.58 ms.
  • Reply wire time: 143 bits divided by 19200 bit/s equals 7.45 ms.
  • RTU inter-frame silence of 3.5 characters: 3.5 times 11 bits divided by 19200 bit/s equals 2.00 ms.
  • Wire total: 4.58 plus 7.45 plus 2.00 equals 14.03 ms.
  • Processing margin, ten times the reply wire time: 10 times 7.45 ms equals 74.5 ms.
  • Set the master response timeout to 100 ms as the example value; round up from the 89 ms sum of wire time and margin.

Result and decision. With a 100 ms timeout, a drive that answers within roughly 80 ms of processing time still completes the read cleanly. If the read still times out at 100 ms, the drive's own documented response time for that register block is the next number to check, and the timeout goes above it; if the timeout never fires but control still drops, move to the transaction-sequence checks below.

Isolate the read that breaks the drive #

Work one transaction at a time and write down what the PLC reports for each step:

  1. Back up the current PLC communication configuration, including the working frequency write.
  2. With the write untouched, read one documented register from a non-drive device, for example the sensor's humidity register. Record the slave address, register reference, response and any PLC error code.
  3. If that read passes, add a read of one documented readable register on the VFD, confirmed against the drive's register map, its read function and its data representation. Record the same details.
  4. Restore the normal sequence after each pass, then add the remaining reads one by one, keeping every transaction strictly serialized on the port.
  5. When a read fails, remove only that request, confirm the write-only sequence recovers, and correct the failing request using the PLC's timeout and error diagnostics before reintroducing it.

The first read that reproduces the failure names the fault: an exception code points at the register or function; a timeout points at response timing; a drop only when read and write run together points at overlapping transactions in the PLC logic.

Serialize reads behind writes #

One serial RTU master owns the bus: it sends a request, waits for the reply or the timeout, then sends the next request. If your PLC project lets communication blocks run conditionally or in parallel tasks, a read block can fire while the write block is still waiting for its reply, and the collision reads as lost control of the drive. Gate the read on completion of the write, and the write on completion of the read, in one task. This is the same discipline that slows polling when one master serves many drives, and the same fix applies: one queue, one outstanding request, no overlap. If a failed read would otherwise hold your control sequence indefinitely, use the PLC's communication error handling to fall back to a defined control state instead of waiting on the port.

Verify over repeated cycles, not one pass #

Run the normal sequence many times with reads and writes enabled and check four things: the VFD read returns the documented value without an error, the drive keeps accepting frequency writes after each read, the valve, damper and sensor stay reachable, and the PLC diagnostics show no recurring timeout. A single clean cycle proves little, because a timeout that fires on every tenth transaction still degrades control. Watch the diagnostic counters while the sequence runs and compare their timing against the configured timeout. When you later want the same values available to an operator station, let the PLC serve them upward rather than adding a second polling master to the serial pair.

The decision for each case #

  • Port mode: keep the panel or generic Modbus mode that reaches all devices; do not switch to a drive-dedicated port mode that silences the rest.
  • Timeout fires on the drive read: raise the master response timeout above the drive's documented read response time, as in the worked example, and retest the full sequence.
  • Modbus exception returned: the wiring is fine; correct the register reference, address convention or function code from the drive's register map.
  • Failure only when read and write run together: serialize the transactions in one PLC task so a reply is never overtaken by the next request.
  • Timeouts on reads from every slave: suspect the electrical side, termination and biasing, not the requests.

A final safety note: while a communication fault can leave a drive in an undefined state, give the PLC logic a defined fallback, such as a commanded stop or a held last-safe frequency, on communication loss, and verify that fallback works before resuming production.

Questions asked

Can two Modbus masters share one RS-485 slave port?

No. The Modbus specification defines one client per serial link, because only one transmitter may drive the RS-485 pair at any moment. If a second master must reach the same slaves, put a gateway between them and let the gateway own the serial side, or move one master onto the Ethernet side of that gateway.

What timeout should I set on a Modbus RTU master that also writes?

Set it longer than the slowest slave's worst-case response time, then add margin for turnaround. A common starting point is ten times the response frame time at your baud rate, then adjust upward until no spurious timeouts appear, because a timeout that fires early makes the master transmit while the slave is still replying.

How do I tell a bad read register from a wiring fault?

Watch the exception and status codes. If the drive answers with a Modbus exception or a data value that is present but wrong, the wiring is fine and the request configuration is at fault. If the master only ever reports a response timeout, and the same timeout appears on reads from every slave, look at the electrical side and termination instead.

Should reads of drive frequency go through the PLC or straight to SCADA?

Run them through the PLC. A second master polling the drive directly on the same RS-485 pair will collide with the PLC's transactions, and the failure will look exactly like the read-induced control loss described here. Let the PLC poll the drive and expose the values to SCADA over the network protocol the PLC already serves.

Keep reading

  • How-to

    Driving a WAGO 750-653 Modbus RTU module from CODESYS

    On a CODESYS Control Win V3 soft PLC, WagoAppPlcModbus cannot reach a 750-653 behind a 750-354 EtherCAT coupler, because those blocks need WAGO controller firmware. Drive the module's raw process image yourself: set the serial parameters, move each fragment with the control/status byte toggle handshake, and frame the Modbus RTU request and response in your task. Each fragment costs at least two task cycles, so a full transaction takes ten cycles or more.

    Industrial networks

  • How-to

    How a PLC runs two Modbus networks at the same time

    Yes. Each serial port is its own independent link: the HMI polls the PLC on one port while the PLC acts as master, or slave, on a separate RS-485 Modbus RTU network. The two links share no settings — only their endpoints must match — and PLC copy logic moves any data between them.

    Industrial networks

  • Troubleshooting

    Why a CJ2M Modbus RTU master gets no answer from an S7-1200

    Yes, a CJ2M can poll an S7-1200 over Modbus RTU. The simulators proved each PLC's serial settings, not the cable or the port mode between them: set the Omron port to the mode the MRTU_CPU_Master package requires, bring the send pair onto RDA and RDB for 2-wire operation, load the S7-1200 port at even parity, and confirm the frame on the wire with a known value.

    Industrial networks