Simulating the SINAMICS G120 in TIA Portal with Standard Telegram 1
Engineers commissioning a SINAMICS G120 from a SIMATIC S7-1200 or S7-1500 over PROFINET frequently run into a wall when they try to validate the run-command path, control word, and speed setpoint without physical hardware. The drive does not respond, NSOLL_A stays at zero, and the status word ZSW1 never sets bit 2 Operation Enabled. The root cause is almost always a mismatch between the telegrams the user thinks they are sending and the telegrams the technology object and the drive actually use. This reference walks through the full setup of Standard Telegram 1 in TIA Portal, shows the correct way to bring the TO_SpeedAxis into simulation, and documents the bit mapping and scaling rules so that the G120 finally responds to a run command.
1. Prerequisites
Before touching the telegram, confirm the engineering environment is consistent. Mixing firmware, GSDML, and TIA Portal versions is the most common source of the drive is not responding symptom.
- TIA Portal V16 or later (V17/V18 recommended for current G120 firmware). Startdrive is integrated starting V15.1.
- SIMATIC S7-1500 or S7-1200 CPU with motion-control firmware (F-CPU also valid; T-CPU for SINAMICS Safety not required for this path).
- Control Unit SINAMICS G120 with CU240E-2 PN, CU240E-2 PN-F, CU250S-2 PN, or CU230P-2 PN. The -2 PN suffix is required for PROFINET.
- PM240-2 power module (or compatible PM330/PM340).
- Drive firmware V4.7 SP3 or later (V5.1 for current Startdrive support). Drive objects that match the Startdrive HSP.
- GSDML matching the CU. With Startdrive installed and the HSP for the CU imported, the G120 appears in the hardware catalog; manual GSDML import is only required for non-listed variants.
- PLCSIM Advanced (preferred) for the S7-1500 path; PLCSIM is acceptable for the S7-1200. PLCSIM alone cannot bring a real drive online, but it is sufficient to exercise the TO_SpeedAxis.
ZSW1 will read 16#0000 permanently. Verify r0018 on the drive side or Drive diagnostic > Telegram on the Startdrive inspector after the first PROFINET name assignment.2. Standard Telegram 1 PZD Layout
Standard Telegram 1 is the most compact speed-control telegram. It uses four process data words (PZD) - two from the PLC to the drive (controller output) and two from the drive to the PLC (controller input). When you insert the G120 in the device configuration and select Standard telegram 1, PZD-2/2, TIA wires the following layout automatically.
| Direction | PZD slot | Abbreviation | Meaning | Width |
|---|---|---|---|---|
| PLC → Drive | 1 | STW1 | Control Word 1 | 16 bit |
| PLC → Drive | 2 | NSOLL_A | Speed setpoint A (scaled) | 16 bit |
| Drive → PLC | 1 | ZSW1 | Status Word 1 | 16 bit |
| Drive → PLC | 2 | NIST_A | Actual speed value A (scaled) | 16 bit |
The telegram is the same regardless of whether you wire it through a technology object or send the words directly from a data block. The technology object provides a normalized interface; it converts the engineering units (rpm, %) into the raw 16#0000..16#7FFF range the drive expects.
3. Configuring the SINAMICS G120 in the Project
- Open the TIA Portal project and switch to the device configuration of the S7 CPU.
- From the hardware catalog, navigate to Drives & starters → SINAMICS → G120 → ... → CU240E-2 PN (or your variant).
- Drag the CU onto the PROFINET subnet of the CPU. TIA assigns a default IP and PROFINET device name - leave them for now, they will be reassigned later.
- Open the device view of the G120 and switch to the Device view → Properties → Telegram configuration tab.
- Set Standard telegram 1, PZD-2/2 on the PROFINET interface. If a Siemens telegram such as Telegram 352 is shown by default, replace it. Telegram 1 is the only one the TO_SpeedAxis expects for simple speed control.
- Confirm the slot assignment: Subslot 1 maps to Control Unit / additional PZD; the two PZD in and two PZD out are wired in the order shown above.
- Save and compile the hardware configuration.
For users without a real CU connected, the device can be added purely as a project object. The G120 will appear in the topology with a yellow warning icon because no real device is reachable. That is expected and is what enables simulation.
4. Inserting and Configuring the TO_SpeedAxis
The technology object is the only object that lets you bring the speed-control loop into simulation without physical hardware.
- In the project tree, expand the S7 CPU, then Technology objects → Add new object → Motion Control → TO_SpeedAxis.
- Assign a name, for example
TO_G120_Spindle. - In the configuration dialog, link the TO to the G120 PROFINET device. The wizard auto-fills the data block name, the axis name, and references to the telegram - verify they match Telegram 1.
- Open the TO configuration and switch to Hardware interface:
- Drive telegram: Standard telegram 1, PZD-2/2.
- Control word / Status word mapping: Siemens telegram 1 preset.
- Switch to the Mechanics tab and set the load gear, motor encoder, and any mechanical conversion. For simulation only, leave Encoder type at Simulation.
The most important step is enabling simulation mode. The TO will not respond to a run command without it.
- Open TO_SpeedAxis → Configuration → Simulation.
- Tick Activate simulation.
- Accept the warning: No encoder signals are processed in simulation mode; the actual speed is calculated from the setpoint.
- Download the project to PLCSIM or to the real CPU.
F08502 on the S7, F08501 on the drive) because no drive replies. With simulation active, the TO ignores the missing cyclic frame and lets you exercise control word, setpoint, and ramp behavior locally.5. Speed Setpoint Scaling: 4000h and p2000
SINAMICS scales the setpoint and the actual speed against the reference speed defined in p2000. The 16-bit value in PZD2 is a normalized representation:
| NSOLL_A / NIST_A value | Hex | Decimal | Meaning |
|---|---|---|---|
| +100% of p2000 | 0x4000 | 16384 | Forward full speed (e.g. 1500 rpm if p2000 = 1500) |
| 0% | 0x0000 | 0 | Standstill (drive may still be enabled) |
| -1% | 0xC001 | -16383 | Minimum reverse |
| -100% of p2000 | 0xC000 | -16384 | Reverse full speed |
| 0x4001..0xBFFF | n/a | n/a | Outside valid range; drive holds last valid setpoint or faults depending on p1150 settings |
Set p2000 to the reference speed you want at 100% of NSOLL_A. Typical values: 1500 rpm for a 50 Hz motor on a 4-pole machine, 1800 rpm for 60 Hz, or the motor nameplate rpm if you prefer 100% = rated speed.
Quick conversion helpers for the data block or for direct HW writes:
-
rpm → NSOLL_A:
NSOLL_A = round(rpm / p2000 * 16384) -
NSOLL_A → rpm:
rpm = NSOLL_A * p2000 / 16384 -
% (signed) → NSOLL_A:
NSOLL_A = round(percent * 163.84)
The TO_SpeedAxis hides this conversion. When you call MC_MoveVelocity with Velocity = 750.0 on a 1500-rpm axis, the TO writes 0x2000 (= 8192, = 50%) into NSOLL_A automatically. If you bypass the TO and write the telegram directly, you must apply the formulas above.
6. Control Word STW1 Bit Mapping
The control word in PZD1 follows the PROFIdrive profile (PROFIdrive Application Class 1, AC1). The drive executes a state machine based on the bit pattern; sending individual bits out of sequence causes the drive to refuse the run command. The typical "happy path" bit pattern is 16#047E to 16#047F over a few PLC cycles.
| Bit | Mnemonic | Meaning | Required for run |
|---|---|---|---|
| 0 | ON / OFF1 | Edge 0→1 = close brake, energize | yes |
| 1 | OFF2 | 0 = coast to stop (block pulses) | 1 |
| 2 | OFF3 | 0 = quick stop (ramp p1135) | 1 |
| 3 | Enable Inverter | Pulse enable | yes |
| 4 | Ramp generator enable | Lets NSOLL_A reach the ramp | yes |
| 5 | Unfreeze ramp | 0 = freeze, 1 = run ramp | yes |
| 6 | Setpoint enable | 0 = ignore NSOLL_A, hold speed | yes |
| 7 | Acknowledge fault | 0→1 edge resets faults | 0→1 edge to clear |
| 8 | Reserved | always 0 for AC1 | 0 |
| 9 | Reserved | always 0 for AC1 | 0 |
| 10 | Control by PLC | 1 = PLC is the active controller | 1 |
| 11..15 | Reserved | device-specific | 0 |
The numeric pattern to send a run command is therefore 16#047F (binary 0000 0100 0111 1111). The pattern to stop (controlled, pulse still enabled) is 16#047E. 16#0000 triggers OFF2 (coast to stop).
7. Status Word ZSW1 Bit Mapping
The status word lets you confirm the state transition. Without bit 2 set, the drive has accepted the run command in principle but is not yet ramping. Without bit 3, the drive has rejected it (fault or missing enable).
| Bit | Mnemonic | Meaning |
|---|---|---|
| 0 | Ready to switch on | Power on, electronics OK |
| 1 | Ready to operate | Main contactor may close |
| 2 | Operation enabled | Pulses enabled, motor follows setpoint |
| 3 | Fault present | Bit 7 of STW1 must toggle to clear |
| 4 | OFF2 active | Coast-down requested |
| 5 | OFF3 active | Quick stop requested |
| 6 | Switching on inhibited | Drive waits for ON/OFF1 edge |
| 7 | Alarm present | Drive runs but a warning is active |
| 8 | Speed ≠ 0 (n < n_min) | Standstill flag |
| 9 | Control requested | Drive asks PLC to assume control (1 = PLC in charge) |
| 10 | n reached | Setpoint-actual within tolerance band |
| 11 | I/M/P limit reached | Current, torque, or power limit active |
| 12..15 | Device-specific | Open holding brake, motor overload, direction, inverter overload |
The state transition sequence in the real drive (or simulated by the TO) is:
- Switching inhibited (ZSW1 bit 6 = 1). Drive powers up, waits.
-
Ready to switch on (bit 0 = 1). STW1 =
16#0406. -
Ready to operate (bit 1 = 1). STW1 =
16#0407. -
Operation enabled (bit 2 = 1). STW1 =
16#047F. NSOLL_A accepted.
If the TO simulation is correctly set up, ZSW1 bit 2 will set within 1-2 PLC cycles after STW1 reaches 16#047F.
8. PLC Ladder Logic for the Run Command
Even when the TO_SpeedAxis is in charge of the actual telegram, the run command still has to be issued through the TO. The example below shows the canonical SCL block to start the axis in velocity mode and read back the status.
8.1 Tag declarations
VAR
// Operator inputs
bStartAxis : BOOL; // Run command from HMI
bStopAxis : BOOL; // Coast / ramp stop
bAckFault : BOOL; // Fault reset pulse
lrSpeedRPM : LREAL; // 0..p2000
// Motion control blocks
fbMoveVel : MC_MoveVelocity;
fbStop : MC_Stop;
fbReset : MC_Reset;
fbPower : MC_Power;
// Status
bAxisEnabled : BOOL;
bAxisError : BOOL;
lrActSpeed : LREAL;
wStatusWord : WORD; // Raw ZSW1, useful for diagnostics
wZSW1 : WORD; // Aliased to .StatusWord
END_VAR
8.2 Enable the axis
// MC_Power: enable the drive, leave setpoint control to the TO
#fbPower(
Axis := TO_G120_Spindle,
Enable := TRUE,
EnablePositive := TRUE,
EnableNegative := TRUE,
Override := 100.0
);
#bAxisEnabled := TO_G120_Spindle.StatusWord.X2; // Operation enabled
#wStatusWord := TO_G120_Spindle.StatusWord;
8.3 Move at velocity
IF #bStartAxis AND NOT #bStopAxis THEN
#fbMoveVel(
Axis := TO_G120_Spindle,
Execute := #bStartAxis,
Velocity := #lrSpeedRPM,
Direction := mcDirectionPositive,
Acceleration := 50.0,
Deceleration := 50.0,
Jerk := 0.0
);
ELSE
#fbStop(
Axis := TO_G120_Spindle,
Execute := #bStopAxis,
Deceleration := 100.0,
Jerk := 0.0
);
END_IF;
#lrActSpeed := TO_G120_Spindle.ActualVelocity;
#bAxisError := TO_G120_Spindle.Error;
8.4 Fault reset
#fbReset(
Axis := TO_G120_Spindle,
Execute := #bAckFault AND TO_G120_Spindle.Error,
Restart := TRUE
);
For users who want to verify the run path without the TO, the raw telegram can be sent from a watch table while PLCSIM runs. The example below shows a manual sequence written into a data block called DB_Telegram.
// Word 0 = STW1, Word 1 = NSOLL_A
// 1) Power on, no run: 16#0406, 16#0000
// 2) Ready to operate: 16#0407, 16#0000
// 3) Operation enabled: 16#047F, 16#2000 (= 50% of p2000)
// 4) Stop, ramp down: 16#047E, 16#0000
// 5) Acknowledge fault edge: 16#048F → 16#047E on next cycle
If using the manual approach, you still need the G120 in the hardware configuration so that the slots exist in the process image. The TO is not strictly required to populate the slots, but the hardware must be configured. Without hardware configuration, TIA cannot resolve the telegram addresses.
9. PLCSIM and PLCSIM Advanced Limitations
The discussion specifically calls out that no real drive can be simulated by TIA Portal or PLCSIM. This is technically correct for the drive object itself, but the S7 side can be exercised fully. The matrix below documents what works and what does not.
| Capability | PLCSIM | PLCSIM Advanced | Real G120 + real CPU |
|---|---|---|---|
| Run user program (SCL/LAD/FBD) | Yes | Yes | Yes |
| Motion control TO (simulation mode) | Yes (S7-1500 only) | Yes (S7-1500 / ET 200 SP CPU) | Yes |
| PROFINET frame exchange with real drive | No | No | Yes |
| Drive-side parameter changes (BOP, Startdrive online) | No | No | Yes |
| ZSW1 / NIST_A values | Synthetic, computed by TO | Synthetic, computed by TO | Real feedback from CU |
| STW1 / NSOLL_A writes | Accepted by TO, no drive | Accepted by TO, no drive | Delivered to drive |
| Fault injection (F08502, F08501) | Possible via TO API | Possible via TO API | Real drive faults |
For a real bench test, use the SINAMICS Startdrive commissioning tool to verify that the CU reaches Run with a manual STW1 cycle before involving the S7 program. The Startdrive control panel writes the same bits the PLC would send and provides immediate feedback on the drive side.
10. Going Online and Reading Status
When the simulation runs and the run command still does not appear to take effect, the most productive workflow is to compare the values PLCSIM actually puts on the wire against what the TO thinks the drive is doing. Use the watch tables below as a starting point.
| Symbol | Address (typical) | Expected on healthy run |
|---|---|---|
| TO_SpeedAxis.StatusWord | DB axis data block |
16#0737 - bits 0,1,2,4,5,8,9,10 set |
| TO_SpeedAxis.ActualVelocity | DB axis data block | equals lrSpeedRPM within tolerance |
| TO_SpeedAxis.Error | DB axis data block | FALSE |
| TO_SpeedAxis.ErrorID | DB axis data block | 16#0000 |
| Hardware ID of telegram slot | device configuration | Submodule diagnostic must be green |
For the Startdrive path (real drive), the equivalent inspection is under Drive > Communication > Telegram, which displays the raw PZD words and lets you force STW1 from a checkbox list. The control panel is a fast way to confirm the drive itself is healthy before blaming the PLC.
11. Common Faults and Resolution Matrix
| Symptom | Likely cause | Resolution |
|---|---|---|
| Drive not responding to any change in run command | Telegram mismatch, e.g. Telegram 352 selected instead of Telegram 1 | Re-select Standard telegram 1, PZD-2/2 on the PROFINET interface; recompile |
| Cannot go online with the drive | No physical connection and no simulation flag on the TO | Enable TO_SpeedAxis → Configuration → Simulation in the TO |
| STW1 looks correct but ZSW1 bit 2 stays 0 | STW1 bit 10 (control by PLC) is 0, drive ignores PLC | Force STW1 = 16#047F minimum; check that p0850..p0854 on the drive allow the bit pattern |
| Drive acknowledges run but motor does not turn | NSOLL_A is 0 or outside 0x0000..0x7FFF | Verify speed scaling; 750 rpm on a 1500-rpm axis must be 0x2000
|
| Motor spins but at wrong speed | p2000 does not match the motor nameplate | Set p2000 to reference speed, then Copy RAM to ROM
|
| Direction reversed unexpectedly | Bit 14 of STW2 not used for AC1 but ZSW1 bit 14 reports direction | For AC1, drive direction is set by the sign of NSOLL_A |
| F08501 on the S7 (PROFINET failure) | No physical drive, simulation not active | Activate TO simulation mode |
| F08502 (telegram failure) | Submodule diagnostic red in TIA | Re-assign PROFINET device name, restart the CU |
| F30002 (DC link undervoltage) | Real drive power not applied | Apply 400 V (or 230 V for 1-ph variants); the simulator does not flag this |
| Speed setpoint from PLC is 0..27648, drive ignores it | Wrong range - 0..27648 is the S7 analog I/O range, not the SINAMICS normalized range | Use 0..16384 (= 0x0000..0x4000) and let the TO handle scaling |
12. Verification Checklist
Use this list as the gate before declaring a bench test done.
- The G120 appears in the device configuration with the correct CU type and firmware.
- The PROFINET interface is set to Standard telegram 1, PZD-2/2 and the slots are Inserted in the device overview.
- The TO_SpeedAxis is created and bound to the same PROFINET device/submodule.
- Activate simulation is checked on the TO configuration.
- MC_Power is called with Enable = TRUE; the axis reaches Standstill with Operation enabled.
- STW1 reads
16#047Fon the run command. - ZSW1 reads
16#0737or similar healthy state. - NIST_A reflects the commanded speed within ramp tolerance.
- MC_Stop ramps the drive to standstill with ZSW1 bit 2 = 0, bit 1 = 1.
- MC_Reset on a simulated fault clears the error code to
16#0000. - No F0850x or F3000x diagnostics present on the CPU diagnostic buffer.
13. Notes on Variants and Standards
The information above is documented for the CU240E-2 PN and CU250S-2 PN. Variants such as the G120C follow the same Telegram 1 layout but may differ in the Basic Operator Panel and Smart Access integration. The G120D (distributed) requires a PROFINET cable rated for trailing; the telegram layout itself is identical. For drives outside the -2 PN family, verify the supported telegrams in the Startdrive device configuration - older CU230P-2 variants with firmware below V4.5 may not list Telegram 1 by default and require a free telegram assembly.
Two references are useful for parameter deep dives. The SINAMICS G120 Operating Instructions document the bit fields of STW1 and ZSW1 in detail, and the S7-1500 Motion Control Function Manual documents the TO_SpeedAxis state machine. The exact setpoint scaling is from the SINAMICS Parameter Manual, which lists p2000 and the related normalization ranges.
Which SINAMICS G120 Control Units support Standard Telegram 1 on PROFINET?
All G120 Control Units with the -2 PN suffix support Standard Telegram 1, including CU240E-2 PN, CU240E-2 PN-F, CU250S-2 PN, and CU230P-2 PN. Older CU240B-2 PN variants may require firmware V4.5 or later; check the Startdrive device configuration for the available telegrams.
Can I simulate a real SINAMICS G120 inside PLCSIM or TIA Portal?
No. PLCSIM and PLCSIM Advanced cannot bring a real G120 online because the drive object is not part of the simulated S7 CPU. What you can simulate is the closed-loop speed control inside the technology object. Enable TO_SpeedAxis → Configuration → Simulation to exercise the run command, setpoint, and ramp behavior without a physical drive.
What is the correct scaling for NSOLL_A in Telegram 1?
NSOLL_A is a 16-bit signed value normalized to p2000 (reference speed). The value 0x4000 (= 16384 decimal) equals 100% of p2000 in the forward direction; 0xC000 equals 100% in reverse. Values from 0x4001 to 0xBFFF are outside the valid range. The actual speed NIST_A uses the same scaling so that the PLC can directly compare setpoint and feedback.
Why is the run command not acknowledged even though STW1 looks correct?
Verify the four mandatory STW1 bits for operation enabled: bit 0 (ON/OFF1), bit 1 (OFF2 = 1), bit 2 (OFF3 = 1), bit 3 (pulse enable), and bit 10 (control by PLC = 1). The bit pattern 16#047F sets all five. Also verify that p0850..p0854 on the CU are set to BICO interconnection for the bits the TO uses; default values are correct on a fresh CU.
Why does the drive accept the run command but the motor does not turn?
Check NSOLL_A. If it is 0 or outside 0x0000..0x7FFF, the drive stays at standstill. For a manual write, the rpm-to-NSOLL_A conversion is NSOLL_A = round(rpm / p2000 * 16384). With the TO in charge, call MC_MoveVelocity with the desired rpm; the TO applies the scaling automatically. Confirm p2000 on the drive side matches the axis reference speed configured in the TO.
What is the difference between the 0..27648 range and the 0..16384 range?
0..27648 is the S7 analog I/O normalization used by SIMATIC modules and by the SIMATIC S7-1500 technology objects in their engineering interface. 0..16384 (= 0x0000..0x4000) is the SINAMICS normalization for the 16-bit PZD word in Telegram 1. The TO_SpeedAxis converts between the two so that the user writes rpm and the drive receives the correct scaled integer. Bypassing the TO and writing the wrong range causes the drive to hold the last valid setpoint or to ignore the command entirely.