Connecting SINAMICS G120 to S7-1200 via PROFINET in TIA Portal

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

Connecting a SINAMICS G120 to a SIMATIC S7-1200 over PROFINET in TIA Portal

This reference walks through every step required to put a SINAMICS G120 frequency converter on PROFINET with a SIMATIC S7-1214 CPU. It covers the hardware that must be present, the G120 control-unit and power-module combinations that are supported, the exact TIA Portal path to add the drive, the PROFINET device name rules, the choice of standard telegram, two valid programming paths (the driveLib / SINA_SPEED blocks for older firmware, and the native Technology Object Axis for firmware V4.0 and later), and a troubleshooting matrix for the faults most often seen during commissioning.

Source of truth. The configuration procedure in this article follows the official Siemens application example "SINAMICS G120 / S7-1200 PROFINET connection" (Entry ID 70155469) and the SINAMICS G120 operating instructions for the CU240B-2 / CU240E-2 control units (Entry ID 109478828). Always cross-check the G120 firmware release notes and the TIA Portal online help before going on-site.

1. Prerequisites

Component Required version / part Notes
S7-1214 CPU 6ES7214-1xxxx-xxx0 (DC/DC/DC or DC/DC/RLY) Firmware V4.0 or higher recommended for native Motion Control path
SINAMICS G120 control unit CU240B-2 PN (6SL3244-0BB00-1BA1) or CU240E-2 PN (6SL3244-0BB00-1PA1) PN suffix = PROFINET interface on board
SINAMICS G120 power module PM240-2 (6SL3210-1PExx-xxxx) Select frame size by motor current and supply voltage (1AC 230 V or 3AC 400 V)
TIA Portal V15.1 or higher; V17 / V18 preferred for current G120 GSD Match TIA Portal version to the CPU firmware you are downloading to
G120 firmware (CU) V4.7 SP3 / V4.7 SP6 / V5.1 SP1 / V5.2 Listed in the "Module parameters" tab of the device configuration
GSD file GSDML-Vx.x-Siemens-SINAMICS_G120-xxxx.xml Install via Options → Manage general station description files (GSD)
Application example Entry ID 70155469 (.zip with TIA project) Contains driveLib blocks, sample HMI and SCL sources
PROFINET cable Cat 5e or higher, industrial grade M12 D-coded or RJ45 depending on the G120 variant

Verify the SINAMICS G120 entry in the TIA Portal hardware catalog before commissioning. In the Network view the drive should appear under Other field devices → PROFINET IO → Drives → Siemens → SINAMICS (per the TIA Portal S7-1500 manual collection - Configuring SINAMICS G120). If the drive is missing, the GSD has not been installed for the current TIA Portal version.

2. Hardware Topology and Wiring

The G120 with a CU240B-2 PN or CU240E-2 PN has two PROFINET ports (P1, P2) on the bottom of the control unit. Use them to daisy-chain other PROFINET nodes or to form a line topology with the S7-1200 as the IO controller.

  1. Mount the PM240-2 power module on the panel backplate, snap the CU240B-2/E-2 PN on top. The control unit is hot-pluggable; the power module is not.
  2. Wire the three-phase supply (L1, L2, L3, PE) to the PM240-2 input terminals and the motor U, V, W, PE to the output. The shield of the motor cable must be bonded to the drive's PE terminal with a 360° clamp.
  3. Connect PROFINET port P1 of the G120 to the S7-1214 PROFINET port (X1) using an industrial Ethernet cable. If you are daisy-chaining, P2 of the G120 feeds the next node.
  4. Wire a digital input (e.g. DI0) of the CU to a hardware enable / OFF1 source if the standard telegram uses bit 0 of STW1 for ON/OFF1.
  5. Wire the STO (Safe Torque Off) inputs on the CU240E-2 PN if you intend to use integrated safety. CU240B-2 PN does not support STO; it requires an external safety relay or a higher-level safety CPU.
Supply topology. Three-phase apparent power on the line side is kVA = √3 · VLL · Iline / 1000. The G120 PM240-2 nameplate current is line current; never treat it as single-phase current when sizing fuses or feeder conductors.

