Overview of the Convert List to S7 Data Block Function
The Convert list to S7 data block function in Siemens SCOUT (SIMOTION) and STARTER (SINAMICS Drive ES) automatically generates a STEP 7 data block (DB) whose structure conforms to the data records defined by the PROFIBUS Profile Drive Technology, Version 3.1, November 2002. The generated DB holds one or more parameter jobs that use the data record 47 (DS47) mechanism over DPV1 to read or write drive parameters on a SINAMICS S110/S120, MICROMASTER 4xx, or SIMOTION D drive connected to a CU320-2DP, CU310-2DP, or CU310-2PN control unit.
The function is invoked from the Expert List or Parameter view by selecting Options → Convert list to S7 data block. It can convert either the complete expert list (recommended) or a previously saved user-defined parameter list to a downloadable STEP 7 source file. The source file is then compiled inside STEP 7 (or TIA Portal) to produce the actual DB that the S7 CPU exchanges with the drive.
The underlying transport is DS47 (DPV1 parameter access). Each drive parameter (for example p1120, r0021, or r2090) is identified by its PROFIdrive parameter number, and bit-granular access (e.g. r2090.0) is exposed as a sub-index. The DB layout is fixed and matches the structure consumed by the Siemens drive parameter function block FB PDAT_UD2 (also known as FB 42 in earlier STEP 7 libraries) for upload/download drive parameters.
Prerequisites
- SCOUT / STARTER version: STARTER V4.x or higher, or SCOUT V4.x or higher, with the SINAMICS S120 / S110 option package installed. The same instruction is documented in the SINAMICS S120 Commissioning Manual and the SIMOTION SCOUT Commissioning and Configuration Manual.
-
Drive firmware: SINAMICS firmware V2.4 or higher on CU320-2DP / CU320-2PN to support DS47 parameter access via PROFIBUS DPV1 or PROFINET. Older firmware revisions (V2.1, V2.2) require the parameter to be added manually to the DPV1 telegram via
p0922orp2079. -
PLC side: STEP 7 V5.4 SPx or TIA Portal V13 SP1 or higher with the Drive ES Basic or Drive ES PCS 7 option installed. The library that ships with Drive ES contains
FB PDAT_UD2(orFB 42for legacy CPUs), its associated instance DBs, and the UDTsUDT 1(parameter request) andUDT 2(parameter response). -
CPU compatibility:
SFC24 (TEST_DB)must be present in the CPU operating system. CPUs that do not implement SFC24 (some older S7-300 CPUs) cannot use this block. With CPU MMC memory cards, the rules in Data Management in the Loading Memory must be respected, which in practice means usingFB52 SHELL_MMC_PDAT_DLfor download. - Project configuration: The drive object must be inserted as a PROFIBUS DP slave or PROFINET IO device on the same subnet as the S7 CPU, and the slot must already be configured with a standard telegram (e.g. Telegram 1, Telegram 3, or Telegram 390) so the drive is reachable for acyclic DS47 jobs.
- User rights: Online access to the drive for an upload to PG of the parameter set, plus write access to the S7 project to import the generated STEP 7 source file.
How DS47 Parameter Access Works
DS47 is a Siemens extension of the PROFIBUS DP-V1 acyclic services. The PLC writes a parameter request into a data record whose index equals 47 and whose slot corresponds to the drive object. The drive parses the request, returns a parameter response in the same data record, and updates the cyclic process data accordingly when the response is read back.
The request structure is defined by PROFIBUS Profile Drive Technology, V3.1, November 2002, section 7.4.1.3 ("Structure of parameter job DB"). Each parameter entry is a fixed-length UDT with the following fields:
| Field | Type | Meaning |
|---|---|---|
req_id |
BYTE | Job identifier: 0x01 = request, 0x02 = change, 0x82 = response |
drive_object |
BYTE | Drive object number (DO NO.), e.g. 2 for SERVO_2 on CU320 |
parameter_number |
UINT | PROFIdrive parameter number (e.g. 2090) |
index |
UINT | Sub-index, used for bit access (e.g. 0 for r2090.0) |
value |
DWORD | Parameter value, 32-bit unsigned |
ret_val |
WORD | Return value from drive (0x0000 = success) |
The generated STEP 7 DB contains one of these UDTs per parameter in the list, laid out sequentially. The block number can be modified in SCOUT/STARTER before the source file is written; by convention the DB number matches the parameter number to simplify debugging (e.g. DB2090 for r2090).
Step-by-Step: Converting a Parameter List for r2090.0
The original requirement is to expose the status word bit r2090.0 of drive object 2 (DO NO. 2) on a CU320-2DP so that an HMI can read it directly. The procedure below generates the data block, the function block call, and the variable that the HMI binds to.
Step 1 - Open the Expert List in SCOUT/STARTER
- Start SCOUT/STARTER and open the project that contains the CU320-2DP.
- Navigate to
<Drive> → Commissioning → Expert list. - Click Display/hide parameter and add
r2090to the visible parameters (it is normally visible by default in SERVO/SINAMICS projects). - Confirm that
r2090is the status word, bit 0: Function generator active / OFF1 enable depending on the telegram mapping inp2051/p2080.
Step 2 - Build a User-Defined Parameter List (or Use the Full List)
Right-click the expert list and choose Save parameter list as. Save the file to a working directory. The saved file is a plain-text expert list with one parameter per line. If you intend to monitor a single bit, keep the list small. If the goal is a full backup, leave the list at its default (every visible parameter).
Step 3 - Invoke the Converter
- With the expert list active, choose
Options → Convert list to S7 data block(button on the toolbar in STARTER V5.x; menu path in SCOUT V4.x). - In the dialog, set:
- Target DB number = 2090 (matches the parameter; can be any free DB).
- Drive object = 2 (the SERVO_2 instance on CU320).
- Format = STEP 7 V5 source (or TIA Portal DB source, depending on the editor you compile with).
- Click Convert. The tool writes a
.dbsource file (or.sclfor TIA) into the project directory.
Step 4 - Filter Behaviour
The converter automatically filters parameters that are reserved for other subsystems and must not be transferred as part of a DS47 job. The documented exclusions include:
-
p300,p301- motor selection code (locked when a list motor is configured). -
p230- motor filter type. -
p922- PROFIBUS standard telegram selection. - Parameters behind
p0015macro that are write-protected during a macro run.
Filtered parameters are skipped silently. A warning is logged to the STARTER message window if the filter removed entries.
Step 5 - Import the Source File into STEP 7 / TIA Portal
- Open the S7 project in STEP 7 (or TIA Portal).
- Choose
Insert → External Source(STEP 7) orExternal source files → Generate blocks from source(TIA Portal). - Point to the file produced in Step 3 and compile. The result is
DB2090, structured as a sequence of parameter-job UDTs.
Step 6 - Add FB PDAT_UD2 to the Cyclic Program
Open the OB that drives the cyclic communication (OB1 for one-shot polling, or OB32 for a cyclic interrupt) and add the following call. The instance DB is created automatically by STEP 7/TIA.
// OB1 / OB32 - call to FB PDAT_UD2 (or FB 42 on legacy CPUs)
CALL "PDAT_UD2" , DB_W
REQ :=M10.0 // trigger read of r2090.0
ID :=DW#16#0FFE // logical I/O address of drive object 2
LADDR :=W#16#0100 // base address from HW config (e.g. 256)
DB_NO :=2090 // data block generated in Step 3
DBNO :=0 // start index in the DB (entry 0 = r2090)
RET_VAL:=MW12 // return value from SFC59/SFC58
BUSY :=M10.1
DONE :=M10.2
ERROR :=M10.3
The block issues one SFC59 (RD_REC) and one SFC58 (WR_REC) call to drive object 2, requesting parameter 2090, sub-index 0. The response is decoded by FB PDAT_UD2 and the value placed in DB2090.DBD0. Bit 0 of the status word is then read as DB2090.DBX0.0.
Step 7 - Expose the Bit to the HMI
- In WinCC flexible, TIA Portal HMI, or WinCC, add a tag with the symbolic name
Drive2_r2090_bit00bound to the PLC addressDB2090.DBX0.0. - Update cycle: 1 s (acquisition). For a faster cycle, move the call from OB1 into OB32 with a 100 ms trigger.
- Connect the tag to a status indicator or to a control bit in a screen.
CPU Compatibility and the SFC24 Issue
The function block uses SFC24 (TEST_DB) to verify that the generated data block is present and of the correct length before issuing a read or write job. Older S7-300 CPUs in the V2.x family (for example, the CPU 312 IFM and CPU 314 IFM) do not implement SFC24, and the call will return RET_VAL = W#16#8083 ("Function not supported in this CPU") on the first invocation.
| CPU family | SFC24 available | Recommended block |
|---|---|---|
| S7-300 (V2.x firmware) | No | Use a manual SFC59/SFC58 sequence without FB PDAT_UD2 |
| S7-300 (V3.x firmware and newer) | Yes | FB PDAT_UD2 / FB 42 |
| S7-400 | Yes (all) | FB PDAT_UD2 |
| S7-1500 (with TIA Portal) | Replaced by RDREC/WRREC | Use the SIMATIC Drive ES TIA library block (DriveES_TIA_FB or similar) |
For CPUs that rely on an MMC (Micro Memory Card) as the load memory, the project structure rules of Data Management in the Loading Memory apply. In particular, the generated DB2090 must be marked as non-retain if you intend to re-download it from a partial project. The accompanying block FB52 SHELL_MMC_PDAT_DL handles the page-by-page transfer of the data block to the MMC, avoiding the size limits of a single SFC58 call.
OB Integration and Execution Timing
The block can be called from any of the standard organization blocks supported by STEP 7. The execution time scales with the number of parameters in the DB; each DS47 job takes 20-40 ms on a CU320-2DP with a 12 Mbaud PROFIBUS.
- OB1 - one-shot poll, triggered by an HMI request bit. Lowest CPU load, but the value can be up to one OB1 cycle stale.
- OB32 - cyclic interrupt. Typical configuration: 100 ms. Suitable for a status word that the HMI polls at 1 s.
- OB35 - cyclic interrupt at 100 ms default; identical behaviour to OB32 for this use case.
- OB82 / OB86 / OB100 / OB101 - not appropriate; the block is not restart-safe and will not survive a warm restart with a fresh instance DB.
For a 50-parameter full backup, expect 1-2 s of PROFIBUS round-trip time on a 12 Mbaud link. For a single-bit read such as r2090.0, the round-trip is one PROFIBUS cycle (typically 5-10 ms) plus the call overhead of FB PDAT_UD2.
Features and Limitations
- Works on all drives that support Parameter access with DPV1 (DS47) per PROFIBUS Profile Drive Technology V3.1, November 2002. This includes SINAMICS S110, S120, S150, G120 (with CU250S or higher), and MICROMASTER 4xx.
- Full upload/download and partial upload/download are supported. The partial modes are useful for HMI-driven commissioning but are the source of the inconsistencies called out in the warning above.
- The DB structure is fixed by the Siemens profile. The converter always produces the same layout; the value lies in the parameter list, not in the DB skeleton.
- The function is available only for MICROMASTER 4xx and SINAMICS. SIMOVERT MASTERDRIVES VC and MC use a different DS48 path and cannot be converted with this tool.
- Bit access (
r2090.0) is supported by setting the index field of the UDT to the bit number. The drive returns a 32-bit value and the application masks the bit locally.
Best Practices for a Maintainable DB
- Always keep the DB number in lockstep with the parameter number when you have one parameter per DB. The convention
DB2090forr2090is documented in the SINAMICS S120 List Manual and survives refactoring. - Group related parameters into the same DB. For a CU320-2DP with multiple drive objects, create one DB per drive object (e.g.
DB2090_DO2,DB2090_DO3) to make HMI bindings self-explanatory. - Mark the DB as non-instance and non-retain in the STEP 7 block properties. The data is re-fetched from the drive on every PLC restart, so retention is unnecessary and just consumes load memory.
- Document the DB inside the block comment header. The converter does not insert comments; you must add them manually after import.
- Re-generate the DB every time the firmware is upgraded. The parameter list and the meaning of bit-granular sub-indices can change between firmware versions, and a stale DB will read the wrong field.
Verification Procedure
- Download the S7 program with
DB2090and the OB containing the FB PDAT_UD2 call. - Go online in STEP 7 and open
DB2090in monitor mode. - Trigger the drive to run (e.g. via the control panel in STARTER). The status word bit
r2090.0should toggle according to the drive state (1 = pulses enabled / OFF1 active, depending on the mapping inp2080[0]). - In the HMI, observe the bound tag. A green LED on the screen should follow the bit.
- Force the drive to a fault condition (e.g. trip it via
p3981). Confirm the bit clears (or transitions, per the mapping) within one OB1 / OB32 cycle. - Use the Diagnostics → Drive view in SCOUT/STARTER to verify that the DS47 counter (
r0990,r0991for SINAMICS) is incrementing; a stuck counter indicates that the DB call is not being triggered.
Troubleshooting Matrix
| Symptom | Return value / error | Root cause | Corrective action |
|---|---|---|---|
| DB2090 not loaded after download | SFC24 RET_VAL = W#16#8083 | CPU does not support SFC24 | Switch to manual SFC58/SFC59 sequence, or upgrade CPU firmware |
| RET_VAL = W#16#80A1 | SFC58/SFC59 | Negative acknowledgement from drive, parameter number invalid | Verify parameter exists in the drive; check firmware version supports it |
| RET_VAL = W#16#80B1 | SFC58/SFC59 | PROFIBUS not in OPERATE | Check DP master state, cabling, and bus termination |
| Bit always reads 0 | No error | Wrong sub-index; r2090.0 mapped to a different bit by p2080
|
Inspect p2080[0] and remap if required |
| Bit always reads 1 | No error |
r2090 is being driven by a free function block or p2051 override |
Clear p2051 overrides and re-check the actual signal source in the drive expert list |
| MMC CPU rejects the DB | SF LED on CPU, diagnostic buffer entry "Block too large" | DB exceeds SFC58 max record length (240 bytes) on legacy MMC firmware | Split DB or use FB52 SHELL_MMC_PDAT_DL for page-wise transfer |
| Converter skips all parameters | Empty DB generated | List was unsaved; filter removed all entries | Save the expert list first, then re-run the converter; check the filter log |
| Download leaves drive in inconsistent state | No error, but drive behaves incorrectly | Partial backup overlaid on top of existing parameter set | Perform factory reset (p0970 = 1) and reload the complete expert list |
Migration Path to TIA Portal
For new projects, the recommended environment is TIA Portal V15 or higher with the SINAMICS StartDrive option or the SIMOTION Scout TIA plugin. The Convert list to S7 data block function is exposed under the same menu path, but the generated source is an SCL file rather than a STEP 7 STL source, and the function block is shipped as DriveES_TIA_FB (or a project-specific instance) instead of FB PDAT_UD2. The DB structure, the DS47 mechanism, and the call sequence are unchanged.
When migrating an existing STEP 7 project that uses FB 42 to TIA Portal:
- Re-generate the DB in TIA using the converter. Do not import the legacy
.dbsource - the UDT alignment is different between STEP 7 V5 and TIA. - Replace
FB 42with the TIA library block. The interface is similar, but the instance DB is auto-generated. - Update the HW configuration: the
LADDRinput is now taken from the device's slot, not from a global DP address.
Comparison With Other Access Methods
| Method | Mechanism | Cycle | Use case |
|---|---|---|---|
| Cyclic process data (PZD) | PROFIBUS / PROFINET cyclic words | 1-32 ms | Real-time control: control word, setpoint, status word |
| DS47 (this function) | DPV1 acyclic record 47 | 20-40 ms per parameter | Parameter access for HMI, commissioning, diagnostics |
| PROFINET Shared Device / iDevice | Two controllers on one drive | 1-32 ms | Modular machines with multiple CPUs |
| SINAMICS Web server | HTTP / HTTPS | 1-5 s | Engineering diagnostics only, not for control |
| OPC UA on the drive | CUAJ, S120 with CU320-2 PN | 100 ms | SCADA / Industry 4.0 integration |
For a single bit of the status word such as r2090.0, the most efficient method is to map it into the cyclic PZD (via p2051 / p2080). The DS47 mechanism is justified only when the bit is already available in the expert list and an HMI that polls acyclic data exists, or when the cyclic telegram is already at its slot limit.
Field-Commissioning Checklist
- Confirm the PROFIBUS or PROFINET link is in OPERATE (no SF/BF on the CPU, no BF on the drive).
- Confirm the drive is reachable in SCOUT/STARTER for an upload to PG.
- Generate
DB2090forr2090, DO NO. 2, from the complete expert list. - Compile and download the S7 program.
- Go online in STEP 7, force
M10.0 = 1, and confirmDB2090.DBD0updates. - Bind the HMI tag to
DB2090.DBX0.0and verify the screen indicator tracks the drive state. - Perform a controlled drive stop and a fault trip to confirm the bit transitions are as expected.
- Save the project archive with the S7 program, the STARTER project, and a PDF of the expert list.
What block number should the generated DB use?
Use the parameter number as the DB number to keep the binding self-explanatory (for example, DB2090 for r2090). Any free DB number works, but the parameter-matching convention reduces maintenance errors across firmware upgrades.
Can I back up only the parameters I have changed with a user-defined list?
Technically yes, but Siemens explicitly recommends against it. Partial backups are merged additively on download, which can produce an inconsistent parameter set, especially across firmware changes. Use the full expert list export for a reliable backup.
Why is the converter skipping p300, p301, p230, and p922?
These parameters are reserved for the motor selection list, motor filter, and PROFIBUS telegram configuration. They are write-protected when a list motor is active and must be re-entered manually or via a drive commissioning tool. The converter excludes them to avoid locked-parameter errors from the drive.
My S7-300 CPU returns RET_VAL W#16#8083. What should I do?
The CPU does not implement SFC24 (TEST_DB). Either upgrade the CPU firmware to a V3.x or higher release that includes SFC24, or replace the FB PDAT_UD2 call with a manual SFC58 (WR_REC) and SFC59 (RD_REC) sequence that does not depend on SFC24.
Is the same function available in TIA Portal?
Yes. SCOUT TIA and StartDrive TIA expose the converter under Options → Convert list to S7 data block. The generated file is SCL rather than STL, and the function block on the PLC side is the DriveES TIA library block rather than FB 42, but the DS47 mechanism and DB layout are unchanged.