Troubleshooting SINAMICS V20 Modbus Control Word 40100 Not

David Krause14 min read
SiemensTroubleshootingVFD / Drives
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Overview

A common commissioning symptom on the SINAMICS V20 family is that the drive accepts every Modbus request from the PLC except those that target the control word at holding register 40100 (STW1) and the main setpoint at 40101 (HSW). Reads of 40100–40150, reads of fault and warning registers, and writes of ramp times such as 40322 (acceleration) and 40323 (deceleration) all succeed. The drive even acknowledges the write to 40100 with the expected Modbus response, yet it never closes the output stage or applies the speed setpoint. On the same drive, the local Run and Stop keys on the BOP continue to start and stop the motor even though P0700 = 5 (Modbus RTU) is supposed to disable BOP command authority.

This combination of symptoms almost always points to one of three root causes: (a) bit 10 of STW1 is not being set by the PLC, (b) the parameter that maps register 40100 to the drive's internal control word (P2023) has been changed off the default, or (c) the parameter set is internally corrupted, which is why the BOP continues to function despite P0700 = 5. The fastest resolution is a factory reset followed by a clean Modbus commissioning pass.

Affected Hardware, Firmware, and Software Versions

Item Catalog Number Version / Notes
SINAMICS V20 drive 6SL3210-5BB11-2BV1 1.2 kW, 230 V 1AC, frame size FSA, integrated BOP
S7-1212C CPU 6ES7212-1AE40-0XB0 DC/DC/DC variant, firmware V4.6
RS485 comm. module 6ES7241-1CH30-1XB0 (CB1241) Plug-in module, Modbus RTU master or slave
Engineering software STEP 7 Basic / TIA Portal V19 Update 3
Modbus library Siemens Modbus RTU for CB1241 MB_MASTER / MB_COMM_LOAD instructions

Reference: SINAMICS V20 List Manual (parameter description) and S7-1200 System Manual.

SINAMICS V20 Modbus Register Map (Holding Registers, FC 03/06/16)

The V20 implements a fixed subset of the SINAMICS V-modbus map. Only the registers shown below are relevant to control word and setpoint exchange. Any write outside this subset is answered but ignored.

Register Name Access Width Scaling / Notes
40100 STW1 (control word 1) R/W UINT16 Bits 0–15, see bit table below
40101 HSW (main setpoint) R/W INT16 0x4000 (16384) = 100 % of P2000; signed, two's complement
40102 ZSW1 (status word 1) R UINT16 Mirror of r0052 bits 0–15
40103 HIW (actual frequency) R INT16 Scaled to P2000, signed
40150 Fault code (r0947[0]) R UINT16 Most recent active fault
40151 Active fault code 2 R UINT16 r0947[1]
40200–40239 Parameter access (PNU) R/W UINT16 Index/Value split, see V20 manual
40322 Acceleration time (P1120 × 100) R/W UINT16 Multiply written value by 0.01 s
40323 Deceleration time (P1121 × 100) R/W UINT16 Multiply written value by 0.01 s

Reference: SINAMICS V20 Modbus / USS connection guide.

SINAMICS V20 Control Word 1 (STW1) Bit Structure at Register 40100

The drive ignores 40100 unless the bits marked mandatory are set correctly. The two power-on states observed on a healthy drive are:

  • 0x047E (1150 dec) – ready, not rotating, bit 10 = 1 (PLC control)
  • 0x047F (1151 dec) – ready and rotating (ON/OFF1 = 1)
Bit Mnemonic Function Required state for PLC run
0 ON/OFF1 1 = run command, 0 = ramp to stop Toggle 0 → 1 to start
1 OFF2 1 = coast-stop enable, 0 = coast stop 1
2 OFF3 1 = quick-stop enable, 0 = quick stop 1
3 Inverter enable 1 = enable pulses, 0 = inhibit pulses 1
4 RFG enable 1 = ramp-function generator enabled 1
5 RFG freeze 1 = setpoint ramp runs 1
6 Setpoint enable 1 = setpoint applied to ramp 1
7 Fault acknowledge 0 → 1 edge resets active faults 0 except for ack pulse
8 Reserved Always 0 0
9 Reserved Always 0 0
10 Control by PLC 1 = drive accepts fieldbus control word 1 (mandatory)
11 Reverse direction 1 = reverse setpoint sign 0 for forward
12 Reserved Always 0 0
13 Motor pot up MOP raise 0
14 Motor pot down MOP lower 0
15 CDS bit 0 Command data set select 0
Bit 10 (0x0400) is the master enable for PLC control. If the PLC writes 0x007E / 0x007F instead of 0x047E / 0x047F, the drive acknowledges the Modbus transaction but will never close the output stage. Many TIA Portal example projects assemble STW1 with only the bits 0–7 mask and forget bit 10; this is the single most common cause of the symptom described above.