3. TIA Portal Project Structure

  1. Open TIA Portal and create a new project. Add the S7-1214 CPU with the correct order number and firmware version (Devices & networks → Add new device).
  2. In Devices & networks switch to the Network view.
  3. Open the Hardware catalog task card on the right side, navigate to Other field devices → PROFINET IO → Drives → Siemens → SINAMICS and drag the G120 device that matches the control unit you are using (CU240B-2 PN or CU240E-2 PN) into the network view.
  4. Click the green PROFINET port on the CPU and the green PROFINET port on the G120 to draw the IO connection. TIA Portal assigns the IO controller/IO device relationship automatically.
  5. Open the G120 device view. The slot "Telegramm" (slot 0, subslot 1) is the place where the cyclic PZD telegram is selected.

4. Assigning the PROFINET Device Name

The PROFINET device name is what the IO controller uses to address the G120 during AR (Application Relationship) establishment. Two facts that often trip up first-time users:

  • You may enter the name in TIA Portal in upper-case, lower-case, or mixed case. The engineering tool does not enforce a case.
  • The SINAMICS G120 stores the assigned name internally in lowercase only. If you assigned "G120-DRIVE-01" in TIA Portal, the device will store it as "g120-drive-01". PROFINET name comparison is case-insensitive, so the AR will still come up.

To assign the name to the physical device, right-click the G120 in the network view and select Assign PROFINET device name. Confirm the MAC address matches the sticker on the CU, then click Assign name. The "Search" function in this dialog will only show devices that have no name or whose name does not match a configured partner; it is normal for an already-assigned drive to be invisible until the filter is changed.

Name uniqueness. A PROFINET device name must be unique on the subnet. Two drives both called "g120" will cause the second one to fail AR establishment. Adopt a naming scheme such as g120-<area>-<number> and document it.

5. Telegram Selection

The cyclic PZD telegram defines the layout of the process data that is exchanged every PROFINET cycle. The G120 with CU240B-2/E-2 supports the following standard telegrams (selection in slot 0, subslot 1 of the device view):

Telegram Words in Words out Typical use
1 1 (STW1 + NSOLL_A packed) 1 (ZSW1 + NIST_A packed) Simple speed setpoint, 16-bit
2 2 (STW1 + NSOLL_B) 2 (ZSW1 + NIST_B) Speed control, 32-bit setpoint with ramp generator in the drive
3 3 (STW1 + NSOLL_B + STW2) 3 (ZSW1 + NIST_B + ZSW2) Speed control with supplementary control word 2
4 4 4 Speed control with two setpoints and ramp
20 6 6 Speed control with extended words for technology controller / torque limit
352 6 6 Speed control, 32-bit, with torque limit and actual torque
999 Freely configured (1…16) Freely configured (1…16) BICO interconnect for advanced applications

For a first integration on the S7-1200, pick telegram 1 (default) or telegram 2. Telegram 1 fits the S7-1200 Motion Control axis (TO_Axis_PTO or TO_SpeedAxis) for firmware V4.0 and later. Telegram 2 fits the classic driveLib / SINA_SPEED blocks for older firmware. The S7-1200 always communicates on 16-bit boundaries, so the IO data width must be a multiple of two words.

6. Programming Path A — driveLib / SINA_SPEED (Firmware V3 and Earlier)

For a S7-1200 with firmware V3 or a project that needs fine control over the control word and status word, the Siemens example project 70155469 provides a library of function blocks built on top of SINA_SPEED (FB 285). The blocks ship in the Drive_Lib_S7_1200_1500 library and abstract the packing/unpacking of NSOLL_A / NIST_A.

Minimum tag map (telegram 1) in the S7-1200 I/O image:

  • Inputs: IW64 — ZSW1 (status word 1), IW66 — NIST_A (actual speed, normalised)
  • Outputs: QW64 — STW1 (control word 1), QW66 — NSOLL_A (speed setpoint, normalised)

Control word 1 (STW1) bit assignments that must be set to start the drive:

  • Bit 0 = ON / OFF1 (rising edge latches)
  • Bit 1 = OFF2 (1 = no coast stop, must be held high)
  • Bit 2 = OFF3 (1 = no quick stop)
  • Bit 3 = Enable operation (pulse enable)
  • Bit 4 = Enable ramp generator
  • Bit 5 = Unfreeze ramp generator / continue
  • Bit 6 = Enable speed setpoint
  • Bit 10 = Control by PLC (must be 1)

Typical start sequence in SCL on the S7-1200:

