Configuring SINAMICS S120 Drives with TIA Portal Configuration

David Krause14 min read
SiemensTIA PortalTutorial / How-to
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

Configuration Control (German: Projektierungssteuerung) is a TIA Portal mechanism that lets a single compiled PLC program and a single hardware project run on multiple physical machine variants. Instead of generating one project per machine order, the engineer configures the maximum hardware scope once and then activates or deactivates submodules at runtime through the Library for Configuration Control (LCC). The library has been used for distributed I/O (ET 200SP, ET 200MP, ET 200AL, ET 200pro) for many years, and the same principle now extends to the SINAMICS S120 drive system: Drive Objects (DOs) and the control instances that supervise them can be switched on or off, so a project can support an S120 with 1, 2, or 3 Line Modules / Motor Modules without recompilation.

This article explains how to combine PROFIBUS-coupled ET 200 stations and a multi-axis SINAMICS S120 in a single TIA Portal project, then enable and disable optional drive axes and I/O stations through the LCC. The procedure covers the standard machine project workflow, the SINAMICS S120 parameter object model, the relevant LCC function blocks, the symbolic I/O mapping rules, and the diagnostic steps required to verify a working configuration.

Architecture and Scope

A typical flexible machine topology that benefits from Configuration Control looks like the following SVG diagram:

S7-1500 CPU e.g. 1516-3 PN/DP ET 200 (mandatory) SINAMICS S120 CU320-2 + 3 Motor Modules Optional ET 200 (variant A) Optional ET 200 + S120 (variant B) Solid lines: configured and always present. Dashed lines: configured and conditionally present (LCC).

The PLC holds:

  • One mandatory ET 200 station that exists on every machine variant.
  • One mandatory SINAMICS S120 with the maximum number of axes (e.g., three Motor Modules) configured in the project.
  • One or more optional ET 200 stations and an optional S120 that may be present or absent depending on the ordered machine variant.

All participants communicate over PROFIBUS in this scenario. The same workflow also applies to PROFINET; the only difference is the catalog entry (PROFIBUS device vs. PROFINET device) and the diagnostic address range.

Prerequisites

Before starting the project, verify the following:

  1. TIA Portal V17 or later is installed. The Configuration Control blocks for SINAMICS S120 require TIA V17+; older versions handle ET 200 only.
  2. STEP 7 V17+ with the S7-1500 HSP that supports the CPU you are using.
  3. Startdrive V17+ integrated in TIA Portal for the SINAMICS S120 commissioning. Startdrive provides the DO list (Control Unit, Line Module, Motor Modules) and the telegram configuration that the LCC needs.
  4. SINAMICS S120 firmware V5.2 SP3 or higher on the CU320-2 (or CU310-2). Configuration Control for S120 was introduced with firmware 5.2 and expanded in 5.2 SP3.
  5. Library for Configuration Control installed via the TIA Portal Add-Ins or downloaded from Siemens Support. The library exposes blocks such as LCCHardware and supporting data types.
  6. GSD files for every ET 200 station. For S7-1500 internal PROFIBUS interfaces, the GSD is part of the TIA Portal hardware catalog.
  7. S7-1500 CPU firmware V2.9 or higher on the controller side.
If your SINAMICS S120 is older than firmware V5.2, the drive objects cannot be activated/deactivated through the LCC; the project must be regenerated for every axis count. Update the CF card or the CU320-2 firmware before proceeding.

Step-by-Step: Build the Maximum Project

1. Insert the S7-1500 CPU and the PROFIBUS network

  1. Open TIA Portal and create a new project.
  2. Add an S7-1500 CPU, e.g. 6ES7516-3AN02-0AB0. Configure the PROFIBUS interface as DP master with the desired baud rate (1.5 / 3 / 6 / 12 Mbit/s).
  3. Switch to the network view and place the mandatory ET 200 station on the PROFIBUS subnet. Assign a unique PROFIBUS address (default 3).
  4. Place the optional ET 200 station(s) at addresses 4, 5, ... . The number of optional stations defines the maximum number of variants you can build.