Required Parameter Configuration

Confirm every parameter in this table before further diagnostics. The defaults shown are the values needed for a Modbus-RTU master on CB1241 at 9600 baud, 8E1.

Parameter Designation Required value Effect of wrong value
P0700 Command source 5 (Modbus RTU) BOP keeps authority or wrong source selected
P1000 Setpoint source 5 (Modbus RTU) Analog input or fixed setpoint overrides HSW
P2010[0] RS485 baud rate 6 (9600) – must match MB_COMM_LOAD CRC errors, no comms
P2011[0] Modbus station address 1–247, unique on bus Bus collision / no response
P2012[0] Modbus parity / data bits 2 (8E1) – match PLC Framing errors
P2014[0] Modbus timeout (ms) ≥ 3 × PLC request cycle, default 100 ms F72 fault, no comms
P2015[0] PZD telegram failure time (ms) 0 = disabled, or > 0 with P2016 set F72 if non-zero and P2023 maps to a register you never write
P2023[0] Fieldbus word 1 source register 40100 (default) Writes to 40100 silently rerouted
P2024[0] Fieldbus word 2 source register 40101 (default) HSW writes ignored
P2034 Fieldbus interface select 1 (RS485 / Modbus) Wrong interface selected
P2040 Fieldbus watchdog time (ms) 1000 default, set to 0 to disable F72 fault on comms loss
P0852 Choice: signal source for pulse enable 0 / 1 (BOP / fieldbus) Pulse enable held low
If P0700 = 5 but the BOP Run key still starts the motor, the parameter set is in an inconsistent state (often because P0700 was changed during a previous commissioning session and never saved, or because the drive parameter set is otherwise corrupted). A factory reset clears this state in one step.

Root Cause Analysis

From the symptom set reported, the root causes rank as follows by frequency:

  1. Bit 10 of STW1 not set (most common). The PLC writes 0x007E instead of 0x047E. Modbus responds with the same ACK as a successful write; the drive simply refuses to interpret the word because the "Control by PLC" bit is missing. This is why manual ramp-time writes to 40322/40323 work – those registers do not require bit 10 to be processed.
  2. P2023 / P2024 remapped. A previous integrator changed the source registers of the two PZD words. The drive still ACKs writes to 40100/40101 because the Modbus layer is alive, but the values are not forwarded to the internal control word buffer.
  3. Parameter set corruption. The drive ACKs Modbus writes but never applies them; simultaneously, BOP commands continue to work despite P0700 = 5. The internal parameter save area (PSU/EEPROM image) has been written in a way the runtime can no longer apply. This is a known failure mode on field-aged V20 units and on units that lost power mid-parameter-write.
  4. Fault F72 present but not visible on BOP. A standing F72 (telegrams lost) inhibits the fieldbus control word. F72 should appear in r0947; if it is present, it must be acknowledged before 40100 takes effect.

Diagnostic Procedure (Step-by-Step)

  1. Read 40102 and 40103 with FC 03. Confirm ZSW1 returns a non-zero value that changes when you press the BOP Run key. If it does, the fieldbus link itself is healthy.
  2. Read 40150. If it returns a non-zero code, note it. F1 = overcurrent, F2 = overvoltage, F5 = I²t, F72 = USS/Modbus telegram failure, F85 = external fault. Acknowledge any standing fault by toggling bit 7 of STW1.
  3. Write STW1 = 0x047E to register 40100 (FC 06) and read it back. The read-back must equal 0x047E. If it returns 0x007E, the PLC is overwriting bit 10 somewhere in the telegram FB before MB_MASTER is called.
  4. Read r0700 and r1000 (registers 40200/40201 indirect via PNU access). Confirm r0700 = 5 and r1000 = 5. If r0700 reads back as anything other than 5, the active command source is not Modbus regardless of what you think you wrote.
  5. Read r2023 and r2024 directly (P2023 and P2024 read-back). Both must be 40100 and 40101 respectively.
  6. Toggle bit 0 only. With STW1 held at 0x047E, write 0x047F and observe r0021 (motor frequency) at register 40103. If frequency does not move while ZSW1 bit 2 (drive running) remains 0, the parameter set is suspect; proceed to factory reset.
  7. Check r0947[0] continuously for F72. If F72 appears, raise P2040 or set it to 0 to disable the watchdog.

Factory Reset and Clean Re-Commissioning

A factory reset returns all parameters to factory defaults, clears the parameter set inconsistency that lets BOP override P0700 = 5, and is the documented recovery for any case where the drive is otherwise unresponsive on Modbus. There are two equivalent methods.

