Overview: Reading and Writing SINAMICS DCM Parameters from a SIMATIC S7-300
The SINAMICS DCM family of DC converters (catalog prefix 6RA80) exposes its full parameter set over PROFIBUS DP using the PROFIdrive parameter channel. When a SINAMICS DCM 6RA8075-6DS22-0AA0 is integrated as a slave on a SIMATIC S7-300 PROFIBUS network, the PLC cannot modify drive parameters by simply toggling process data bits - ramp times are non-cyclic parameters and must be written through an acyclic service. Siemens provides the standard function blocks SFB52 / RDREC and SFB53 / WRREC for this purpose. This reference walks through parameter selection, slot/index addressing, the parameter request/response protocol, and complete S7-300 ladder and SCL examples for changing the ramp-up and ramp-down times at runtime.
The procedure is firmware-version independent at the protocol level but the exact parameter index (p-number) for the ramp function generator must be confirmed against the firmware version installed in the Control Module (CUD). Always cross-check with the device Parameter List inside the installed SINAMICS DCM DC Converter Operating Instructions.
Prerequisites
- Hardware: SIMATIC S7-300 CPU 31x (e.g. CPU 315-2 DP, CPU 317-2 DP) with an integrated PROFIBUS DP master port, or a CP 342-5 used as DP master. The SINAMICS DCM 6RA8075 must be configured as a DP slave on the same network segment.
- Software: SIMATIC Manager Step 7 V5.5+ or TIA Portal V13+ with the SINAMICS DCM GSD file (SIEM8171.GSD or SI8181.GSD depending on the CUD variant). The SINAMICS DCM product page lists the GSD version compatible with each firmware release.
- Communication blocks: SFB52 (RDREC) and SFB53 (WRREC) from the standard library "System Function Blocks". These blocks are part of the S7-300/400 system software and do not require a separate license.
- CUD firmware: Identify the firmware version via parameter r0018 or on the BOP20 display (MENU > COMMISSIONING > r0018). The parameter numbers for the ramp function generator differ slightly between firmware versions; check the parameter list in the converter operating instructions.
- Drive configuration: The DP slave must be configured with at least one acyclic slot (slot 0 for parameter access, sometimes referenced as the "DO index 0"). Acyclic communication uses DP-V1 services and requires a PROFIBUS DP-V1 master (all S7-300 CPUs with integrated DP and all CP 342-5 versions support DP-V1).
Understanding Ramp-Time Parameters on the SINAMICS DCM
The ramp function generator (RFG) on the SINAMICS DCM limits the rate of change of the speed setpoint. Two principal parameters are exposed through PROFIdrive and through the drive-internal parameter list:
| Parameter | Meaning | Unit | Access | Notes |
|---|---|---|---|---|
| p1120 (PROFIdrive) | Ramp-up time | s | rw | Standard PROFIdrive PNU. Valid only when the PROFIdrive profile is active. |
| p1121 (PROFIdrive) | Ramp-down time | s | rw | Standard PROFIdrive PNU. |
| p30301 (DCM-specific, verify) | Ramp-up time (drive-internal) | s | rw | Used in the SINAMICS DCM basic drive display; confirm against the parameter list for your firmware. |
| p30302 (DCM-specific, verify) | Ramp-down time (drive-internal) | s | rw | Same as above. |
| p30303 (verify) | Initial rounding (jerk limit) | s | rw | Optional smoothing at start of ramp. |
| p30304 (verify) | Final rounding (jerk limit) | s | rw | Optional smoothing at end of ramp. |
For the S7-300 to write a ramp time, two conditions must be met:
- The PLC must obtain the parameter handle by writing request ID 0x01 (request parameter, single value, no subindex) to the parameter channel, then reading the response and extracting the 32-bit floating-point value of p1120 or p1121.
- The PLC must send a parameter change request (request ID 0x02, write, single, no subindex) carrying the new ramp-time value encoded as a 32-bit IEEE-754 float, MSB first, into the parameter channel data area.
PROFIdrive Parameter Channel Structure
Siemens drives use a 16-byte parameter request/response structure. The first 8 bytes form the parameter address header, the next 4 bytes contain the value (or the response status on a read), and the last 4 bytes are reserved.
| Byte | Name | Request write | Request read | Response |
|---|---|---|---|---|
| 0-1 | Request reference / request ID | 0x0001 (write, single) | 0x0001 (read, single) | Mirror of request ID + error flags |
| 2-3 | Drive Object (DO) ID | 0x0000 (DO 1, control unit) | 0x0000 | Mirror of DO ID |
| 4-5 | Parameter number | 1120 (ramp-up) or 1121 (ramp-down) | 1120 / 1121 | Mirror of parameter number |
| 6 | Subindex | 0x00 | 0x00 | Mirror of subindex |
| 7-8 | Number of values | 0x0001 (one value) | 0x0001 | Mirror |
| 9 | Attribute | 0x10 (value) | n/a | 0x10 on success |
| 10-13 | Value / format | 32-bit IEEE-754 float, MSB first | n/a | Float value on read success; 16-bit error on failure |
| 14-15 | Reserved | 0x0000 | 0x0000 | Reserved |
For a ramp-up time of 12.5 seconds the four value bytes are:
0x41 48 00 00 (IEEE-754 single precision representation of 12.5)
Encode and decode in S7-300 using the standard function FC3 (DWORD_TO_REAL) and FC5 (REAL_TO_DWORD), or use the indirect SWAP on a data block to reverse the byte order if you assemble the buffer by hand.
Hardware Configuration in Step 7 / TIA Portal
- Open HW Config (Step 7 V5.5) or the Device View (TIA Portal). Insert the GSD file for the SINAMICS DCM: Options > Install GSD File. The drive appears in the catalog under "PROFIBUS DP > Drives > SINAMICS DCM".
- Drag the SINAMICS DCM onto the DP master system. Assign a unique PROFIBUS address (e.g. 7) that matches the address set on the CUD (DIP switch or parameter p0918).
- In the slot configuration, leave slot 0 as the parameter access channel (it is automatically created). Add at least one PZD slot (standard telegram 1 or free configuration) for the cyclic speed setpoint and actual value. The PZD slot is required for the drive to enter "ready" state and accept the acyclic writes.
- Compile and download the hardware configuration. Confirm the SINAMICS DCM shows a green link on the CUD display.
Step-by-Step: Writing p1120 and p1121 with SFB53 / WRREC
The acyclic write of a ramp time is a three-phase sequence: assemble the request, send via WRREC, evaluate the response via RDREC. Use a one-shot trigger (rising edge) per write - do not call WRREC continuously or you will flood the DP-V1 channel.
Step 1: Create the request data block
Create a shared DB (e.g. DB100) with the following structure. Each ramp-time request occupies 16 bytes.
DATA_BLOCK DB100
STRUCT
// --- Request buffer for p1120 (ramp-up) ---
req_p1120_header : WORD := W#16#0120; // request ID low = write, single
req_p1120_doid : WORD := W#16#0000; // DO 1
req_p1120_pno : WORD := W#16#0460; // 1120 decimal = 0x0460
req_p1120_subidx : BYTE := B#16#00;
req_p1120_count : BYTE := B#16#01;
req_p1120_attr : BYTE := B#16#10;
req_p1120_res : BYTE := B#16#00;
req_p1120_value : DWORD := DWORD#16#00000000; // user sets
req_p1120_pad : DWORD := DWORD#16#00000000;
// --- Request buffer for p1121 (ramp-down) ---
req_p1121_header : WORD := W#16#0121; // request ID low = write, single
req_p1121_doid : WORD := W#16#0000;
req_p1121_pno : WORD := W#16#0461; // 1121 decimal = 0x0461
req_p1121_subidx : BYTE := B#16#00;
req_p1121_count : BYTE := B#16#01;
req_p1121_attr : BYTE := B#16#10;
req_p1121_res : BYTE := B#16#00;
req_p1121_value : DWORD := DWORD#16#00000000;
req_p1121_pad : DWORD := DWORD#16#00000000;
END_STRUCT
END_DATA_BLOCK
Step 2: Convert the floating-point ramp time into a DWORD
The ramp-up time in the application is a REAL value in seconds. Convert to DWORD and copy into the request buffer.
// STL segment in OB1
L "ramp_up_time_s" // REAL tag, e.g. 12.5
T DB100.DBD 18 // writes into req_p1120_value (DWORD slot)
RND
T DB100.DBW 16 // not strictly required, but useful for debug
L "ramp_down_time_s"
T DB100.DBD 46 // req_p1121_value
For high-precision values, the value field is interpreted as a 32-bit IEEE-754 float. The S7-300 REAL type is byte-swapped relative to the PROFIdrive format on big-endian networks, but PROFIdrive defines the value as little-endian (LSB first). STEP 7 stores REAL as MSB first, so the byte order of the DWORD is opposite to the order on the wire. In practice, WRREC ships the buffer as-is and the drive interprets the raw bytes; this is why the value field for a 12.5 s ramp-up time appears as 0x00004841 in the S7 tag (LSB first) and as 0x41480000 on the wire (MSB first). Use the helper function below to convert correctly.
FUNCTION FC 50 : VOID // SWAP_DWORD: reverse byte order
VAR_INPUT iDword : DWORD; END_VAR
VAR_OUTPUT qDword : DWORD; END_VAR
VAR_TEMP b0 : BYTE; b1 : BYTE; b2 : BYTE; b3 : BYTE; END_VAR
BEGIN
b0 := DWORD_LOW_BYTE(iDword);
b1 := DWORD_LOW_BYTE(SHR(IN:=iDword, N:=8));
b2 := DWORD_LOW_BYTE(SHR(IN:=iDword, N:=16));
b3 := DWORD_LOW_BYTE(SHR(IN:=iDword, N:=24));
qDword := SHL(IN:=b0, N:=24) OR SHL(IN:=b1, N:=16) OR SHL(IN:=b2, N:=8) OR b3;
END_FUNCTION
Step 3: Trigger WRREC for p1120
Use multi-instance call style. The ID is the hardware identifier of the DP slave in HW Config, and LADDR is the diagnostic address of slot 0. Both are visible in the slot properties.
// SCL in OB1
IF "start_write_rampup" AND NOT "busy_w_p1120" AND NOT "done_w_p1120" THEN
"busy_w_p1120" := TRUE;
"status_w_p1120" := 0;
WRREC_DB.REQ := TRUE;
WRREC_DB.ID := DW#16#0007; // DP slave hardware ID example
WRREC_DB.LADDR := W#16#03FE; // diagnostic address of slot 0
WRREC_DB.RECNUM := B#16#00; // record number 0 = parameter channel
WRREC_DB.RECORD := DB100.req_p1120_header; // ANY-pointer to 16 bytes
WRREC_DB.DONE := FALSE;
WRREC_DB.BUSY := FALSE;
WRREC_DB.ERROR := FALSE;
WRREC_DB.STATUS := 0;
END_IF;
// Edge-detect DONE and capture status
IF WRREC_DB.DONE THEN
"done_w_p1120" := TRUE;
"busy_w_p1120" := FALSE;
"status_w_p1120" := WRREC_DB.STATUS;
WRREC_DB.REQ := FALSE;
END_IF;
IF WRREC_DB.ERROR THEN
"error_w_p1120" := TRUE;
"busy_w_p1120" := FALSE;
"status_w_p1120" := WRREC_DB.STATUS;
WRREC_DB.REQ := FALSE;
END_IF;
Step 4: Repeat for p1121 (ramp-down)
Use a second instance of WRREC or a state machine that toggles the record pointer between req_p1120_header and req_p1121_header. The DONE flag from the first write is the trigger to start the second write.
Step 5: Read-back verification with RDREC
After both writes complete, issue two RDREC requests to read p1120 and p1121 back and verify the value was accepted. The response payload is the same 16-byte structure; on a successful read, bytes 10-13 contain the float value in little-endian, the same byte order used in the S7 tag.
RDREC_DB.REQ := TRUE;
RDREC_DB.ID := DW#16#0007;
RDREC_DB.LADDR := W#16#03FE;
RDREC_DB.RECNUM := B#16#00;
RDREC_DB.RECORD := DB100.resp_buffer; // 16 bytes destination
// On DONE: parse DB100.resp_buffer.byte10..13 into a REAL
Verification
- Check the BOP20: navigate to MENU > PARAMETER > p1120. The displayed value must equal the ramp-up time written from the PLC. Repeat for p1121.
- Force a setpoint step in STARTER (or via the PLC's PZD word 1, NSOLL) and observe the speed ramp on the trace function. The trace should show a linear acceleration lasting the exact number of seconds in p1120.
- Check the WRREC.STATUS word. A return value of W#16#0000 means success. Any non-zero value is a DP-V1 error code; see the troubleshooting table below.
- Examine the S7 diagnostic buffer (CPU > Module Information > Diagnostic Buffer) for PROFIBUS errors. DP-V1 errors are logged as event ID W#16#0A82 or similar.
Troubleshooting Matrix
| Symptom | Likely root cause | Corrective action |
|---|---|---|
| WRREC.STATUS = W#16#7000 forever | REQ never set TRUE; or BUSY stays TRUE because of overlapping calls | Confirm the rising edge on REQ. Wait for BUSY=FALSE before retriggering. |
| WRREC.STATUS = W#16#80A2 | DP-V1 timeout | Check PROFIBUS cable and termination. Verify the CUD diagnostic LEDs (green = OK, red = fault). |
| WRREC.STATUS = W#16#80B1 | Record length error; the buffer length does not match the configured record | Pass the correct length in the RECORD ANY-pointer (must be exactly 16 bytes for a single parameter). |
| Drive accepts write but p1120 does not change | Access level locked; or write blocked by safety integrated; or commissioning flag still active | Set p0003 = 3 (expert) and ensure p0010 ≠ 0 (drive not in commissioning). For Safety Integrated, write the value via STARTER first to confirm parameter is writable, then mirror the same value from the PLC. |
| RDREC returns error code 0x0F in byte 10 | Parameter does not exist in this firmware (e.g. p30301 numbering in old firmware) | Consult the parameter list for the firmware version. Use the BOP20 to confirm p1120 exists. |
| Value written as 0.0 even though PLC sends a non-zero float | Byte order mismatch (big-endian vs little-endian) | Apply the SWAP helper shown above; verify the four value bytes match the IEEE-754 representation of the intended value. |
| Drive returns error 0x10 (Invalid Parameter Change) | Drive is in operation (run signal active) and the parameter cannot be changed on the fly | Stop the drive (control word bit 0 = 0, OF OFF1) before writing p1120 / p1121, then re-enable. |
Safety and Commissioning Notes
- Modifying ramp times on a running drive can produce a torque transient. For a DC drive with high inertia load, the new ramp-down time can stretch the regen current into the field-weakening region - verify the armature current limit (p50180 or P153 in legacy DCM) is not exceeded during the new ramp profile.
- Always keep a copy of the original ramp times in a non-volatile DB (e.g. DB101) and restore them on a "Default" request from the HMI.
- If the SINAMICS DCM is part of a Safety Integrated application, ramp-time changes from the PLC may be logged and need to be acknowledged in the safety log. The Safety Integrated firmware is in the 6RA8075-6DS22-0AA0 base unit only if the -Z option is present; verify with the order code.
- For PROFIsafe applications, acyclic parameter access is not safety-rated; do not use the ramp times as a safety function. Use a Safety Integrated SLS limit instead.
Alternative: Changing the Ramp via STARTER or the AOP30
If the S7-300 is not strictly required for the change (e.g. commissioning or recipe download from the HMI), STARTER provides direct write access to p1120 / p1121 without acyclic block development. The values are stored non-volatile in the CUD, so they survive a power cycle. After saving with "Copy RAM to ROM" in STARTER, the next cold start of the converter uses the new ramp times. This is the recommended method for one-time configuration changes and is a useful sanity check before commissioning the PLC code.
Alternative: Using the SIMATIC S7-1200 / S7-1500 Instead of the S7-300
The same acyclic protocol works on the S7-1200 and S7-1500 controllers. The blocks are called "RDREC" and "WRREC" there as well, but they are system instruction types placed in the project tree under "Instructions > Communication > PROFINET/PROFIBUS". The buffer assembly is identical. The advantage on S7-1500 is direct support for the word "DP_V1_WRITE" data type which handles byte-swapping internally; this eliminates the manual DWORD-to-bytes conversion shown in Step 2.
Alternative: Using the Standard Telegram 1 PZD Word (No Acyclic Required)
Some PROFIdrive profiles expose a control-word bit that selects between two ramp-time pairs (e.g. p1120/p1121 vs p1120[1]/p1121[1]). With Standard Telegram 1, the bit "Ramp Generator Active" in STW1 (bit 13 in some versions) is not dedicated to ramp-time selection on the DCM. If your application can tolerate two fixed ramp-time sets, configure both pairs in STARTER and select via the drive's binary inputs; this avoids the acyclic channel entirely.
Performance and Timing Considerations
A single WRREC call to a SINAMICS drive typically takes 20-50 ms on PROFIBUS DP-V1. Writing both ramp times serially takes 40-100 ms. If the application requires faster updates (e.g. recipe changeover in less than 200 ms), send the two requests in parallel using two independent WRREC instances with separate ANY-pointers. The drive can process multiple DP-V1 reads in parallel; writes are serialized internally.
Field-Proven Caveats
- On older CUD firmware (V1.x), the parameter channel uses record number 47 instead of 0. Confirm in the parameter list; using record 0 on a V1.x CUD returns error 0x0B (Invalid Subindex).
- The CUD may reject a write if p0010 (parameter filter) is set to a value other than 0. Always write p0010 = 0 (Ready) before writing ramp-time parameters from the PLC.
- If the drive is configured for parallel operation (master / follower), p1120 and p1121 must be written to the master drive only; the follower derives its ramp from the master's setpoint.
- When using a CP 342-5 as the DP master, the SFB52/53 calls must be wrapped in a USC (Unified Serial Communication) block, or the CP rejects the DP-V1 service. See the CP 342-5 manual section on acyclic data exchange.
Summary of Key Values
| Item | Value |
|---|---|
| Drive catalog number | 6RA8075-6DS22-0AA0 |
| DP-V1 record number for parameter channel | 0 (firmware V2.x and later) |
| PROFIdrive PNU for ramp-up time | 1120 |
| PROFIdrive PNU for ramp-down time | 1121 |
| Request ID for single-value write | 0x0001 (low byte) / 0x01 (in low nibble of request reference) |
| Request ID for single-value read | 0x0001 (low byte) / 0x01 |
| Byte count of a single-value request | 16 bytes (8-byte header + 4-byte value + 4-byte reserved) |
| Float format on the wire | IEEE-754 single precision, little-endian (LSB first) |
| Default slot for parameter access | Slot 0 of the SINAMICS DCM DP slave |
FAQ
What Siemens blocks do I use to write a ramp time on a SINAMICS DCM from an S7-300?
Use the standard acyclic blocks SFB52 / RDREC (read) and SFB53 / WRREC (write). Both are part of the S7-300 system library, take the DP slave hardware ID, the diagnostic address, and a 16-byte buffer containing the PROFIdrive parameter request.
What is the correct parameter number for the ramp-up and ramp-down time on a SINAMICS DCM?
The PROFIdrive standard PNUs are p1120 for ramp-up time and p1121 for ramp-down time, both in seconds. On the SINAMICS DCM some firmware versions also expose drive-internal p30301 / p30302 in the higher parameter range. Verify the exact number for your firmware by checking r0018 and consulting the parameter list in the SINAMICS DCM DC Converter manual.
Why does my WRREC call return an error when writing p1120?
The most common causes are: the drive is in commissioning (p0010 not equal to 0); the access level is locked (set p0003 to 3 for expert); the byte order of the float value is reversed; or the DP-V1 record number is wrong (must be 0 on CUD firmware V2.x and later, 47 on V1.x).
Can I change the ramp time while the drive is running?
On the SINAMICS DCM most ramp-time parameters can be written on the fly, but the drive applies the new value at the next setpoint change. If the drive returns error code 0x10 (Invalid Parameter Change), stop the drive first by removing the ON command (STW1 bit 0 = 0) before writing p1120 / p1121, then re-enable.
Do I need a separate GSD file to use acyclic parameter access on the SINAMICS DCM?
No. The GSD file defines the cyclic PZD slots only. Acyclic parameter access uses the slot 0 parameter channel which is built into every PROFIdrive-compliant Siemens drive. Install the GSD that matches your CUD firmware version, configure at least one PZD slot to bring the drive to RUN state, and the acyclic channel is automatically available.