2. Insert the SINAMICS S120 with the maximum axis count

  1. In the hardware catalog, navigate to Drives & starters > SINAMICS drives > S120.
  2. Insert a CU320-2 on the PROFIBUS subnet at a free address (e.g. 10).
  3. Add the Line Module (e.g. 6SL3330-6TE41-1AA3) and the maximum number of Motor Modules the project must support. If the worst-case machine has 3 axes, configure 3 Motor Modules. Each Motor Module is a separate drive object in the S120 parameter tree.
  4. Open the S120 device view and assign PROFIsafe / PROFIdrive telegrams. For a standard servo axis use telegram 105 (1 position + 1 velocity); for a vector axis use telegram 1; for the closed-loop control with SINAMICS Safety Integrated use telegram 30 or 901.
  5. Make sure the DO list in Startdrive reflects the order: Control Unit → Infeed → Drive_1 → Drive_2 → Drive_3. The DO numbers must be contiguous; if you skip an index, Configuration Control cannot close the gaps.

3. Define symbolic I/O names for every drive and ET 200 slot

The LCC relies on symbolic addresses because the absolute I/O addresses change when submodules are deactivated. In the PLC tag table or directly on the drive/IO slot, rename the input and output bytes:

  • "DB_S120".Axis1_Slots, "DB_S120".Axis1_StatusWord, "DB_S120".Axis1_ControlWord
  • "DB_ET200".MandStation_Input
  • "DB_ET200".OptStation_A_Input

When you de/activate a module, the PLC recompiles the I/O mapping, but the symbolic names continue to address the same logical data. Never use absolute I/O addresses (e.g. IW 256) inside the user program if you intend to use Configuration Control.

4. Activate Configuration Control on the S120

  1. In the S120 device properties, open Configuration Control > Drive object activation.
  2. Tick Activate drive object activation. This exposes the S120 to the LCC.
  3. The TIA Portal help text and the Standard machine projects documentation describe the activation concept: every DO that may be optional is supplied as a parameter object model entry whose p0107/p0108 references can be switched from the PLC.
  4. Repeat for the optional ET 200 stations: in the station properties, enable Configuration Control > Activate configuration control and mark which slots are allowed to be missing.

SINAMICS S120 Parameter Object Model

The SINAMICS S120 stores every drive object, infeed, and option module in a structured parameter object model. The most important parameters for Configuration Control are listed below.

Parameter Description Relevant values
p0107 Drive object type (Control Unit, Infeed, Motor Module, TB30, TM31, etc.) 0 = inactive, 1 = SERVO, 2 = VECTOR, 3 = VECTOR (3-ph), 100 = CU, 200 = Infeed
p0108 Drive object configuration source 0 = configured in project, 1 = plug-in memory card, 2 = automatic device configuration
p0109[0..n] Component number / topology reference Logical assignment of the DO to a physical slot
r0102 Number of drive objects currently active Read-only diagnostic
p9910 Accept the modified configuration into the active parameters 1 = accept, runs a one-off topology check
p0977 Save all parameters to non-volatile memory 1 = save, required after each activation cycle

The PLC can read the active configuration through standard PROFIdrive request 0x0070 (read parameter) and modify the activation list with request 0x0071 (write parameter). When Configuration Control is enabled, the drive handles the slot re-mapping automatically after a successful parameter commit (p0977 = 1 or power-cycle of the CU).

Step-by-Step: Program the Configuration Control

5. Install and open the LCC library

  1. Open Options > Global libraries > Library for Configuration Control.
  2. Drag the type LCCHardware (FB) and the associated LCC_Type_HW (UDT) into your project master copies.
  3. The library is described in detail in the Siemens Support entry 29430270. Use the LCC examples for ET 200SP / ET 200MP as a template; the SINAMICS S120 parts use the same block interface.

6. Declare the configuration data block

Create a global DB, e.g. DB_ConfigControl, with the following structure:

TYPE UDT_LCC_Cfg :
  STRUCT
    sStationId : STRING[20];   // Name of the PROFIBUS station or DO
    bPresent   : BOOL;         // TRUE = physically mounted
    iSlot      : INT;          // Logical slot number
    eType      : INT;          // 0=ET200, 1=CU, 2=Infeed, 3=Motor Module
  END_STRUCT;
END_TYPE

DATA_BLOCK "DB_ConfigControl"
VAR
  aCfg : ARRAY[1..16] OF UDT_LCC_Cfg;   // 16 optional participants
  iNumCfg : INT := 0;                    // Number of valid entries
  bActivate : BOOL;                      // Rising edge = commit
  iStatus : INT;                         // 0 = idle, 1 = running, 2 = error
  iError : INT;                          // LCC error code