Method 1 – via BOP

  1. Power-cycle the drive (24 V aux + 400 V main).
  2. Within 10 seconds of power-up, hold the FN key for 3 seconds – the BOP will display "P0000" flashing.
  3. Press OK to confirm. The drive resets, displays "-----" briefly, and reboots.

Method 2 – via Modbus parameter write

  1. Write P0010 = 30 (commissioning filter for factory reset) via Modbus parameter access.
  2. Write P0970 = 1 (start factory reset).
  3. Wait until r0947 clears or the drive drops off Modbus for 5–10 seconds.

Clean Modbus commissioning sequence (post-reset)

  1. Set P0010 = 1 (quick commissioning) and P0100 = 0 (Europe, 50 Hz defaults).
  2. Set motor data: P0304, P0305, P0307, P0310, P0311 for your motor nameplate.
  3. Set P0700 = 5 and P1000 = 5.
  4. Set P2010[0] = 6 (9600 baud), P2011[0] = 1 (station address), P2012[0] = 2 (8E1).
  5. Set P2023[0] = 40100 and P2024[0] = 40101 (these are the defaults; explicitly writing them ensures the parameter set is consistent).
  6. Set P2040 = 0 to disable fieldbus watchdog during commissioning, or to 1000 ms with active cyclic writes from the PLC.
  7. Set P0010 = 0 to exit commissioning.
  8. Cycle power once, then write STW1 = 0x047E followed by 0x047F with HSW = 0x4000. The motor must now run at P2000 frequency (default 50 Hz).

TIA Portal V19 – S7-1200 Side Assembly of STW1

The Siemens Modbus example for V20 on TIA Portal V19 expects you to build STW1 in a single network before calling MB_MASTER. The canonical word construction is shown below as structured text.

// Build STW1
"DB_V20".STW1.%X0   := "HMI".CmdStart;          // bit 0  ON/OFF1
"DB_V20".STW1.%X1   := TRUE;                    // bit 1  OFF2
"DB_V20".STW1.%X2   := TRUE;                    // bit 2  OFF3
"DB_V20".STW1.%X3   := TRUE;                    // bit 3  Pulse enable
"DB_V20".STW1.%X4   := TRUE;                    // bit 4  RFG enable
"DB_V20".STW1.%X5   := TRUE;                    // bit 5  RFG freeze
"DB_V20".STW1.%X6   := TRUE;                    // bit 6  Setpoint enable
"DB_V20".STW1.%X7   := "HMI".AckFault;          // bit 7  Fault ack (edge)
"DB_V20".STW1.%X8   := FALSE;                   // bit 8  reserved
"DB_V20".STW1.%X9   := FALSE;                   // bit 9  reserved
"DB_V20".STW1.%X10  := TRUE;                    // bit 10 PLC control <-- REQUIRED
"DB_V20".STW1.%X11  := "HMI".CmdReverse;        // bit 11 Reverse
"DB_V20".STW1.%X12  := FALSE;                   // bit 12 reserved
"DB_V20".STW1.%X13  := FALSE;                   // bit 13 MOP up
"DB_V20".STW1.%X14  := FALSE;                   // bit 14 MOP down
"DB_V20".STW1.%X15  := FALSE;                   // bit 15 CDS bit 0

// Build HSW (scaled to P2000)
"DB_V20".HSW := REAL_TO_INT("HMI".SpeedSetpoint_Pct * 163.84);

// Write STW1/HSW as a single Modbus transaction, FC 16
MB_MASTER_DB(
  REQ       := "Cyclic_100ms".RunFlag,
  MB_DB     := "MB_COMM_LOAD_DB",
  MODE      := 1,                              // RTU master
  DATA_ADDR := 40100,
  DATA_LEN  := 2,
  DATA_PTR  := "DB_V20".STW_HSW_WordArray,    // {STW1, HSW}
  DONE      => "DB_V20".MB_Done,
  BUSY      => "DB_V20".MB_Busy,
  ERROR     => "DB_V20".MB_Error,
  STATUS    => "DB_V20".MB_Status);
The MB_MASTER STATUS output will read 0x0004 (modbus error code 4) when the drive answers "function code invalid" for a register that is read-only or out of range. That is a valid negative acknowledgement – it proves the link is alive and that the drive is rejecting the request, not that the bus is broken. Treat it as a diagnostic signal, not a hardware fault.

Verification

  1. With the drive powered and HMI/PLC in control, set HMI start = FALSE and confirm register 40102 (ZSW1) bit 2 (drive running) is 0 and bit 0 (ready) is 1.
  2. Set HMI start = TRUE. Confirm 40102 bit 2 transitions to 1 within 100 ms (one Modbus cycle) and 40103 (HIW) ramps to the value requested.
  3. Set HMI start = FALSE. Confirm the motor decelerates per P1121 and ZSW1 bit 2 returns to 0.
  4. Disconnect the CB1241 cable. After P2040 ms, the drive should fault F72; reconnect, toggle bit 7 of STW1, and confirm fault clears.
  5. Set HMI start = TRUE while a digital-input stop (P0702/P0703 etc.) is wired and active; ZSW1 bit 0 must remain 0, confirming the OFF2 path is independent of the fieldbus.

