1. Symptom Summary
The symptom is misleading. The PLC reports MB_MASTER.DONE = TRUE with no error code, the V20 raises no fault or warning, the diagnostic counter r2024 increments on every poll, and the MB_MASTER background DB shows STATUS = 0 (no Modbus exception) — yet the target setpoint never deviates from 0 Hz. The PLC is transmitting valid Modbus frames and the V20 is acknowledging them. The problem is not transport; it is what those frames are telling the drive to do, or how the drive is configured to interpret them.
Failure signature on a 16-drive Modbus RTU network with a SIMATIC S7-1200 CPU 1214C and a CB 1241 RS485 communication board:
-
MB_MASTER.DONEpulses high;MB_MASTER.ERRORstays low. - V20 parameter r2024 (RS485 valid-telegram count) increments — the V20 is receiving the message.
- V20 parameter r2025 (RS485 invalid-telegram count) stays at 0 — there is no framing or CRC error.
- Register 40101 (main setpoint, HSW) appears to accept the write but the motor reference stays at 0 Hz.
- In some configurations, drives 1 and 2 respond while drives 3–16 do not (collisions or address duplication).
- A first-scan restart routine that writes a non-zero control word to 40100 with bit 10 set "fixes" the problem on every subsequent cycle — confirming the drive is not in Modbus-control authority when the user expects it to be.
2. Root Cause Matrix
The following failure modes all produce the "DONE but no change" signature. Diagnose from top to bottom — items 1–3 account for roughly 80 % of field calls on this exact symptom.
| # | Cause | Detection | Resolution |
|---|---|---|---|
| 1 | MB_MASTER MODE = 0 (Read only) on a write call | Inspect MODE input on each MB_MASTER instance in TIA Portal | Use MODE = 1 (FC 06 write single register) or MODE = 2 (FC 16 write multiple registers) for holding-register writes |
| 2 | Control word bit 10 ("Control from PLC") not asserted | Read 40100 back via MB_MASTER, compare with what was written | Write CW = 0x047F (1151 dec) — bits 0, 1, 2, 3, 4, 5, 6, 10 set |
| 3 | V20 P0700 ≠ 5 (drive not taking commands from RS485) | Read P0700 from V20 BOP or read r0700 via Modbus | Set P0700 = 5; press green OK key for 5 s to save |
| 4 | V20 P1000 ≠ 5 (setpoint not coming from RS485) | Read P1000 from V20 BOP or read r1000 via Modbus | Set P1000 = 5 |
| 5 | Address base mismatch (1-based V20 vs 0-based master) | Read 40100 back after writing 12345 | Adjust MB_ADDR by ±1; V20 is 1-based and S7-1200 MB_MASTER in the 4xxxx range is also 1-based — they line up directly |
| 6 | Missing MB_COMM_LOAD for the port | Search project for MB_COMM_LOAD; must be present once per physical port | Add MB_COMM_LOAD to OB100 (startup) or first-scan flag for the CM 1241 / CB 1241 |
| 7 | Shared MB_MASTER_DB across multiple calls | Multiple MB_MASTER instances pointing at the same instance DB | Give every MB_MASTER call its own background DB; the instruction manages internal state in the DB and must not be aliased |
| 8 | V20 in Hand (local) mode | Check the BOP — "Hand" icon visible in the status row | Press the Auto/Hand toggle key on the BOP until "Auto" is shown |
| 9 | REQ trigger bit b_Triggers[] used on multiple rungs | Cross-reference the boolean in TIA Portal | Use a unique trigger per call, or sequence the pulses so REQ is never high on two calls simultaneously |
| 10 | Inter-token delay too short for the V20 RS485 turnaround | Reduce baud to 9600 and lengthen the delay; observe r2025 | Insert ≥ 10 ms of quiet time between token releases; 50 ms is the safe default |
| 11 | Two or more drives share the same P2021 Modbus address | Read P2021 from each drive; one per drive, unique | Reprogram each V20 with a unique slave ID |
| 12 | Bus not terminated / A–B polarity reversed | r2025 increments, especially under electrical noise | Place 120 Ω across A–B at both physical ends of the trunk; verify A→P, B→N on every drop |
3. Required V20 Parameterization for Modbus Control
Before any Modbus write is meaningful, the V20 must be told to accept commands and setpoints from the RS485 bus. Set these parameters on every drive (via BOP, IOP, or a startup wizard) and save by holding the green OK button for approximately 5 s. P0003 controls parameter access level (0 = read-only, 3 = expert). Set P0003 = 3 to allow edits.
| Param | Value | Meaning | Common Mistake |
|---|---|---|---|
| P0700 | 5 | Command source = RS485 / Modbus | Leaving P0700 = 1 (BOP) means the V20 ignores every value written to 40100 — but still increments r2024 |
| P1000 | 5 | Frequency setpoint = RS485 / Modbus | Default 1 (MOP / motor potentiometer) routes 40101 to the up/down keys, not the ramp generator |
| P2020 | 6 (9600), 7 (19200), 8 (38400), 9 (57600), 10 (76800), 11 (115200) | RS485 baud rate in bit/s | V20 and CB 1241 must match exactly; a baud mismatch looks like an addressing bug |
| P2021 | 1–247, unique per drive | Modbus slave address | Two drives with the same address collide silently — the bus is busy but the wrong device answers |
| P2022 | 0 (no timeout) or ≥ token cycle | RS485 comm-loss timeout in ms | Default 1000 ms — if your 16-drive token ring is slower than 1 s, set P2022 = 0 to disable the watchdog |
| P2023 | 2 | Protocol selection: 1 = USS, 2 = Modbus RTU | USS frames on a Modbus-configured drive are silently dropped |
| P2000 | 50.00 (default) or motor nameplate Hz | Reference frequency for HSW scaling | Mismatched P2000 across the 16 drives makes the same HSW value produce different motor speeds |
| P2024[0] | read-only | Valid-telegram counter (diagnostic) | Clear by writing 0; read back via r2024 |
| P2025[0] | read-only | Invalid-telegram counter (diagnostic) | Any non-zero value indicates noise, baud mismatch, or A/B swap |
DONE=TRUE, r2024 increments, r2025 stays at 0), but discards the payload. The drive is being polite, not compliant. This is the most expensive trap because every diagnostic reading says "communication is fine."Reference the official SINAMICS V20 product page for the full parameter list, and consult the V20 operating instructions in Siemens Industry Online Support (search "SINAMICS V20 operating instructions" for the current document ID matching your firmware).
4. V20 Modbus Register Map
The V20 uses 1-based Modbus addressing for the documented register names. The first holding register is 40001, so register "40100" in the manual means the 100th holding register. The most relevant registers for a standard start/stop + setpoint application:
| Address | Name | R/W | Width | Scaling |
|---|---|---|---|---|
| 40100 | STW — Control Word | R/W | 1 word | Bit-mapped (see §5) |
| 40101 | HSW — Main Setpoint | R/W | 1 word | 0x4000 (16384) = 100 % of P2000; 0x0000 = 0 %; values > 0x4000 are forward (above P2000), < 0x4000 reverse |
| 40102–40119 | Reserved / extended setpoints | R/W | 1 word each | Same scaling as 40101 |
| 40200 | ZSW — Status Word | R | 1 word | Bit-mapped |
| 40201 | HIW — Actual Frequency | R | 1 word | Same scaling as 40101 |
| 40202 | Actual current | R | 1 word | 0.1 A / LSB on 400 V class; 0.01 A on 230 V class — verify in your drive's datasheet |
| 40300–40399 | Parameter access (P0001–r3999) | R/W | 1 word | Index shifted; the V20 maps parameter index N to holding register 40300 + (N – 1) on read, 40400 + (N – 1) on write. See the V20 manual section "Parameter access via Modbus" for the exact offset table |
HSW scaling formula: HSW_value = round(target_Hz × 16384 / P2000). With P2000 = 50 Hz, 30 Hz → HSW = round(30 × 327.68) = 9830 (0x2666). With P2000 = 60 Hz, 30 Hz → HSW = 8192 (0x2000).
5. Control Word Structure (Register 40100)
Writing 0 to 40100 means "OFF1" — the drive immediately commands the inverter to ramp down and inhibit pulses. Writing any value with bit 10 clear is interpreted as "no PLC control" and the drive ignores the rest of the bits; the V20 falls back to whatever its P0700 fallback is (terminals, BOP, etc.).
The minimum useful control word for a forward run is 0x047F (1151 decimal). Reverse run is 0x0C7F (3199 decimal). Coast stop (OFF2 active) is 0x047C. Quick stop (OFF3 active) is 0x047D. Run released, Modbus authority held, is 0x047E.
| Bit | Name | Value = 1 | Value = 0 |
|---|---|---|---|
| 0 | ON / OFF1 | Run (ramp to setpoint) | Ramp down to 0 then inhibit pulses |
| 1 | OFF2 | Permit run | Coast to stop (immediate pulse inhibit) |
| 2 | OFF3 | Permit run | Quick stop (P1135 ramp) |
| 3 | Pulse enable | Enable inverter IGBTs | Inhibit IGBTs |
| 4 | RFG enable | Enable ramp-function generator | Freeze RFG output |
| 5 | RFG start | Release ramp output | Hold ramp at 0 |
| 6 | Setpoint enable | Apply HSW to RFG input | Force RFG input to 0 |
| 7 | Fault acknowledge | 0→1 rising edge clears a latched fault | — |
| 8 | JOG right | Jog forward (P1058 freq) | — |
| 9 | JOG left | Jog reverse (P1059 freq) | — |
| 10 | Control from PLC | Modbus has command authority | Local / BOP / terminals have authority |
| 11 | Reverse | Negative setpoint polarity | Positive polarity |
| 12 | Reserved | — | — |
| 13 | MOP up | Raise motor potentiometer | — |
| 14 | MOP down | Lower motor potentiometer | — |
| 15 | Reserved | — | — |
Decoded constants for the most common states:
-
0x047E = 1150— Ready, OFF1 released, PLC authority, ON not yet asserted. -
0x047F = 1151— Run forward, 0 Hz default setpoint (CW only, no HSW change yet). -
0x0C7F = 3199— Run reverse (adds bit 11). -
0x047C = 1148— Coast stop (OFF2 clear). -
0x047D = 1149— Quick stop (OFF3 clear). -
0x0480 = 1152— Setpoint enable cleared (bit 6 = 0); useful for jogging-style HSW injection.
6. MB_MASTER Configuration
The MB_MASTER instruction (S7-1200, library "MODBUS" from TIA Portal V13+, renamed to Modbus_Master in V15+) is the workhorse. The MODE input selects the Modbus function code:
| MODE | Modbus FC | Use |
|---|---|---|
| 0 | FC 03 (read holding) or FC 04 (read input) | Read — never writes to the drive |
| 1 | FC 05 (write single coil) or FC 06 (write single register) | Write one coil (0xxxx) or one holding register (4xxxx) depending on MB_ADDR range |
| 2 | FC 16 (write multiple registers) | Write a contiguous block of holding registers (4xxxx) |
Symptom trap: in the original program shown in the thread, every MB_MASTER instance had MODE = 0. Mode 0 is a read; the request to write is silently reinterpreted as a read, the V20 answers with the current register value, and the PLC sees DONE=TRUE with no error. This is the single most common cause of "DONE but no change" on S7-1200 Modbus and explains why the user could not find a fault — there was no fault, the drive was just answering a different question than the user thought.
For the user's pattern (one register at a time, two writes per drive) the SCL call looks like:
// SCL example for 40100 control word write (one V20)
"MB_MASTER_DB"(REQ := b_Trigger_CW[DriveNo],
MB_ADDR := 100, // V20 register 40100, 1-based
MODE := 1, // FC 06 single register write
DATA_ADDR := 0, // unused for FC 06
DATA_LEN := 1,
DATA_PTR := pCW[DriveNo],
DONE => b_Done_CW[DriveNo],
BUSY => b_Busy_CW[DriveNo],
ERROR => b_Err_CW[DriveNo],
STATUS => w_Stat_CW[DriveNo]);
For an FC 16 (MODE = 2) multi-register write that updates both the control word and setpoint in one frame, fill a 2-word buffer and set DATA_LEN := 2:
// Build a 2-word block: [CW, HSW]
wBlock[0] := wCW[DriveNo]; // 40100
wBlock[1] := wHSW[DriveNo]; // 40101
"MB_MASTER_DB"(REQ := b_Trigger_CW_HSW[DriveNo],
MB_ADDR := 100, // start at 40100
MODE := 2, // FC 16 write multiple registers
DATA_PTR := pBlock[DriveNo],
DATA_LEN := 2,
DONE => b_Done_CW_HSW[DriveNo],
ERROR => b_Err_CW_HSW[DriveNo],
STATUS => w_Stat_CW_HSW[DriveNo]);
MB_ADDR offset rule (S7-1200): when MB_ADDR is in the 4xxxx range, the leading "4" is stripped and the remaining value is treated as 1-based. So MB_ADDR = 100 addresses V20 register 40100, not 40099 and not 40101. Do not subtract 1. Do not add 40001.
Pre-requisite — MB_COMM_LOAD: the matching MB_COMM_LOAD instruction must be called exactly once for the physical port, on the first scan, with the baud rate, parity, and flow-control values that match the V20. Without it, MB_MASTER never executes its request and reports DONE immediately. Place it in OB100 (startup) or guard it with a first-scan flag. Reference: S7-1200 Modbus RTU communication manual in Siemens Industry Online Support.
7. Addressing: 0-Based vs 1-Based
The Modbus specification does not define register numbering — every vendor chooses. The Siemens V20 uses 1-based for the documented register names (40100, 40101). The S7-1200 MB_MASTER also interprets MB_ADDR in the 4xxxx range as 1-based, so they line up directly. The mismatch only appears when:
- A third-party master that is 0-based is talking to the V20 (e.g. some Beckhoff, Schneider, or SCADA drivers). In that case the third-party master should be told the V20 register is 40100, not 100.
- The SCL/PLC code wrote
MB_ADDR := 99thinking it would map to the 100th register. On the V20 that is actually register 40099 (which is documented as reserved). The V20 echoes 0x0000, the PLC sees DONE, and the application "loses" one register of offset for the rest of the project's life.
Quick verification: write the value 12345 (0x3039) to register 40100 and immediately read it back with MODE = 0, MB_ADDR = 100. If you get 12345, addressing is correct. If you get 0 or a previous value, the offset is off by one and the master is treating the V20 as 0-based.
8. Token Ring Polling Architecture
With 16 drives on a single RS485 bus, a single PLC program must police the bus. Two viable patterns:
Pattern A — Time-division token ring (recommended for 16+ drives):
- Each drive gets a 50–100 ms time slot.
- Within its slot, the PLC writes the control word (or the CW+HSW block), waits for DONE, then moves on.
- A 10–20 ms inter-slot delay (V20 RS485 transceiver direction-change time plus V20 protocol turnaround) prevents frame collisions when the next device answers.
- Total cycle: 16 × 50 ms = 800 ms minimum. Set P2022 above this value (or to 0) to avoid spurious comm-loss faults.
Pattern B — Event-driven write on change:
- Track last written CW and HSW per drive.
- Issue a write only when the value changes or on a heartbeat (every 5 s, configurable).
- Read status / actual speed continuously at a slower rate (250–500 ms).
Pattern A is what the user implemented. The original bug was that every token carried a read request (MODE = 0), so even the drives that "worked" (1 and 2) were merely being polled for status, not actually being commanded to a new speed. The frequency "change" the operator saw was the BOP being touched, or the V20's local-mode fallback being interpreted elsewhere.
Bus timing budget at 9600 baud, 11 bits/char (1 start + 8 data + 1 parity + 1 stop), 8-byte typical request, 7-byte typical response:
Per transaction: 8 (request) + 3 (silence, 3.5 chars) + 7 (response) + 3 (silence)
= 21 chars * 11 bits / 9600 bit/s
= 24 ms per round trip
16 drives: = 384 ms minimum cycle
+ 16 * 10 ms inter-token: 544 ms total (1.8 Hz update rate per drive)
+ 16 * 30 ms HSW/CW settle: 864 ms total (1.2 Hz update rate per drive)
At 19200 baud the transaction time halves to 12 ms; at 38400 it drops to 6 ms. The trade-off is shorter maximum cable length and tighter noise immunity — Siemens V20 supports baud rates up to 115200 on shielded twisted pair, but practical installations rarely exceed 38400 in electrically noisy panels.
9. The Required Initialization Sequence
Why does a "first-scan restart routine" fix the problem? Because the V20 latches command authority on a 0→1 transition of bit 10 ("Control from PLC"). If the PLC starts up with the bus already streaming requests, the V20 may receive its first control word with bit 10 = 0 and quietly enter "no remote authority" mode for the rest of the session. There is no fault; the drive is just being safe. Reasserting bit 10 with the restart routine forces a fresh 0→1 edge, and the drive takes Modbus authority from that point on.
The canonical first-scan sequence on each drive, executed in token order with the inter-token delay between drives:
- Wait 500 ms after PLC startup to allow all 16 V20s to finish their own boot (the V20 takes ~250 ms to come ready on the BOP).
- Write CW = 0x047E (1150) — clears OFF2/OFF3, sets bit 10, but no ON yet.
- Wait 100 ms.
- Write HSW = 0x0000 (0 Hz).
- Wait 100 ms.
- Write CW = 0x047F (1151) — ON, ready to ramp.
- Write HSW = setpoint × 163.84 / P2000 (e.g. 30 Hz @ P2000 = 50 → 9830 = 0x2666).
Implement this as a state machine on each drive's first-scan handler (or as a one-shot sequence per drive during commissioning) so the bus does not get a burst of 16 simultaneous 0x047F writes. Sequence the writes with the same token ring used for steady-state updates.
Edge case: if any drive is in fault state at startup (red LED on the V20), bit 7 must be toggled (0→1) on the control word to clear it. The V20 will respond with status word bit 3 = 0 (no fault present) only after the edge is acknowledged. Allow up to 200 ms for fault clearance to propagate through the V20's internal state machine.
10. Verification & Diagnostics
After the fix, validate the link with the V20's built-in counters and the S7-1200's MB_MASTER STATUS output.
| Register / Param | Meaning | Expected Behavior |
|---|---|---|
| r2024[0] | Valid telegrams received by V20 | Increments on every MB_MASTER call that succeeds |
| r2025[0] | Invalid telegrams (CRC, framing, overrun) | Must stay at 0; rising values indicate noise, baud mismatch, or A/B swap |
| r2026[0] | Modbus exception responses sent | Should be 0; non-zero = V20 received a request it could not execute (illegal address, illegal value) |
| r2027[0] | Faults cleared via Modbus | Counts fault-acknowledge (bit 7) edges; useful to confirm the startup sequence actually got through |
| 40200 | Status word | Bit 0 = ready, bit 2 = running, bit 6 = run enable, bit 10 = control from PLC |
| 40201 | Actual frequency | Should track 40101 within one ramp period (P1120 / P1121) |
From the S7-1200 side, after each MB_MASTER call inspect .STATUS:
-
16#0000— no error. -
16#80C8— slave device timeout (no response within timeout window; raise timeout or check cable). -
16#80D1— parity / framing error from the line. -
16#80D2— CRC error. -
16#80E1— illegal function code (V20 received an FC it does not support for that address). -
16#80E2— illegal data address (V20 received an address it does not map; check 1-based vs 0-based offset). -
16#80E3— illegal data value (e.g. writing a value out of range for that parameter).
For full STATUS code coverage see the S7-1200 Modbus RTU manual in Siemens Industry Online Support.
11. Common Pitfalls
| Pitfall | Effect | Countermeasure |
|---|---|---|
| Sharing one MB_MASTER_DB across multiple calls | Internal state corruption; random DONE values; "ghost" responses | Each call gets its own instance DB — TIA Portal does this automatically if you accept the prompt when dropping the instruction |
| Triggering a new REQ while BUSY is still high | Silent drop of the new request; no error | Edge-trigger REQ with a one-shot; never hold it high |
| Reading .DONE without resetting the request | Same call never re-fires | REQ must pulse on a rising edge; do not tie it to DONE |
| Not terminating the bus (120 Ω at each end) | Intermittent CRC errors under load, especially with long cables | DIP-switch or 120 Ω resistor across A–B at both physical ends; 4-wire bus needs both ends, not the middle |
| Modbus and USS mixed on the same port | V20 will not respond to either after the first frame | Set P2023 = 2 (Modbus) and never send USS frames; USS function codes (FC 6 with sub-encoding) are not Modbus-compliant |
| Auto/Hand key on BOP set to Hand | V20 ignores all Modbus commands silently — drives locally instead | Press Auto/Hand key until "Auto" icon shows on the BOP display |
| Different P2000 reference on different drives | Same HSW value = different Hz on each drive | Set P2000 identically on all 16 drives, or compute HSW per drive in the PLC |
| P2022 (comm timeout) shorter than token cycle | V20 trips F72 (RS485 comm loss) mid-cycle | Set P2022 = 0 (disable) or P2022 > 2 × token cycle to allow for retries |
| EN pin of MB_MASTER toggled as a master enable | The instruction stops transmitting; rising-edge of REQ is still latched internally but no frame goes out | Leave EN tied to TRUE; use REQ for trigger and DONE/BUSY/ERROR for status |
| Reading .DONE / .ERROR / .STATUS from MB_MASTER_DB while multiple instructions use the same DB | Race condition — outputs reflect whichever call finished last | Give every MB_MASTER its own instance DB and read its own outputs |
12. FAQ
MB_MASTER returns DONE=TRUE but the V20 parameter never changes. What is the single most likely cause?
The MB_MASTER MODE input is set to 0 (Read). Holding-register writes require MODE = 1 (FC 06 single register) or MODE = 2 (FC 16 multiple registers). With MODE = 0 the instruction reads from the drive, the PLC sees DONE without ever transmitting a write request, and the V20 answers the read with the previous value — the symptom of "DONE but no change."
The first two V20 drives work but drives 3–16 do not. Why?
Either the inter-token delay is too short for the V20's RS485 transceiver direction-change time (add 10–20 ms of quiet time between tokens), or two or more drives share the same P2021 Modbus address — only one drive per address can answer per poll, and the rest of the frames go unanswered or to the wrong device.
How is MB_ADDR interpreted in MB_MASTER for V20 register 40100?
Use MB_ADDR = 100. The "4" prefix on the Modbus address is stripped automatically and the remaining value is treated as 1-based. Do not subtract 1, do not add 40001. The V20 is also 1-based, so the two values line up directly. If your read-back returns 0 or a stale value, the master is treating the V20 as 0-based and you must shift by +1.
What control word value must I write to 40100 to make the V20 run forward from Modbus?
Write 0x047F (1151 decimal). This sets bits 0, 1, 2, 3, 4, 5, 6, and 10 — ON, no OFF2, no OFF3, pulse enable, ramp-function generator enabled, setpoint enabled, and Modbus control authority asserted. Add bit 11 for reverse rotation (0x0C7F = 3199). Without bit 10 set, the V20 ignores the rest of the word.
r2024 increments and r2025 stays at 0. Does that mean communication is healthy?
It means the V20 is receiving valid frames with correct CRC. It does not prove the payload is being applied. Confirm the drive is actually running by reading 40200 (status word) and 40201 (actual frequency) — bit 2 of 40200 must be set, bit 10 of 40200 confirms Modbus authority, and 40201 must track your setpoint within one ramp period (P1120 acceleration time).
Why does adding a first-scan restart routine to the PLC fix the issue?
The V20 latches Modbus command authority on a 0→1 transition of bit 10 of register 40100. If the PLC starts up with the bus streaming requests and the first control word happens to have bit 10 = 0, the V20 stays in "no remote authority" mode for the entire session. A restart routine that writes CW = 0x047E (1150) then CW = 0x047F (1151) forces a fresh 0→1 edge and the drive takes Modbus authority. The robust fix is to ensure the first control word ever written to each V20 has bit 10 set, and that no stray frame with bit 10 = 0 arrives after that.
What is the minimum MB_COMM_LOAD configuration for the CB 1241 talking to 16 V20s at 19200 baud?
BAUD = 19200, PARITY = 0 (even — the V20 default for Modbus RTU is even parity), FLOW_CTRL = 0 (no flow control on RS485), RESP_TO = 1000 ms, MB_DB = the instance DB of the matching MB_MASTER pool. One MB_COMM_LOAD per physical port; multiple MB_MASTER calls share the loaded configuration. The CB 1241 also has a hardware switch block on the module itself for line termination (120 Ω across A–B) — enable it at the end-of-line drive or at the PLC end, not both, when the bus is short and the other end is already terminated.