END_VAR

7. Build the activation sequence in SCL

// FB_ApplyConfig - applies the configuration list to the S120
// Reads the desired variant from a recipe (e.g. DB_Recipe.VariantCode)
// and writes the activation map to the LCC hardware block.

"fb_ApplyConfig"( iVariant := "DB_Recipe".VariantCode );

IF "fb_ApplyConfig".bDone THEN
  // Trigger a one-off topology commit on the S120
  // The LCC handles the PROFIdrive write; here we pulse the user-defined bit
  "DB_S120".bCommitCfg := TRUE;
END_IF;

The same FB also iterates through the ET 200 list and calls the LCC block for distributed I/O. The LCC FB is the only function the user has to wire; the rest of the logic (request IDs, wait states, error handling) is inside the library.

8. Connect the FB to the SINAMICS S120 telegrams

For each optional Motor Module, link the symbolic I/O of the configured telegram to the user program. Because the activation list is contiguous, a deactivated axis is simply skipped by the S120's DO counter. The user program can detect the active axis count by reading parameter r0102:

// Query the number of active DOs after the commit
iActiveAxes := "DB_S120".AxisCount;   // Bound to r0102 via the S120 drive FB

All telegrams, however, are still transmitted. The drive inserts 0x00 in the status word and ignores the control word of deactivated axes, so the PLC may keep sending telegrams without functional consequence.

9. Handle safety and PROFIsafe

If the S120 runs with Safety Integrated (PROFIsafe over PROFIBUS) and the optional axis has a F-DI/F-DO, the F-host must be aware of the activation state. Options:

  • Passivate the F-slave through the F-CPU block F_PASSIV when the optional station is missing.
  • Re-parameterize the F-Destination address on every variant change; this is supported by the LCC and requires the F-CPU in firmware V2.9 or higher.
The F-IO must be included in the maximum project even when not mounted. Otherwise TIA Portal reports a compile error because the F-signature references symbols that are not part of the active hardware.

Verification

Run the following checks after the project compiles cleanly:

  1. Compile the project in TIA Portal. The hardware configuration must compile without Topology rules violated or PROFIBUS slave missing warnings; missing slaves are expected when the LCC is set up correctly and the warnings should disappear as soon as the activation list is processed by the S120.
  2. Download the project to the S7-1500. The online view of the device configuration should show all optional stations in grey (deactivated).
  3. Power-cycle the SINAMICS S120. The CU re-reads p0107/p0108 and accepts the activation map.
  4. Set a recipe with the maximum variant: confirm that r0102 reports 3 active Motor Modules and the S120 Commissioning > Drive objects tab lists all 3 axes. Run a small motion (e.g. jog) on each axis to confirm telegrams are healthy.
  5. Set a recipe with one optional axis removed: confirm that r0102 drops to 2, that the S120 no longer reports the third DO, and that the PLC user program (driven by symbolic tags) keeps running without an OB 122 (I/O access error).
  6. Watch the diagnostic buffer of the S7-1500. With Configuration Control active, you should not see Station failure entries for the deactivated slaves; instead, the S120 reports Configuration control - drive object activation events.

Diagnostics and Error Codes

Common LCC and S120 errors when using Configuration Control:

Code Source Meaning Remedy
0x0001 LCC FB Station index out of range Verify the index in DB_ConfigControl.aCfg matches the LCC internal table (1..16).
0x0007 LCC FB PROFIBUS slave not reachable Check wiring and bus termination; the LCC still completes, but the station is marked absent.
0x0012 S120 p0977 Save to CF card failed Replace or re-format the CF card on the CU320-2.
0x0101 S120 F01001 Configuration error in p0108 Verify the topology rules; the S120 expected a Motor Module in slot X but the activation map removed it without marking p0108 = 0.
0x0201 S120 F08501 PROFIdrive telegram inconsistent Re-assign the telegram mapping; the drive rejected the new DO list because the telegram count did not match.
0x0301 PROFIsafe F-Destination address mismatch Update the F-Destination address in the safety program before the F-CPU is restarted.

Troubleshooting Matrix