Troubleshooting Matrix

Symptom Likely cause Action
Drive ignores 40100; ramp writes to 40322/40323 work Bit 10 of STW1 missing in PLC write Build STW1 with bit 10 forced to 1; verify read-back = 0x047E
Read-back of 40100 differs from write (e.g., write 0x047E, read 0x007E) PLC program masking bit 10 between FC and MB_MASTER Inspect the FB that assembles the telegram; remove any "AND 0x00FF" or similar
BOP Run/Stop still works with P0700 = 5 Parameter set inconsistent / corrupted Factory reset (P0010 = 30, P0970 = 1)
MB_MASTER returns STATUS 0x0004 (error code 4) Drive rejects the addressed register Confirm P2023 = 40100, P2024 = 40101; check FC code matches write access
Drive starts and immediately faults F72 P2040 watchdog shorter than PLC scan or MB_COMM_LOAD paused Raise P2040 to 2000 ms or set to 0 during commissioning; confirm MB_COMM_LOAD MODE is RUN
ZSW1 bit 10 (fieldbus control requested) never returns 1 P2023/P2024 remapped Write P2023 = 40100, P2024 = 40101; power cycle
HSW value ignored even though STW1 accepted P1000 ≠ 5 in active runtime Read r1000, write P1000 = 5, power cycle
Drive runs one cycle then refuses further commands Cyclic telegram stopped by PLC scan Place MB_MASTER call in a 100 ms cyclic OB and keep MB_COMM_LOAD EN = TRUE
Drive ignores negative setpoint (reverse) Bit 11 not toggled OR reverse disabled by P1032 Verify P1032 = 1; assert bit 11 of STW1
Communication link OK in MB_COMM_LOAD but MB_MASTER returns no response Address mismatch or parity Set P2011[0] = PLC address; set P2012[0] = 2 (8E1) on both sides

Safety and Commissioning Notes

  • Always separate low-voltage signal wiring from line-voltage motor wiring. The CB1241 ground terminal must be tied to the cabinet PE bar at a single point.
  • Before any Modbus session, fit an RS485 terminator (120 Ω) at each end of the bus only. The CB1241 ships with selectable termination – leave it OFF if a third-party terminator is fitted.
  • After a factory reset, the drive reloads the motor model from P0304–P0311. If your motor was originally matched by the wizard, re-run quick commissioning (P0010 = 1) before resuming production.
  • Save the parameter set with P0971 = 1 after every successful commissioning pass. A subsequent corruption can then be cleared by reloading via SD card (V20 parameter clone) rather than a full factory reset.
  • Never write P0010 = 30 during a running production cycle. The factory-reset P0970 = 1 cannot be aborted.

FAQ

Why does the drive ACK my write to register 40100 but never start?

The Modbus layer is independent of the drive's command interpreter. The drive answers 40100 with FC 06 success because the register exists, but the internal control word is only acted upon when bit 10 ("Control by PLC", value 0x0400) is set. Build STW1 with bit 10 forced to 1; the expected values are 0x047E (ready) and 0x047F (running).

The BOP Run key still works even though P0700 = 5 – is this a bug?

No. P0700 = 5 should disable BOP command authority. If the BOP still starts the motor, the drive's parameter set is internally inconsistent. Run a factory reset (P0010 = 30, P0970 = 1), then re-apply P0700 = 5 and P1000 = 5 and save with P0971 = 1.

My MB_MASTER returns STATUS 0x0004 – is the bus broken?

Status 0x0004 is Modbus exception code 4 ("Slave Device Failure") and indicates the drive answered with an exception, not a bus fault. The communication link is healthy. It commonly means you wrote to a read-only register, or that P2023/P2024 are remapped, or that the drive is in a fault state. Read r0947[0] to confirm.

Do I have to set P2023 = 40100 manually?

No – P2023 = 40100 and P2024 = 40101 are factory defaults. After a factory reset you do not need to touch them. Only re-write them if r2023/r2024 read back to anything else, or after importing a parameter file from a non-default project.

What is the minimum Modbus cycle time the V20 will tolerate?

The internal fieldbus task runs every 4 ms. A PLC cycle of 20–100 ms is well within tolerance. Below 5 ms you risk saturating the RS485 transceiver and triggering F72; raise P2040 (default 100 ms) to at least three times your cycle time, or set P2040 = 0 to disable the watchdog during commissioning.

Back to blog