Problem Overview
The SINA_SPEED function block from the Siemens DriveLib library is the standard application block used in TIA Portal to cyclically control SINAMICS drives (notably the G120 family) from a SIMATIC S7-1200 or S7-1500 controller over PROFINET. The block is referenced in the official Siemens application document "Controlling a speed axis with the SINA_SPEED block" (SIOS ID 109485727), and is also used for Technology Modules such as the ET 200SP F-TM StepDrive as described in the F-TM StepDrive SINA_SPEED programming guide.
When commissioning this block on a CPU 1214C DC/DC/DC with a SINAMICS G120 with CU240E-2 PN, two diagnostic IDs are frequently encountered in the field:
- DiagID 80B1 — length of the RECORD source range is shorter than the slave output length.
- DiagID 8093 — the configured hardware identifier (HWID) address does not match a valid PROFINET slot/submodule.
Both errors almost always originate in the way the symbolic I/O addresses of the PROFINET telegram are passed to the SINA_SPEED block, or in the length of the data buffers supplied to DPWR_DAT and DPRD_DAT. This guide walks through root cause analysis, the symbol selection rules, and the verification steps required to clear both faults.
System Topology and Telegram Layout
The reference architecture from the Siemens SIOS document is shown below.
The standard telegram 1 used with the G120 has a fixed payload of 6 process data words in each direction. The mapping is fixed by the G120 firmware and cannot be changed at the controller side without reconfiguring the drive device in TIA Portal / SINAMICS Startdrive.
| Word | Direction | Signal (drive-side) | PLC symbol name (default) |
|---|---|---|---|
| PZD1 | PLC → Drive | STW1 (control word 1) | HWIDSTW[0] / "Telegram 1" STW |
| PZD2 | PLC → Drive | NSOLL_B (speed setpoint) | HWIDSTW[2] |
| PZD3 | PLC → Drive | Reserved / free interconnect | HWIDSTW[4] |
| PZD4 | Drive → PLC | ZSW1 (status word 1) | HWIDZSW[0] |
| PZD5 | Drive → PLC | NIST_B (speed actual) | HWIDZSW[2] |
| PZD6 | Drive → PLC | IAIST_GL (current) | HWIDZSW[4] |
SINA_SPEED Block Interface
The block ships inside the DriveLib V4.x and later, integrated as a global library in TIA Portal. The interface shown below is taken from the parameter description in the Siemens SIOS document 109485727.
| Pin | Type | Meaning | Common mistake |
|---|---|---|---|
| HWIDSTW | HW_IO | Symbolic HW identifier of the output telegram (controller → drive). Expects the telegram symbol on the PROFINET device, not the Access Point symbol of the drive head module. |
Wiring the Access Point / head module symbol → yields 8093. |
| HWIDZSW | HW_IO | Symbolic HW identifier of the input telegram (drive → controller). Same rule as HWIDSTW. | Wiring a non-telegram submodule → yields 8093. |
| AxisNo | INT | Drive object number (BICO source r3985). For a single-axis G120, always 1. | Setting >1 on a single-axis CU → drive-side fault F08501. |
| EnableAxis | BOOL | ON/OFF1 (bit 0 of STW1). | Forced TRUE without ramp enable → drive remains in "Switching on inhibited". |
| SpeedSp | REAL | Speed setpoint in rpm (normalized to p2000). | Setpoint in 1/min vs. 1/s confusion. |
| RefSpeed | REAL | Reference speed (drive parameter p2000) for internal scaling. | Wrong p2000 value → actual speed scaling error. |
| ConfigAxis | BOOL | One-shot to apply new AxisNo/RefSpeed. | Left permanently TRUE → drive re-initializes every cycle. |
| DiagId | WORD | Error code returned by the internal DPWR_DAT/DPRD_DAT calls. |
Reported but not monitored in the application. |
| Error | BOOL | TRUE while DiagId <> 0. | Not used to latch a stop reaction. |
Root Cause Analysis — Error 80B1
DiagID 80B1 is the standard PROFINET diagnostic identifier returned by the DPWR_DAT and DPRD_DAT SFCs. The exact wording of the S7-1200 system error is:
"Length of the RECORD source range is shorter than the slave output length."
Internally SINA_SPEED constructs a RECORD that covers the full 6-word (12-byte) payload of telegram 1. If the user-supplied source range on the data block is smaller than 12 bytes — for example, a P#DBx.DBX0.0 WORD 4 (8 bytes) — the system firmware rejects the write with 80B1.
Common construction mistakes that produce 80B1:
- Declaring the I/O area as a 4-word array when the G120 is configured for the 6-word standard telegram.
- Using telegram 2 or telegram 3 on the G120 side while the S7-1200 buffer was sized for telegram 1 (or vice versa).
- Defining an ANY pointer of
BYTE 8for a free telegram with 10 words (20 bytes). - Re-using a residual buffer that was created for a different axis (e.g. a 4-word SINA_SPEED for a V90 instead of the 6-word SINA_SPEED for a G120).
Root Cause Analysis — Error 8093
DiagID 8093 means the symbolic HW identifier supplied at HWIDSTW or HWIDZSW does not match a configured PROFINET submodule of the G120 head module.
The SINA_SPEED block does not communicate with the drive "head module" (the G120 itself, slot 0). It communicates with the PROFINET submodule that owns telegram 1, which is automatically inserted by TIA Portal / SINAMICS Startdrive as slot 1 / submodule 1. The block therefore expects the user to wire the telegram symbol, e.g.:
-
"G120_Head"~"Telegram 1"~STW— controller → drive process data -
"G120_Head"~"Telegram 1"~ZSW— drive → controller process data
Wiring the Access Point / head module symbol itself (the default symbol that the user sees first when the device is added) is a very common commissioning mistake. The user originally wired:
-
HWIDSTW= "G120_Head"~I — wrong, this is the Access Point / status area of the head module. -
HWIDZSW= "G120_Head"~I — wrong, same root cause.
After correction, both pins point to the PROFINET telegram 1 submodule, the diagID cleared, but the user still observed an 8093 on one of the remaining inputs. This is the second classic variant of the error:
- A leftover or duplicate device from a previous project is still online and is responding to the IO-AR with a different submodule. Remove the duplicate and download the hardware configuration again.
- The HW identifier is the "absolute" address, but the project has been re-compiled and the absolute identifier changed. After any hardware change, recompile and re-download the S7-1200 program so the new HW identifiers are re-resolved.
SINA_SPEED with a different DB layout or the free DPWR_DAT / DPRD_DAT direct access pattern. See the SIOS document 109485727 for the supported telegram list.Step-by-Step Resolution
1 — Verify drive-side telegram configuration
- Open the G120 in SINAMICS Startdrive inside TIA Portal.
- In the device view, select the head module → Properties → PROFINET interface → Telegram configuration.
- Confirm that "Standard telegram 1, PZD-6/6" is enabled and assigned to the cyclic data exchange.
- Save and compile, then download the drive project. After download, parameter r2075[0] on the CU should report 1 and r2076[0] should report 6.
2 — Wire the correct symbols to SINA_SPEED
- Open the program block that contains the
SINA_SPEEDinstance DB. - Click into the
HWIDSTWinput. Delete the current reference. - Open the project tree → Devices & networks → G120 → Telegram 1 and drag the "STW" entry onto the
HWIDSTWinput. The variable name now resolves to the PROFINET telegram 1 output area. - Repeat for
HWIDZSWusing the "ZSW" entry of the same Telegram 1 submodule. - Compile the S7-1200 program. Any unresolved symbol appears in red and must be fixed before download.
3 — Match the RECORD length to the slave
The SINA_SPEED block itself builds the correct RECORD internally for telegram 1, so once the symbol is correct the data length will follow. If you are using the lower-level DPWR_DAT / DPRD_DAT directly (e.g. with a custom block), the RECORD length must be set as follows:
| Standard telegram | PZD words (each direction) | RECORD length (bytes) | RECORD length (WORD) |
|---|---|---|---|
| 1 | 6 / 6 | 12 | P#... WORD 6 |
| 2 | 4 / 4 | 8 | P#... WORD 4 |
| 3 | 5 / 9 | asymmetric (in 10 / out 18) | P#... WORD 9 / WORD 5 |
| 5 | 9 / 9 | 18 | P#... WORD 9 |
| 102 | 6 / 6 | 12 | P#... WORD 6 |
| 105 | 10 / 10 | 20 | P#... WORD 10 |
4 — Recompile and download
- In the S7-1200 project tree, right-click the device → Compile → Hardware and software (rebuild all).
- Download the configuration. TIA Portal will report the new HW identifiers if they changed.
- After download, go online with the S7-1200. Open the
SINA_SPEEDinstance DB and monitorDiagId. The value must return 0 within one PROFINET update cycle (typically 1–4 ms).
Verification
To prove the faults are cleared and the SINA_SPEED block is operating correctly, perform the following checks with the controller online and the drive de-energised (or in "switching on inhibited"):
-
DiagId monitor —
DiagId = 16#0000at all times, andError = FALSE. If the value latches non-zero, latch it and check the table below. -
STW echo — Write
EnableAxis = TRUE(bit 0 of STW1) and confirm in Startdrive online → r2089[0] that the value 16#047E is present (ready to switch on, with the standard STW1 mask for OFF1 + no coast-down + no quick stop). - ZSW reading — The first ZSW1 word read back from the drive should be 16#0E31 or similar (ready, no fault, no warning). Drive must report r899 = 0 in the parameter view.
- Online & diagnostics — Right-click the G120 in the device view → Online & diagnostics → PROFINET diagnostics. The status of telegram 1 should be "OK" and no AR (Application Relationship) errors should be present.
- Watch table — Set up a watch table on the telegram 1 inputs and force the first STW word. The value should appear verbatim in the drive's r2050[0].
DiagID Reference Table
The following table summarises the diagID values reported by DPWR_DAT, DPRD_DAT, and therefore by SINA_SPEED. It is the consolidated set the Siemens S7-1200 system manual returns for the I/O access functions.
| DiagID (hex) | Meaning | Typical cause | Fix |
|---|---|---|---|
| 0000 | No error | — | Continue commissioning. |
| 8090 | Specified logical base address invalid | HW identifier points to a non-existent slot. | Re-wire to a valid PROFINET submodule. |
| 8093 | PROFINET IO: submodule not assigned or wrong slot | Access point or wrong telegram symbol used at HWIDSTW / HWIDZSW. | Use the "Telegram 1" symbol under the G120 head module. |
| 80A1 | Length parameter is wrong | RECORD length does not match the slave's PZD length. | Set RECORD to the byte length shown in Table 3. |
| 80B1 | Length of the RECORD source range is shorter than the slave output length | User data block is too small; telegram 1 needs 12 bytes. | Resize the DB area to match the configured telegram. |
| 80B2 | System error / module failure | PROFINET interruption at the drive. | Check wiring, restart the IO device, check CU state. |
| 80C3 | AR (Application Relationship) is not established | Drive is in state "Not networked" or AR is rejected by the controller. | Recompile and download; check device name assignment. |
| 80D0 | Submodule not present in the configured slot | Slot numbering mismatch between project and physical wiring. | Re-check slot assignment in Startdrive. |
Frequently Seen Pitfalls
Beyond 80B1 and 8093, the following issues appear repeatedly in the field and are worth verifying as a single checklist before re-powering the drive:
- PROFINET device name — the G120 must be assigned the same PROFINET name as in the TIA Portal project. Use "Assign PROFINET device name" from the Online & diagnostics menu. A mismatch produces no IO-AR, which the S7-1200 reports as 80C3.
- Topology editor vs. port partner — if you use a topology with port 1 of the CPU connected to port 1 of the CU, both must agree. Mismatches do not stop the IO-AR but produce diagnostic interrupts and intermittent 80B2 errors.
- Update time — PROFINET update time on the G120 head module must be at least 1 ms. Setting it to 0.25 ms is supported on a CU240E-2 PN-F only with the latest firmware ≥ V4.7 SP10. The S7-1200 default is 1 ms which is fine.
-
Drive object number —
AxisNo = 1for a single-axis G120. For a G120X multi-axis, each drive object has its own number (1, 2, 3, …) and each is mapped to a separateSINA_SPEEDinstance with the corresponding telegram submodule. -
Setpoint scaling —
RefSpeedmust equal p2000 of the drive. If p2000 is changed at the drive side, the block must see the newRefSpeedwithConfigAxispulsed TRUE. -
STW bit polarities — the SINA_SPEED block handles STW1 bit polarities internally. Forcing the user-side
EnableAxisTRUE sets bit 0 and the SINA_SPEED library writes the other bits per PROFIdrive profile. The user should not write the entire STW1 manually from outside the block. - Endianness on the watch table — ZSW1 and NIST_B are little-endian. If you read them as a DWORD in the watch table, byte order matters: 0x31 0x0E 0x00 0x00 is the typical 0x0E31 status for a ready drive.
Diagnostic Workflow Summary
Safety and Operational Notes
Related Documentation
- SIOS 109485727 — SINAMICS G: Controlling a speed axis with the "SINA_SPEED" block
- SINA_SPEED project documentation for S7-1200 with G120 CU240E-2 PN (PDF)
- F-TM StepDrive ST 1x24..48V 5A: Controlling via SINA_SPEED
FAQ
What does SINA_SPEED DiagID 80B1 mean on an S7-1200?
DiagID 80B1 means the RECORD source range used by the internal DPWR_DAT or DPRD_DAT call is shorter than the configured PROFINET telegram length. For telegram 1 on a SINAMICS G120, the RECORD must be 12 bytes (PZD-6/6). Resize the data block to 6 WORDs to clear the error.
Why does my SINA_SPEED block return DiagID 8093 after wiring the symbols?
DiagID 8093 means the HW identifier does not match a configured PROFINET submodule. The block expects the "Telegram 1" symbol under the G120 head module for both HWIDSTW and HWIDZSW, not the head module's access point symbol. Drag the "STW" and "ZSW" entries of "Telegram 1" onto the inputs, recompile, and download.
Does SINA_SPEED work with any telegram other than standard telegram 1?
The DriveLib version of SINA_SPEED targets PROFIdrive standard telegram 1 (PZD-6/6) by default. If the application needs telegram 2, 3, 5, 102, or 105, you must either use a SINA_SPEED variant sized for that telegram, or build a custom block that calls DPWR_DAT/DPRD_DAT with the matching RECORD length shown in Table 3.
Do I need to assign a PROFINET name to the G120 for SINA_SPEED to work?
Yes. The PROFINET device name in the TIA Portal project must match the name flashed into the G120. If the names differ, the IO-AR is not established and SINA_SPEED reports DiagID 80C3. Use the "Assign PROFINET device name" function in the Online & diagnostics menu of the G120 in TIA Portal.
What firmware on the G120 supports the SINA_SPEED telegram 1 pattern described in SIOS 109485727?
The example project for the S7-1200 + G120 CU240E-2 PN published with SIOS document 109485727 is targeted at the CU240E-2 PN firmware V4.7 (V04.70.xx). Always check the Startdrive compatibility list in the project PDF before commissioning on a different firmware version.