Symptom Likely cause Action
Compile error: "Symbol not found" for axis 2 inputs Absolute I/O addresses used in user program Replace all IW/QW with symbolic tags tied to the S120 telegram DBs.
OB 122 (I/O access error) at runtime Optional axis is present in project but marked inactive by the LCC while the user program still references its tags Wrap the references in conditional logic that checks r0102 / LCC status before access.
Drive goes into F01001 after a recipe change p0108 not reset to 0 for the removed axis Add the deactivated DO's p0108 = 0 to the LCC write list; trigger p0977 = 1 after the cycle.
PROFIsafe channel goes into passivation when axis is removed F-CPU does not know the F-slave is optional Use F_PASSIV on the affected F-DB; re-acknowledge after the recipe change.
S120 keeps the old DO list after p0977 CU320-2 requires a power cycle to apply the new topology Cycle 24 V on the CU; firmware V5.2 SP3 also accepts p0009 = 0 and a warm restart.
Online view: optional ET 200 is shown red even though it is mounted Activation map still has the station at "absent" Re-run the LCC FB with the correct recipe value; verify the LCC status output reaches 0 (done).

Field-Proven Tips

  • Always configure the worst-case hardware in the offline project. The LCC only deactivates; it cannot create a DO that was not inserted in the project.
  • Keep the DO list contiguous. If you want three optional axes, insert three Motor Modules in slots 2, 3, 4 of the S120. A non-contiguous DO list produces F08501 on the first recipe change.
  • Use symbolic tags for everything that is optional. Absolute I/O access (PIB, PQB) on optional axes will trigger OB 122 the moment the axis is deactivated.
  • Persist the activation map with p0977 = 1 after the recipe write, otherwise the S120 loses the new configuration on the next power-up.
  • For PROFIsafe, pair Configuration Control with F_PASSIV / F_REMV on the safety program; the F-CPU in firmware V2.9+ can dynamically reassign F-Destination addresses through the LCC.
  • Document the variant code in the recipe system. A bit field (Bit 0 = axis 1 present, Bit 1 = axis 2 present, ...) is the easiest way to keep the activation map in sync with the order code.

Limits and Caveats

  • Configuration Control supports up to 16 optional PROFINET/PROFIBUS stations per S7-1500 CPU, regardless of manufacturer family. If the project needs more, split it into a parent and child CPU or use PN/PN couplers.
  • The SINAMICS S120 itself accepts up to 6 optional DOs in addition to the always-present Control Unit. The number of optional Motor Modules is bounded by the firmware release - V5.2 SP3 supports 4 optional Motor Modules; later firmware may support more.
  • The LCC does not work with S7-1200 CPUs; an S7-1500 or ET 200SP CPU is mandatory.
  • If the S120 is controlled over PROFINET with IRT, Configuration Control is still supported but the topology rules of PROFINET apply on top - the optional S120 must still occupy a configured AR (Application Relationship).
  • Do not mix Configuration Control with the legacy S7-300/S7-400 H-CPU mechanisms. The LCC was designed for S7-1500 single-station operation.

Related References (Official)

Can the S120 be activated or deactivated at runtime without reloading the TIA Portal project?

Yes. With SINAMICS S120 firmware V5.2 SP3 or higher and TIA Portal V17+, the Library for Configuration Control writes the new DO list to p0107/p0108 of the CU, commits it with p0977 = 1, and the S120 accepts the change on the next warm restart. The PLC user program and the compiled hardware project stay unchanged.

How many optional drives can I switch off and on in a single S120?

Up to 6 optional drive objects in addition to the Control Unit, of which up to 4 are typically Motor Modules in firmware V5.2 SP3. The exact number depends on the firmware release of the CU320-2; check the SINAMICS S120 Function Manual for the firmware currently deployed.

What happens to PROFIsafe when an optional axis is removed?

Use F_PASSIV in the safety program to passivate the F-DB for the optional F-slave. S7-1500 CPUs from firmware V2.9 can also re-assign the F-Destination address dynamically through the LCC, which avoids manual re-commissioning of the safety signature.

Does Configuration Control work with PROFINET IRT and Safety Integrated?

Yes. The LCC supports PROFINET and PROFIBUS equally. The S120 must still occupy a configured AR; otherwise the controller rejects the optional station on power-up. Drive-side Safety Integrated (PROFIsafe in the S120) is independent of the bus type.

Where can I find a working TIA Portal example for the S120 + LCC scenario?

The Siemens Support entry 29430270 contains a sample project that demonstrates ET 200 plus S120 configuration control. Use it as a starting point: insert the maximum S120 axis count, add the LCC block to the project, and follow the variant code through a recipe DB.

Back to blog