1. Overview of the SINAMICS G120 Onboard I/O Architecture
The SINAMICS G120 modular drive system consists of two main hardware blocks: a Power Module (PM) that contains the rectifier and inverter, and a Control Unit (CU) that handles communication, closed-loop control, and signal I/O. The CU is the part that exposes the PROFINET interface, the onboard digital inputs (DI), digital outputs (DO), analog inputs (AI), and analog outputs (AO). When a user inserts a G120 PN drive from the TIA Portal hardware catalog, the GSDML describes the drive as a single PROFINET device with a limited set of slots and submodules. This is why the onboard CU I/O does not appear as "AI/AO submodule" the way it does for an ET 200MP AI module: the AI/DI live inside the drive, and you reach them through process data words (PZD) inside a PROFINET telegram, not through discrete I/O slots.
To read a 4-20 mA sensor wired to the CU screw terminals as an Int tag inside the S7-1500 user program, you must:
- Configure the AI signal type and scaling in the CU (via Startdrive or STARTER).
- Add a PZD word to the cyclic PROFINET telegram that carries the AI actual value to the PLC.
- Assign a tag name to the input PZD word in the PLC tag table.
2. Identifying the Control Unit and Onboard I/O Specification
The drive in the source example has the MLFB 6SL3210-1KE24-4UF1, which is a PM240-2 Power Module (22 kW, 400 V class) combined with a CU240E-2 PN Control Unit. The "PN" suffix indicates PROFINET as the fieldbus, and the "E" in 240E indicates the Extended I/O variant. The CU240E-2 PN is documented in the SINAMICS G120 Operating Instructions and provides the following onboard I/O:
| Terminal | Type | Function | CU240E-2 PN Qty |
|---|---|---|---|
| DI 0 / DI 1 / DI 2 / DI 3 | Digital input | PNP/NPN, 24 V | 4 (on basic terminal block) |
| DI 4 / DI 5 | Digital input | PNP, 24 V, failsafe-capable on -2 FS variants | 2 |
| DO 0 / DO 1 / DO 2 | Digital output (relay / transistor) | 24 V, 0.5 A | 3 |
| AI 0 / AI 1 | Analog input | Configurable: 0-10 V, 0-20 mA, 4-20 mA, or Pt1000/Ni1000 (AI0 only) | 2 |
| AO 0 / AO 1 | Analog output | Configurable: 0-10 V or 0/4-20 mA | 2 |
| T1 / T2 | Motor temperature sensor input | PTC, KTY84, Pt1000 | 1 |
The two analog inputs are differential inputs with 12-bit resolution and a 0.1 ms conversion time. AI 0 supports voltage, current, and temperature modes; AI 1 supports voltage and current. For a 4-20 mA sensor signal, configure AI 0 in current mode.
3. PROFINET Telegrams and PZD Payload Structure
SINAMICS drives exchange real-time data with the S7 controller over PROFINET using cyclic PZD telegrams. Each telegram is a fixed-length payload containing 16-bit words:
- Receive PZD (PLC → drive): control word (STW), speed setpoint (NSOLL), torque limit, ramp times, etc.
- Send PZD (drive → PLC): status word (ZSW), speed actual (NIST), current, fault code, and — the key point — any SINAMICS connector (r-parameter) that you interconnect to a PZD slot.
Common standard telegrams supported by the G120 are listed below. The number of PZD words directly determines how many 16-bit tags the PLC can read from the drive per cycle.
| Telegram | PZD in (PLC→drive) | PZD out (drive→PLC) | Typical use |
|---|---|---|---|
| Standard Telegram 1 | 2 (STW1, NSOLL_A) | 2 (ZSW1, NIST_A) | Default speed control |
| Standard Telegram 2 | 4 | 4 | Speed + torque limits |
| Standard Telegram 3 | 5 | 9 | Speed + 8 process data |
| Standard Telegram 20 | 6 | 6 | SIEMENS profile, 6 words each way |
| SIEMENS Telegram 350 | 4 | 4 | Free configuration with IF1 |
| SIEMENS Telegram 352 | 6 | 6 | Free configuration with IF1 |
| SIEMENS Telegram 353 | 2 | 2 | Free configuration with IF1 |
| SIEMENS Telegram 354 | 6 | 6 | Free configuration with IF1 |
| Free telegram (user-defined) | 1-16 | 1-16 | Up to 16 PZD each way, IF1 |
The "free" or "SIEMENS 35x" telegrams are the only paths that allow you to assign the AI actual value to a specific PZD word. Telegram 1 cannot be modified.
4. Hardware Configuration in TIA Portal V17
4.1 Prerequisites
- TIA Portal V17 with Startdrive V17 installed.
- SINAMICS G120 GSDML-V2.35-Siemens-Sinamics-S120-… (or the Startdrive device library entry).
- CPU firmware ≥ 2.9 (S7-1500) or 4.4 (S7-1200) — required for free telegram support.
- Drive firmware matching Startdrive V17 SP1 (CU240E-2 PN V4.7 SP10 or later recommended).
4.2 Step-by-step device insertion
- Open the project in TIA Portal V17 and switch to the Device & Networks view.
- From the hardware catalog, navigate to Drives & Starter Kits → SINAMICS Drives → SINAMICS G120 PN. Use the Startdrive version of the device (not the legacy HSP/GSD), so the drive is commissioned directly from TIA Portal.
- Drag the G120 PN onto the PROFINET subnet. Assign the same IO controller as the S7-1500.
- Click the G120 and open Properties → Telegram configuration. By default, TIA Portal inserts Standard Telegram 1 on IF1 (PROFINET).
- Click Add telegram and select SIEMENS Telegram 352 (or 354). Telegram 352 provides 6 PZD words each direction, which leaves room for control + status + 4 free words.
- Optionally remove Telegram 1 if you do not need the speed profile; you can keep both, in which case the PLC sees two IO areas.
- Compile the hardware configuration. The PLC now has an IO area in the format
IW x...xfor receive PZD andQW x...xfor send PZD. TIA Portal automatically places these in the process image; note the start address in the device overview.
5. Mapping AI 0 and DI 0 to PZD via Free Telegram Configuration
Defining the telegram in TIA Portal only reserves a slot; you must still wire the slot to a real SINAMICS signal. This is done in the Parameter view of the drive (Startdrive) or online in Online & Diagnostics. The relevant parameters are p2051 for IF1 send-PZD interconnection and p2061 for receive-PZD.
5.1 Parameter mapping for AI 0 → PZD out word 3
| Index | Parameter | Meaning | Set value (example) |
|---|---|---|---|
| 0 | p2051[0] | Send word 0 — usually ZSW1 | r0899 (status word 1 default) |
| 1 | p2051[1] | Send word 1 — usually NIST_A | r0063[0] (speed actual) |
| 2 | p2051[2] | Send word 2 — free | r0755[0] (AI 0 scaled) |
| 3 | p2051[3] | Send word 3 — free | r0722.0 (DI 0 status bitfield) |
| 4 | p2051[4] | Send word 4 — free | r0755[1] (AI 1 scaled) |
| 5 | p2051[5] | Send word 5 — free | r0047[0] (motor current actual) |
Note: r0755[0] returns a normalized value with the scaling defined by p0757/p0758/p0759/p0760. By default the AI is bipolar ±10 V scaled to ±100% = ±16384. For a 4-20 mA unipolar loop you must re-scale the AI as shown in §5.3.
5.2 Parameter mapping for DI 0..5 status
SINAMICS provides r0722 as a bit-coded status of all digital inputs. To get the complete DI word into one PZD slot, use bit-to-word conversion. The simplest approach is to interconnect the connector r0722 directly to p2051[n]; the drive packs the bits into the low byte of the word.
- Bit 0 = DI 0, Bit 1 = DI 1, … Bit 5 = DI 5
- Bits 8-15 = DO 0-2 status (DO feedback via r0747) — also packed
If you only need a single DI, mask it in the PLC rather than consuming a whole PZD word.
5.3 Required AI 0 scaling for a 4-20 mA sensor
- Set
p0756[0] = 2— current input, unipolar, 4-20 mA, monitoring enabled. - Set
p0757[0] = 4.0— x1 of the linear characteristic (mA). - Set
p0758[0] = 0— y1 of the linear characteristic (output percent). - Set
p0759[0] = 20.0— x2 of the linear characteristic (mA). - Set
p0760[0] = 100— y2 of the linear characteristic (output percent). - Set
p0761[0] = 4— wire-break threshold equals 4 mA, the loop low end. - Optional: set
p0755[0]smoothing viap0753[0] = 10(10 ms filter).
With the above, the connector r0755[0] outputs a normalized percentage from 0 to 100, with 4 mA giving 0% and 20 mA giving 100%. When the drive places this in a PZD word, the PLC receives an integer where 0 = 4 mA and 16384 = 100% = 20 mA. The scaling factor is 163.84 per mA above 4 mA.
6. Reading the AI Value in the PLC Program
After the telegram is configured and downloaded, the S7-1500 device view shows the input PZD area. In the example, with Telegram 352 starting at IB 100, the layout is:
| PLC Address | Word index | SINAMICS connector | Tag name |
|---|---|---|---|
| IW 100 | 0 | ZSW1 (r0899) | "DB_Drive".StatusWord1 |
| IW 102 | 1 | NIST_A (r0063[0]) | "DB_Drive".SpeedActual_RPM |
| IW 104 | 2 | AI 0 scaled (r0755[0]) | "DB_Drive".Sensor1_Raw |
| IW 106 | 3 | DI 0..5 status (r0722) | "DB_Drive".DI_Status_Word |
| IW 108 | 4 | AI 1 scaled (r0755[1]) | "DB_Drive".Sensor2_Raw |
| IW 110 | 5 | Motor current (r0047[0]) | "DB_Drive".MotorCurrent_Pct |
The simplest scaling from raw integer to engineering units (e.g., pressure in bar) is done in SCL:
// FB_Sensor_Scale
FUNCTION_BLOCK "FB_Sensor_Scale"
VAR_INPUT
RawInput : INT; // 0..16384 corresponds to 4..20 mA
EngMin : REAL; // e.g. 0.0 (bar at 4 mA)
EngMax : REAL; // e.g. 10.0 (bar at 20 mA)
END_VAR
VAR_OUTPUT
EngValue : REAL;
bFault : BOOL; // TRUE if wire break / underrange
END_VAR
VAR
Percent : REAL;
END_VAR
BEGIN
IF RawInput < 0 THEN
// Wire break or AI fault reported by SINAMICS
bFault := TRUE;
EngValue := 0.0;
ELSE
bFault := FALSE;
Percent := INT_TO_REAL(RawInput) / 163.84; // % above 4 mA
// Limit to 0..100 %
IF Percent < 0.0 THEN Percent := 0.0; END_IF;
IF Percent > 100.0 THEN Percent := 100.0; END_IF;
EngValue := EngMin + (Percent / 100.0) * (EngMax - EngMin);
END_IF;
END_FUNCTION_BLOCK
Call the FB in the cyclic OB1 with Sensor1_Raw as input:
"Inst_Sensor1"(RawInput := "DB_Drive".Sensor1_Raw,
EngMin := 0.0,
EngMax := 10.0,
EngValue => Pressure1_bar,
bFault => Sensor1_Fault);
7. Commissioning with Startdrive
- In the project tree, right-click the SINAMICS G120 PN → Commissioning. Startdrive opens an online connection to the drive via PROFINET.
- Open Parameter view and filter by
p0756,p0757,p0758,p0759,p0760,p0761. Apply the values from §5.3. - Filter by
p2051and verify the send-PZD interconnections; in Telegram 352, the default map may already match the standard profile, but free words 2, 3, 4, 5 must be edited. Type the parameter number (e.g.,755[0]) directly into the Signal source field. - Click RAM → ROM (or Copy RAM to ROM) to persist the parameter changes into the CF card of the CU.
- Click Download in the device view to push the telegram configuration to the S7-1500.
- Cycle power on the drive (or run Commissioning → Commissioning wizard) to activate the new telegram mapping.
8. Verification and Diagnostics
8.1 Functional check
- Force a 12 mA test signal at AI 0. The expected PZD value is:
Percent = (12 - 4) / (20 - 4) * 100 = 50 % Raw_PZD = 50 % * 163.84 = 8192 (0x2000) - Open a watch table in TIA Portal online view on the input PZD area.
IW 104should display 8192 (±1 LSB). - Open the SINAMICS online diagnostics (Startdrive → Diagnostics → Status words).
r0755[0]should display 50.0 %.
8.2 PROFINET diagnostics
- F08501 — PROFINET communication fault. Cause: telegram changed but PLC not recompiled.
- F08502 — Sign-of-life timeout. Cause: bus cycle > configured watch-dog (p2047).
-
F08510 — Send-PZD configuration error. Cause:
p2051index points to a non-existent connector. -
A08511 — Receive-PZD configuration error. Cause:
p2061points to a non-interconnectable binector.
Detailed fault codes are in the SINAMICS G120/S120 List Manual (function diagrams 2410, 2420, 2423).
9. Troubleshooting Matrix
| Symptom | Likely cause | First action |
|---|---|---|
| AI 0 raw value stuck at 0 | p0756 not set to 2 (current mode) | Set p0756[0] = 2, RAM→ROM, power cycle |
| AI 0 raw value stuck at 16384 | Sensor current source saturates above 20 mA; or p0761 wire-break threshold mis-set | Measure loop current with multimeter; verify p0759/p0760 |
| AI 0 raw value erratic | No shielding on the analog cable; p0753 smoothing = 0 | Set p0753[0] = 20 (20 ms filter); check shield grounding |
| PLC sees no PZD update | Telegram mismatch between TIA and Startdrive | Recompile HW, re-download to PLC; run commissioning wizard on drive |
| F08510 after parameter change | Connector index in p2051 out of range | Reset p2051[2] = 0, re-enter r0755[0] as 755[0] |
| DI bits all read 0 | DI common (terminal 9) not wired to 24 V, or sink/source setting wrong (p0728) | Check p0728 (0 = sink, 1 = source); verify terminal 9 / 28 wiring |
| DI 4 / DI 5 not present | Different CU variant (CU240B-2 has only DI 0-3) | Check MLFB — 6SL3244-… ordering data, not the PM MLFB |
| AI 1 read-only / wrong range | AI 1 does not support Pt1000 mode | Use AI 0 for temperature; AI 1 is voltage/current only |
| Wire-break alarm F03505 on AI 0 | Current loop interrupted; sensor not powered | Check loop voltage; verify sensor excitation; p0761[0] = 4 sets the threshold |
10. Alternate Approaches and Field Notes
If the drive's onboard AI/DI is genuinely insufficient (e.g., the user needs fast 24-bit AI for a load cell), Siemens recommends installing a separate PROFINET I/O device such as an ET 200SP AI 8xRTD/TC (6ES7534-7QE00-0AB0) or ET 200MP AI 8xU/I/RTD (6ES7531-7KF00-0AB0). The drive's onboard AI is intended for slow process signals (0-10 V, 0/4-20 mA) with 12-bit resolution, not for precision measurement.
For safety-related DI (e.g., STO via PROFIsafe), the user must use a CU240E-2 FS variant (e.g., 6SL3210-1KE24-4AF1) and configure PROFIsafe slots in TIA Portal, not the onboard DI; the FS DI is wired to the F-DI block on PROFINET slot 1. Standard onboard DI 0-3 are not safety-rated.
When commissioning multiple G120 PN drives, the free-telegram pattern is identical: assign a unique PROFINET device name, configure the same Telegram 352, and copy the same parameter set from a master drive using Startdrive's Compare & Parameterize function. The parameter snapshot can be exported as a *.par file and pushed to each new drive, ensuring uniform behavior across a fleet of agitators or pumps.
Why does the SINAMICS G120 AI not appear in the TIA Portal device view like an ET 200SP module?
Because the drive is a PROFINET drive, not a PROFINET I/O device. The CU's onboard I/O is exposed through cyclic process data (PZD) inside the drive telegram, not as IO submodules. You access it by extending the telegram (e.g., to SIEMENS 352) and interconnecting r0755[0] to a free PZD word via p2051.
Which Telegram should I select to add an extra PZD word for the AI?
Use SIEMENS Telegram 350 (4/4), 352 (6/6), 353 (2/2), or 354 (6/6). Telegram 1 (the default) is fixed and cannot be extended. Telegram 352 is the most common free-configuration choice on the G120 PN.
How do I scale the AI 4-20 mA signal so that the PLC integer reads 0 at 4 mA and 16384 at 20 mA?
Set p0756[0]=2, p0757[0]=4.0, p0758[0]=0, p0759[0]=20.0, p0760[0]=100. The connector r0755[0] then outputs 0-100 %, which SINAMICS scales to 0-16384 (0x4000) before placing it in the PZD word. Add 16384 to the integer to recover the raw ADC value if needed.
Can I read all six digital inputs in a single PZD word?
Yes. Interconnect p2051[n] = r0722. The drive packs the DI feedback bits into the low byte of the word (bit 0 = DI 0, bit 5 = DI 5). In the PLC, mask with DI_Status_Word AND 16#003F to extract DI 0-5.
What does F08510 mean and how do I clear it?
F08510 is a send-PZD configuration error — typically a p2051 index points to a non-existent or read-only connector. Reset the affected index to 0, re-enter the correct parameter (e.g., 755[0]), RAM→ROM, and acknowledge the fault. See the SINAMICS G120 List Manual function diagram 2423 for full PZD mapping rules.