Tempo di lettura: 6 minuti

SINAMICS G120C Telegram 1 is the PROFIdrive standard telegram that exchanges two 16-bit words in each direction between a SIMATIC S7-1200 or S7-1500 and the inverter over PROFINET. The PLC sends control word STW1 and speed setpoint NSOLL_A; the drive returns status word ZSW1 and actual speed NIST_A. In the G120C parameter list it is p0922 = 1 (“PZD-2/2”), which is also the factory value. It is the smallest interface that fully runs a speed-controlled motor: once you understand these four words, a pump, fan or conveyor can be driven with a few lines of code or with the Siemens SINA_SPEED block.

STW1 and ZSW1 bit by bit on the G120C

The table follows function diagrams 2442 and 2452 of the G120C List Manual (document A5E33840768). Telegram 1 tables written for other SINAMICS drives give different meanings to some of bits 8 to 12, so check the list manual that matches your firmware.

Bit STW1 (PLC to drive) ZSW1 (drive to PLC)
0 1 = ON, 0 = OFF1 (ramp down) Ready to switch on
1 0 = OFF2 (pulses off, motor coasts) Ready for operation
2 0 = OFF3 (quick stop on the p1135 ramp) Operation enabled
3 Enable operation (pulses) Fault present
4 Enable ramp-function generator No OFF2 active
5 Continue ramp (0 = freeze) No OFF3 active
6 Enable setpoint Switching on inhibited active
7 Acknowledge fault (rising edge) Alarm present
8, 9 Reserved Speed deviation within tolerance; control requested
10 Control by PLC (must be 1) f/n comparison value reached
11 Direction reversal 1 = current/torque/power limit not reached
12 Reserved Holding brake open
13, 14 Motorized potentiometer raise / lower 1 = no motor overtemperature alarm; motor turns forwards
15 Reserved 1 = no power-unit thermal overload alarm

Bits 11, 13 and 15 of ZSW1 are low-active: a 0 is the warning. Four STW1 values cover most machines: 16#047E (ready, OFF1 active), 16#047F (run), 16#0C7F (run reversed) and 16#04FE (acknowledge, with bit 0 low).

Watch the byte order when you address single bits. S7 stores the high byte of a word at the lower address, so with STW1 on %QW64 the control-by-PLC bit 10 is %Q64.2 and the ON bit 0 is %Q65.0. Whole-word access needs no swapping, because PROFINET and the S7 are both big-endian.

Scaling NSOLL_A and NIST_A

Both speed words are signed integers where 16#4000 (16384) equals 100% of the reference speed p2000. The usable range reaches about ±200%. A negative setpoint reverses the motor, unless p1110 or p1111 blocks that direction.