// Drive control word sequence
IF bStart AND NOT bFault THEN
    stw1.%X0  := TRUE;   // ON / OFF1
    stw1.%X1  := TRUE;   // No coast stop
    stw1.%X2  := TRUE;   // No quick stop
    stw1.%X3  := TRUE;   // Enable operation
    stw1.%X4  := TRUE;   // Enable ramp generator
    stw1.%X5  := FALSE;  // Freeze ramp generator (no-op at start)
    stw1.%X6  := TRUE;   // Enable setpoint
    stw1.%X10 := TRUE;   // Control by PLC
ELSE
    stw1 := 16#047E;     // Operational disable pattern: bit0=0 (OFF1), bit1=0 (OFF2)
END_IF;

// Speed setpoint, normalised to 0x4000 = 100 %
iSpeedSetpoint := REAL_TO_INT(fSpeedPercent * 163.84);

7. Programming Path B — Technology Object Axis (Firmware V4.0+)

From CPU firmware V4.0, the S7-1200 supports a Speed axis or Positioning axis technology object (TO) that can be linked to a PROFINET drive using a standard telegram directly. The TO handles the STW1 bit pattern, ramp generation, and the limit switches, so the application code no longer needs to pack/unpack the process data.

  1. In the project tree, expand Technology objects → Add new object → Motion Control → TO_SpeedAxis.
  2. In the axis configuration, set Drive → Drive type to "PROFIdrive / PROFINET drive".
  3. Select the G120 IO device that is already inserted in the network view, and assign the telegram that the drive is configured for (1 or 2).
  4. Configure Mechanical: lead screw pitch or load gear ratio, maximum speed, direction of rotation.
  5. Configure limits: software limit switches (where applicable), jerk limit, emergency stop deceleration.
  6. Call MC_Power in OB1 with the axis DB, then MC_MoveVelocity or MC_MoveRelative to command motion. The TO will write the appropriate STW1 and NSOLL_A words automatically.
Mixing the two paths. Do not call SINA_SPEED (or any driveLib block) on the same axis that is bound to a Technology Object. The TO owns the PZD words. A double-write to QW64 / QW66 will fault the drive or freeze the axis.

8. Commissioning the Drive Side

Before going on PROFINET, the G120 must be commissioned with the SINAMICS Startdrive commissioning tool (or the BOP-2 / IOP-2 on the drive) so that the motor data, current limits, ramp times, and command sources match the application.

  1. Perform a quick commissioning (p0010 = 1) from the BOP-2: enter motor voltage, current, power, cos φ, and frequency from the motor nameplate. The drive will auto-calculate the field-weakening and current controller parameters.
  2. Set p0700 = 6 (command source = PROFINET / fieldbus) and p1000 = 6 (setpoint source = PROFINET / fieldbus) so that the cyclic telegram is the active source.
  3. Set p0922 = 1 (or the telegram number selected in TIA Portal) to enable the matching standard telegram.
  4. Run motor identification (p1900 = 2) at the next ON command so the current controller and encoder model are tuned to the connected motor.
  5. Save with p0971 = 1 so parameters survive a power cycle.

9. Verification Checklist

After downloading the TIA Portal project and the SINAMICS parameters, verify the following in this order:

  1. Online → Accessible nodes shows the S7-1214 and the G120 with their respective IP addresses and the assigned PROFINET name.
  2. On the G120, r0021 (PROFINET state) shows "Connected" / r0899 (operating display) shows the expected operating mode.
  3. The S7-1200 diagnostics buffer (Online & diagnostics → Diagnostics buffer) contains no PROFINET IO fault entries. A typical fault is "IO device failure" (Event ID 0x013C) which usually means a name mismatch or an offline Telegram setting.
  4. Force QW64 = 16#047E and observe that the G120 status word returns 0x0E31 (Ready to switch on, switched on, operation enabled, status healthy). A return of 0x0E34 indicates a fault is active — read the drive's r0947 fault code via the Starter / Startdrive online trace.
  5. Set QW66 = 16#4000 (50 % speed) and confirm the motor accelerates to half the configured maximum at the configured ramp rate.
  6. Drop QW64 to 16#047E and confirm the motor ramps down on OFF1 and not on OFF2 / coast stop.

10. Troubleshooting Matrix

