Troubleshooting S7-300 Acyclic Communication to SINAMICS S120
Problem Overview
An S7-300 CPU 315-2 DP issues SFB53 (WR_REC) to write parameter p1245 on a SINAMICS S120 chassis drive (CU 320-2 DP plus one Motor Module). The cyclic channel is healthy: free telegram 4 PZD words on the CU, free telegram 6 PZD words on the drive, logical input addresses 390..397 (CU) and 456..468 (drive). The acyclic channel, however, returns BUSY with no DONE completion pulse and no error, yet the parameter value on the drive never changes. Drive-side alarm buffers show no fault.
The fault surface is misleading because SFB53 issues a positive acknowledgement when the DP-V1 frame is correctly routed to the slave's slot, even when the parameter write itself is rejected by the drive object. The diagnostic must therefore descend into both the PROFIdrive parameter-channel layout and the SINAMICS access-control model.
System Architecture and Telegram Configuration
Two independent channels ride on the same PROFIBUS station. Treat them as two separate projects inside HW Config:
-
Cyclic PZD channel. Configured by the standard or free telegram. Drives word-oriented data into
IW / QWfrom the process image. The CU 320-2 DP occupies logical addresses IW 390..397 (8 words) and QW 390..397. The Motor Module occupies IW 456..468 (13 words) and QW 456..468. The PROFIBUS station addresses are typically 4 (CU) and 5 (drive) but are user-configurable in HW Config. -
Acyclic DP-V1 parameter channel. Carries the request/response frames inside the same PROFIBUS slot but a separate service access point (SAP). The slot that
WR_RECaddresses is determined by the SFB53IDparameter; the parameter number, sub-index, drive object (DO) and format are multiplexed inside the data record.
| PROFIBUS Slave | PROFIBUS Address | Logical Inputs | Logical Outputs | Length |
|---|---|---|---|---|
| CU 320-2 DP (DO 1) | 4 (default) | IW 390..397 | QW 390..397 | 8 words |
| Motor Module / Drive (DO 2 or DO 3) | 5 (default) | IW 456..468 | QW 456..468 | 13 words |
The SFB53 ID value in the failed call is W#16#186 (decimal 390). Decimal 390 equals the CU base address, so the request is being routed to the correct station. Internal DO routing must then be handled by the request header, not the SFB53 ID byte.
Acyclic Communication Protocol Structure
The PROFIdrive DP-V1 parameter channel on SINAMICS follows the standard PROFIdrive parameter encoding with a 4-byte header. The header travels in the first four bytes of the request record, with payload appended afterwards:
| Field | Size | Encoding | Example for p1245 / DO 2 / index 0 |
|---|---|---|---|
| Parameter number (high byte) | 1 byte | High byte of parameter number | 0x04 (p1245 = 0x04DD) |
| Parameter number (low byte) | 1 byte | Low byte of parameter number | 0xDD |
| Index / array sub-index | 1 byte | 0..254 = element, 255 = full parameter | 0x00 (drive 1, index 0) |
| Drive Object (DO) number | 1 byte | 1..15 | 0x02 (first drive) |
After the header, the parameter value is appended with its associated format byte. Format codes follow the PROFIdrive v4 specification implemented on S120. The most common values relevant to drive-tuning parameters are:
| Format Code | Data Type | Width (bytes) | STEP 7 Mapping |
|---|---|---|---|
| 1 | Integer8 | 1 | BYTE / SINT |
| 2 | Integer16 | 2 | WORD / INT |
| 3 | Integer32 | 4 | DWORD / DINT |
| 4 | Unsigned8 | 1 | BYTE / USINT |
| 5 | Unsigned16 | 2 | WORD / UINT |
| 6 | Unsigned32 | 4 | DWORD / UDINT |
| 7 | FloatingPoint32 (REAL) | 4 | DWORD (IEEE-754) |
| 8 | FloatingPoint64 (LREAL) | 8 | two DWORD (IEEE-754) |
| 9..15 | Octet String, Boolean, etc. | varies | BYTE array |
p1245 in SINAMICS S120 firmware V4.x/V5.x is encoded as FloatingPoint32. The correct format code is therefore 7, not 8. The original call's B#16#8 declared Float64, which is rejected because the firmware cannot encode a 64-bit payload into a 32-bit parameter slot.
Root Cause Matrix
Three interacting problems prevent the parameter from being written. None of them raise a DONE error; they produce a silent no-op. Diagnose them in the order listed:
| # | Root Cause | Diagnostic Signature | Verification Step |
|---|---|---|---|
| 1 | Access level (p0003) too low – p1245 is gated behind Expert (level 3) | r0947 / r3996 silent or F019/F398 | STARTER Expert List → p0003 = 3 before issuing WR_REC
|
| 2 | Drive Object number does not host p1245 | No alarm; parameter absent on the addressed DO | Topology view → confirm DO contains motor of target axis |
| 3 | Format / length mismatch – Float32 parameter addressed with Float64 format | Negative reply F002/F005 in response flags; WR_REC returns W#16#80C4 or no DONE |
Switch format to 7 and LEN to 4; verify value as IEEE-754 DWORD |
Second-order causes that intermittently appear in the field:
-
Stale request. Some firmware revisions interpret two identical
WR_RECcalls as a duplicate and reply success without storing. Toggle a sequence bit between calls. - Hardware address mismatch. If the PROFIBUS logical address was changed via PG online (Monitor/Modify) and not downloaded, the DP master still routes the call to the old logical address. Re-download HW Config.
- Free telegram symbol mapping off by one. PZD padding words can absorb the value if the S7 program mis-symbols the offsets. Verify offsets against the HW Config slot description.
-
Drive in commissioning state. If the drive is in r0002 state 0..3 (startup / commissioning not yet finished),
WR_RECmay queue the request and not act on it.
Solution 1 – Drive Access Level (p0003)
p1245 sits behind the Expert access level. The drive's p0003 parameter gates write access. Most operational parameters are accessible at level 2 (Standard); expert controller thresholds such as p1240, p1245, p1250, p1262, p1215, p0431 require level 3 (Expert); service functions that affect encoder tuning or firmware download require level 4.
- Open the drive online in STARTER or SCOUT.
- Switch to Expert List view (View → Expert List, or right-click parameter → "Display in expert list").
- Locate p0003, confirm value 3.
- If running with commissioning tool, set the parameter value to 3 and store RAM only. Persist with p0977 = 1 if the level must survive power-cycle.
- Re-issue
WR_RECand confirm the value updates.
Solution 2 – Drive Object (DO) Number Selection
The DO numbering on an S120 chassis follows a fixed scheme once the topology is loaded.
| Object | Default DO | Hosts |
|---|---|---|
| CU 320-2 DP | 1 | Global parameters only (r0002, p0003, p0004, p0977, r3996) |
| Motor Module #1 (drive 1) | 2 (often 3 if a virtual DO is inserted) | p1245, p1240, p1250, motor-tuning parameters |
| Motor Module #2 (drive 2) | 3 (or 4) | Same parameter set as drive 1 |
The valid procedure in STARTER or SCOUT is:
- Connect online → right-click the drive unit → "Configuration".
- Open the topology view. The DO numbers appear in the colored sidebar of each DCC block at the top of the navigation tree (e.g., DO 1 = CU, DO 2 = Drive 1, DO 3 = Drive 2).
- Cross-check that the DO that owns the motor to be tuned matches the DO byte in your header.
- In the SFB53 record, set byte 3 of the header (the DO field) to that exact number.
A common pitfall: the user believes DO 2 is the first drive because the Motor Module is the first drive created in STARTER, but a virtual DO inserted for a function module bumps the numbering to DO 3.
Solution 3 – Data Type and Format (REAL / FloatingPoint32)
p1245's data type is Float32 per the parameter list in STARTER (Display Properties dialog or refer to the SINAMICS S120 Function Manual Communication). Sending format 8 with only 4 bytes of payload produces a malformed parameter request: the firmware either interprets the trailing bytes as one extra parameter (negative reply) or silently ignores the write. The fix is format code 7 with 4 bytes.
| Target p1245 Value | IEEE-754 Hex (big-endian) | STEP 7 DB WORD Order (little-endian) |
|---|---|---|
| 50.0 | 0x42480000 | W#16#0000, W#16#4248 |
| 55.0 | 0x425C0000 | W#16#0000, W#16#425C |
| 65.0 | 0x42820000 | W#16#0000, W#16#4282 |
| 75.0 | 0x42960000 | W#16#0000, W#16#4296 |
| 85.0 | 0x42AA0000 | W#16#0000, W#16#42AA |
| 95.0 | 0x42BE0000 | W#16#0000, W#16#42BE |
The call cited the value as W#16#55 (= decimal 85), which is the integer-typed interpretation. Once the format is corrected to Float32, the byte sequence must be the IEEE-754 single-precision encoding of 85.0 (0x42AA0000), not the integer byte 0x55. Stored as a DWORD in the STEP 7 DB, the value is hex 0x42AA0000.
Recommended DB structure:
DATA_BLOCK DB1245
TITLE "SINAMICS S120 p1245 Acyclic Write Buffer"
VERSION : 0.1
NON_RETAIN
STRUCT
pnum_hi : BYTE; // 0x04 (p1245 = 0x04DD)
pnum_lo : BYTE; // 0xDD
par_index : BYTE; // 0x00 (drive 1, array index 0)
do_no : BYTE; // 0x02 (or topology-confirmed DO)
p_value : DWORD; // IEEE-754 single-precision target
END_STRUCT;
END_DATA_BLOCK
The block length passed to WR_REC is 8 bytes: 4 bytes for the header plus 4 bytes for the Float32 payload. STARTER handles the same layout automatically when the parameter is dragged into a Function Block during commissioning; manual logic must preserve the byte order listed above.
WR_REC Implementation in STEP 7 V5.5
The canonical call for a one-shot acyclic write in STEP 7 V5.5 uses SFB53 (or SFB52 for read) with the request record pre-loaded in a DB. Ladder excerpt follows.
CALL SFB53, DB53
REQ := M1245.0 // positive edge starts the request
ID := W#16#186 // 390 decimal → CU 320-2 DP base address
INDEX := 0 // data record number; full layout in RECORD
LEN := 8 // 4 header + 4 payload (Float32)
DONE := M1245.1 // set when transfer succeeded
BUSY := M1245.2 // set while transfer in progress
ERROR := M1245.3 // set on negative reply
STATUS := MW1246 // SFB53 return code or PROFIdrive error
RECORD := P#DB1245.DBX 0.0 WORD 4
// DB1245 contents (byte order):
// Byte 0: 0x04 (p1245 high)
// Byte 1: 0xDD (p1245 low)
// Byte 2: 0x00 (index / array element)
// Byte 3: 0x02 (DO number)
// Bytes 4..7: 0x42AA0000 (Float32 representation of 85.0)
Re-arm only after BUSY falls. Re-arming while BUSY is set goes to W#16#80C3 (service channel busy). If WR_REC returns STATUS = W#16#0000 with DONE pulsed, the write committed.
Verification Procedure
- With corrected access level, DO, and format code, send
WR_REC. ConfirmDONE = TRUEwithin 200 ms,ERROR = FALSE,STATUS = W#16#0000. - In STARTER, online → Expert List → p1245. The displayed value matches the target (85.0 in the example above).
- Send
RD_REC(SFB52) for the same parameter to confirm persistent in RAM:-
REQ= positive edge -
ID= W#16#186 -
INDEX= 0 -
LEN= 8
0x42AA0000. -
- Check r0947[0..7] in the alarm buffer. Successful write to p1245 does not raise an alarm. Failure raises F019 (encryption missing) or F398 (write-protected).
- To persist, issue a separate
WR_RECfor p0977 = 1 with format code 5 (Unsigned16) and payload0x0001. RAM to ROM stores all previously written parameters, including p1245. - Power-cycle the drive. Re-verify p1245 in STARTER; if p0977 was issued, the value persists; if not, the value reverts to commissioning defaults.
Error Code Reference
SFB53 returns a STATUS word when ERROR is set. Negative values map to specific PROFIdrive and DP-V1 failures:
| STATUS | Meaning | Most Likely Field Cause |
|---|---|---|
| W#16#80A1 | Negative acknowledge from DP slave | F002/F005 in r0947 – format or length error |
| W#16#80A2 | DP slave timeout | PROFIBUS cable issue; acyclic transaction watch-dog |
| W#16#80A3 | DP-V1 frame error | Firmware-hardware revision mismatch |
| W#16#80B0 | INDEX outside the allowed range | Wrong SFB53 INDEX encoding |
| W#16#80C0 | Write-protected (access level mismatch) | p0003 < required for that parameter |
| W#16#80C2 | Service not yet available | CU still in startup (r0002 < 12) |
| W#16#80C3 | Service channel busy | Previous acyclic call has not completed; raise REQ after BUSY = 0 |
| W#16#80C4 | Parameter cannot be read/written on the addressed DO | Wrong DO or parameter not present on that DO |
The classic "value does not change with no DONE and no ERROR" symptom maps to W#16#80C4 paired with a silent format/DO miss at the drive. STARTER's online trace of the parameter channel confirms the cause within one cycle.
Field-Proven Best Practices and Cross-Platform Notes
- Use the STARTER-generated FB. STARTER produces correctly populated headers for each parameter, removing the manual hazard. Manual code is reserved for parameters not exported by the tool.
- Maintain a state-machine wrapper. Request → BUSY → wait → DONE pattern. Re-arm only after BUSY clears. Layer the WR_REC inside OB1 or a dedicated cycle OB, not inside a higher-priority OB, so retries do not starve the acyclic bus.
- Document symbol mapping. Inside the free telegram, every PZD offset must be paired with a meaningful symbol. Mis-symboling the offsets by one word sends drive 2's control word into drive 1's status slot and silently fails.
-
Subscribe each acyclic call to a DO readiness check. Read r0002 on the addressed DO before
WR_REC; abort the write if the drive is not yet in Operation (r0002 ≥ 4). - Persist with p0977 only on explicit operator confirmation. RAM to ROM is a destructive operation that locks commissioning data; protect it behind an HMI command, not an automatic trigger.
- Cross-platform migration: For TIA Portal projects that integrate S7-1500 with SINAMICS S120, the equivalent acyclic parameter access is provided by the DriveProxy block and the standard SFB53 with the same PROFIdrive encoding. The Configuring SINAMICS S120 manual entry from the S7-1500/ET 200MP Manual Collection documents the modern proxy flow and replaces the byte-shuffling manual record with a typed interface. Concepts (access level, DO, IEEE-754, format code) are identical.
Frequently Asked Questions
What does p0003 have to be to write p1245 from the CPU 315-2 DP?
Set p0003 to 3 (Expert). p1245 is an expert-level parameter, so acyclic writes return W#16#80C0 (write protection) or silently drop if p0003 is left at the default operator level of 1.
How do I find the correct Drive Object number for a Motor Module?
Connect online with STARTER or SCOUT, open the drive's Configuration / Topology view, and read the DO number from the sidebar of each DCC block. The CU 320-2 DP is always DO 1; the first Motor Module is typically DO 2 or DO 3 depending on whether virtual DOs occupy the slot in between.
Why does the parameter not change even though WR_REC reports DONE?
The request was routed to a DO that does not own p1245, or the format byte was mismatched – for example format 8 (Float64) sent to a 4-byte Float32 parameter. Check r3996 for negative response flags and re-verify the DO and format fields in the request header.
What format code should the WR_REC payload use for p1245?
Use format code 7 (FloatingPoint32 / REAL). The value is a 4-byte IEEE-754 single-precision floating-point number that lives in the DB as a DWORD. Confirm the data type in STARTER's parameter properties before encoding the value.
Does the WR_REC write persist after a power-cycle?
No, an acyclic write to p1245 only updates the volatile RAM copy. To persist, issue a separate acyclic write of p0977 = 1 with format code 5 (Unsigned16) and payload 0x0001, or use the commissioning tool's "Copy RAM to ROM" function.
Where can I find the canonical PROFIdrive format code table?
The format code table and parameter-channel encoding are documented in the SINAMICS S120 Function Manual Communication at support.industry.siemens.com, entry ID 109781721. The same manual covers request/reply header structure and DO numbering.