Example with p2000 = 1500 rpm: 900 rpm becomes 900 / 1500 × 16384 = 9830 (16#2666); a NIST_A reading of 8192 means 750 rpm. Do not copy 1500: the automatic parameter calculation (p0340 = 1) overwrites p2000, so read the value from the real drive and use that number everywhere in the PLC.

Procedure: G120C on PROFINET with Telegram 1

  1. In TIA Portal add the G120C PN to the PLC’s PROFINET subnet, either through Startdrive (drive configured inside the project) or through the GSDML file published on Siemens Industry Online Support (SIOS).
  2. In the drive’s device view insert Standard telegram 1, PZD-2/2. Note the I/Q addresses and, in the PLC tags under System constants, the hardware identifier of the telegram.
  3. Assign the PROFINET device name online (Assign device name), checking the MAC address or the flashing LED so you name the right inverter. The IP address comes from the PLC project.
  4. On the drive set p0922 = 1 so it matches the hardware configuration. With a telegram below 999 the drive wires the words itself: p0840 from r2090.0 (ON/OFF1), p1070 from the second received word (NSOLL_A), ZSW1 from r2089[0].
  5. Read p2000 and record it as the reference speed for the program.
  6. Write the control logic, direct or with SINA_SPEED, and call it in OB1 or in a cyclic interrupt OB.
  7. Commission online: send 16#047E and check ZSW1.0 = 1 and ZSW1.6 = 0; then send 16#047F with a small setpoint and check that ZSW1.2 = 1 and NIST_A follows.

Direct access or SINA_SPEED?

SINA_SPEED (FB285) belongs to Siemens’ DriveLib, SIOS entry 109475044. Its documentation requires Telegram 1 and lists S7-300, S7-400, S7-1200 and S7-1500 as supported CPUs.

Aspect Direct %QW/%IW access SINA_SPEED (FB285)
Setpoint Raw INT, you scale it REAL in rpm, scaled with RefSpeed = p2000
Switch-on sequence You write 047E/047F EnableAxis
Fault acknowledge Your edge on STW1.7 AckError
Diagnostics Decode ZSW1 yourself Error, Lockout, Status (16#7002 OK, 16#8401 drive fault, 16#8402 switching on inhibited)
Addressing I/O addresses Hardware ID, read and written with DPRD_DAT/DPWR_DAT
Extra STW1 bits Free Through ConfigAxis; OFF2, OFF3 and the enables are preset

A minimal direct version in SCL, assuming tags on the telegram addresses and p2000 = 1500 rpm:

IF "Belt_Ack" THEN
    "G120_STW1" := 16#04FE;          // bit 7 high, OFF1 low
ELSIF "Belt_Run" AND NOT "G120_ZSW1".%X3 THEN
    "G120_STW1" := 16#047F;          // ON
ELSE
    "G120_STW1" := 16#047E;          // ready, OFF1
END_IF;
"G120_NSOLL" := REAL_TO_INT(LIMIT(MN := -32767.0,
                IN := "Belt_Rpm" / 1500.0 * 16384.0, MX := 32767.0));
"Belt_ActRpm" := INT_TO_REAL("G120_NIST") * 1500.0 / 16384.0;

With SINA_SPEED the same job reduces to wiring the block. HWIDSTW and HWIDZSW both take the hardware ID of the single telegram slot:

"SINA_SPEED_Belt"(EnableAxis := "Belt_Run",
                  AckError   := "Belt_Ack",
                  SpeedSp    := "Belt_Rpm",
                  RefSpeed   := 1500.0,
                  HWIDSTW    := "G120C_Belt~Standard_telegram_1",
                  HWIDZSW    := "G120C_Belt~Standard_telegram_1",
                  ActVelocity => "Belt_ActRpm",
                  Error       => "Belt_Error",
                  Status      => "Belt_Status");

Remember that ConfigAxis bits are shifted against STW1: ConfigAxis bit 0 is OFF2 (STW1.1) and bit 6 is direction (STW1.11). The system constant name above is invented; copy yours from the tag table.

Faults you will meet on site

At a fictional tile plant, Ceramiche Monteluce, a new kiln-exit conveyor ignored every command. STW1 was written bit by bit with the bytes swapped, so bit 10 never reached the drive. Other recurring cases:

  • ZSW1.6 = 1 or Lockout = 1 after power-up or an OFF2: send OFF1 first (bit 0 = 0, or EnableAxis = 0 for a cycle).
  • Fault will not clear: bit 7 needs a 0→1 edge, and the cause must be gone.
  • Speed wrong by a fixed ratio: RefSpeed or your scaling constant differs from p2000.
  • Status 16#8600 or 16#8601: DPRD_DAT/DPWR_DAT failed, usually a wrong hardware ID.

OFF2 and OFF3 sent over the bus are operational stops, not safety functions. An emergency stop needs Safe Torque Off (STO, defined in IEC 61800-5-2), engineered according to the machine’s risk assessment.

Frequently asked questions (FAQ)

Does SINA_SPEED work on an S7-1200?

Yes. The DriveLib documentation lists S7-1200 and S7-1500 with the same interface, using hardware IDs instead of I/O addresses.

Why does the drive stay in switching on inhibited?

After power-up, OFF2, OFF3 or a fault, the drive waits for an OFF1 state with OFF2 and OFF3 inactive. Send 16#047E before 16#047F.

When is Telegram 1 not enough?

When you want current, torque or fault codes cyclically. The G120C also offers telegrams 20 (PZD-2/6), 350 (PZD-4/4), 352 (PZD-6/6), 353 and 354 (with the PKW parameter channel) and 999 for free BICO interconnection.

Do I need Startdrive?

No. The GSDML file is enough for communication, and parameters can be set from an operator panel. Startdrive keeps drive commissioning and PLC project in one place.

Comunicazione industriale: protocolli e OPC UA

Fai parlare PLC, HMI e PC con i protocolli giusti.

Corso Protocolli (member)

OPC UA: Infarinatura OPCUA
Libro: Reti industriali con TIA Portal

IT EN