Symptom Drive side check PLC side check Resolution
G120 does not appear in "Accessible nodes" PROFINET link LED on CU port P1 / P2 PC network adapter on same subnet, no VLAN filter Replace cable, disable Windows firewall PROFINET exception
AR (Application Relationship) does not come up; "IO device failure" in PLC diagnostics r8842 (name of station from controller) versus device name in TIA Portal Right-click drive → "Assign PROFINET device name" Re-assign the name; the G120 stores the name in lowercase, but matching must be exact character-for-character after lowercasing
AR comes up, no cyclic data exchange (red SF LED on drive, PLC shows "IO device OK" but PZD words stay at 0) p0922 must match the telegram configured in TIA Portal; p2042 must show the expected PZD length Device view → Telegram slot configuration; start address aligned on word boundary Set p0922 to the same telegram as in TIA Portal; restart the drive
Drive trips with F07901 "Motor blocked" or F07902 "Drive: Motor stalled" Check whether mechanical load is excessive during ramp; r0046 status bits Verify the ramp parameters in p1120 / p1121 are not too steep for the connected load Increase p1120 (ramp-up time) and p1121 (ramp-down time); check current limit p0640
Drive refuses to start; STW1 bit 10 (PLC control) is not latched Check r0054 (active control word) in trace Confirm STW1 bit 10 is held TRUE in the PLC program Set bit 10 in the control word permanently while the drive is enabled
Motor rotates in the wrong direction p1820 reverses the rotation direction in the drive Swap NSOLL_A sign on the PLC side or swap two motor phases (U, V) Change p1820 = 1 or invert the setpoint sign in the PLC
F08501 "PROFINET communication fault" Watchdog time p2042 / p0922 mismatch; check r2050 telegram length Update time set too tight for the IO cycle Set PROFINET update time to at least 2 ms; match p0922 to TIA selection
Technology Object axis faults with "Configuration error" The drive's telegram does not match the TO's expected telegram TO configuration → Telegram selection Set p0922 = 1 and TO Telegram to 1; the TO needs a 16-bit speed setpoint (NSOLL_A)

11. Sample Tag Mapping Reference

The following table summarises the default process data mapping for telegram 1 and 2 on the G120 with a CU240B-2 / CU240E-2 PN. The addresses shown are relative to the IO start address configured in TIA Portal — substitute the base for your own project.

Direction Word offset Telegram 1 Telegram 2
PLC → drive 0 STW1 (control word 1) STW1
PLC → drive 2 NSOLL_A (speed setpoint, 16-bit) NSOLL_B (speed setpoint, 32-bit, high word)
PLC → drive 4 — NSOLL_B low word
drive → PLC 0 ZSW1 (status word 1) ZSW1
drive → PLC 2 NIST_A (speed actual, 16-bit) NIST_B (speed actual, 32-bit, high word)
drive → PLC 4 — NIST_B low word

12. Frequently Asked Questions

Do I need the S7-1200 driveLib library, or can I use a Technology Object?

From CPU firmware V4.0 onward, the Technology Object path (TO_SpeedAxis or TO_PositioningAxis bound to the G120 PROFINET device) is the recommended approach. The driveLib / SINA_SPEED blocks from the example project 70155469 are still maintained for projects that require fine control of STW1 bits or run on older firmware V3 CPUs.

Does the PROFINET device name have to be lowercase?

You can enter the name in TIA Portal in any case, but the G120 stores the name internally in lowercase. PROFINET name comparison is case-insensitive, so "G120-DRIVE-01" in engineering and "g120-drive-01" in the device will still establish the AR. Just make sure the name is unique on the subnet.

Which standard telegram should I pick for a simple V/f or speed-controlled pump?

Use telegram 1 (one PZD word in, one out, 16-bit normalised speed). It is the default and maps cleanly to either the S7-1200 Technology Object or the SINA_SPEED function block. Move to telegram 2 only when the application needs 32-bit setpoint resolution or the drive's internal ramp generator (ramp parameters p1120 / p1121).

What firmware versions are supported by the example project 70155469?

The example project bundles projects for several firmware combinations of S7-1200 and G120, and the latest revision of the zip covers CPU firmware V4.x and G120 CU firmware V4.7 SPx. The full revision history is in the entry's "Changes" tab. For a V5.x G120, re-install the matching GSDML and verify the telegram mapping against the G120 operating instructions 109478828.

My drive faults with F08501 (PROFINET communication error) right after start. What is the cause?

F08501 is raised when the cyclic PROFINET watchdog expires. The two most common root causes are a Telegram mismatch (p0922 on the drive does not match the telegram configured in TIA Portal) and a PROFINET update time shorter than the drive can service (set the update time to at least 2 ms in the device properties of the G120 in TIA Portal). Check r2050 (telegram length) and p0922 should agree, and confirm the IO device is not in a sub-network with a non-IRT switch on a path that needs IRT.

Back to blog