← Zinan Yang · lab
Unofficial notes · Siemens application library · Entry ID 109802248 · V4.1 · 04/2026

SIMATIC Kinematics
Integrator V4.1

LSKI is a ready-to-use PLC project plus WinCC Unified HMI that lets an operator create, edit and run kinematics programs on the panel — no engineering system in the machine. One LSKI_Core instance interprets one program in one channel; plugins bolt on programming, teaching, commissioning, diagnostics, palletising, G‑code and more. This console walks the library from first principles to the demo project, and lets you drive a simulated interpreter.

S7‑1511T and higher · FW 4.0 Motion Control V9.0 TIA Portal V20 · WinCC Unified V20 5–6 axes need KinPlus + 1518T/1507D

Personal study notes — not a Siemens publication. The manuals on Siemens Industry Online Support are authoritative.

Chapter 1 · Basic principles

How LSKI thinks

One LSKI_Core instance interprets one program table into motion. Everything else in this section is the vocabulary that program is built from — slots, transitions, pointers and sequences — before any HMI ever gets involved.

1.1The program table

A program is built by filling a table with commands, executed one after another. The table has two axes: program slots as columns, sized by LSKI_NO_OF_PROGRAM_SLOTS, and commands as rows, sized by LSKI_NO_OF_COMMANDS. Slots exist purely to keep a large program visually organised — you could write an entire automatic program in a single slot with no loss of functionality.

Execution runs sequentially with ascending command number, in whichever slot it is currently in, until it hits a program end. To move to a different slot, a command uses a jump, a loop or a subprogram call, targeting a label command placed in that slot.

Slot 0
Slot 1
Slot 2
Slot x
0
1
Label: L1
2
Jump → L1
N

Columns run to LSKI_NO_OF_PROGRAM_SLOTS, rows to LSKI_NO_OF_COMMANDS. A jump references a label by name — the label's slot is incidental.

1.2Program structure

A valid program needs a fixed skeleton around whatever automatic logic sits in the middle. The Add starting sequence feature in the Programming plugin builds this skeleton for you in an empty program.

Start initializationEntry point. Sets up signals, homes axes — or can be left empty.
Initialization endBoth commands must exist, even around an empty sequence.
Automatic partYour program logic, across as many slots as needed.
Stop program routineRuns on stop, on program end reached outside itself, and on errors. Terminates every parallel sequence.
Fast stopHalts every movement at once with a predefined internal sequence, then aborts the program. The stop routine above is not executed — fast stop can abort the stop routine itself mid-way.
Cycle stopBehaves like a conditional jump, evaluated once a full production cycle finishes. You choose the jump target in the cycle stop command — it can be the stop routine, or anywhere else.

1.3Command transitions

Every command in the table carries a transition that decides when the interpreter moves to the next one. Each command exposes only two of the three; some have a fixed transition you cannot change.

TransitionBehaviour
When command doneWait until the command finishes before starting the next one.
Next cycleContinue with the next command on the following PLC cycle.
ImmediatelyContinue with the next command in the same PLC cycle.
Two limits worth rememberingAt most 10 commands with the Immediately transition can execute per sequence per PLC cycle. And any kinematics motion command meant to blend into the next one must use Next cycle — nothing else queues motion ahead.

1.4Interpreter pointer & motion pointer

Kinematics commands do not execute immediately — they drop into a separate motion queue so the next motion can be prepared while the current one is still blending. That is what makes Next cycle work for kinematics: the interpreter keeps reading ahead and queuing without waiting on each move to finish.

This creates two positions that can differ: the interpreter pointer (the command being read) and the motion pointer (the kinematics command actually moving). The motion pointer can never overtake the interpreter pointer — a move must be read and queued before it can run.

1Move L P1done
2Move C P2next cycle
3Move L P3queued
4Set Q2immediately
5Wait conditionwhen done
▶ Interpreter pointerActualSequenceData, the active read command ▶ Motion pointerActiveSequenceData, the kinematics command actually moving

In the Programming plugin these are drawn as a black arrow (interpreter) and a green arrow (motion) in front of the active lines.

1.5Parallel sequences

Execution always starts in the Main sequence. To parallelise tasks, a Start parallel sequence command occupies a slot in the parallel sequences and always starts at a label — the new sequence takes that label's name. Stop sequence ends one sequence; Stop all sequences ends every sequence, main included, and runs the stop routine.

Every active sequence runs every cycleAll sequences, main and parallel, are evaluated on every single PLC cycle, and each has access to the whole program table. More parallel sequences running means more evaluation work per cycle — the ceiling is set by the constant LSKI_NO_OF_PARALLEL_SEQUENCES.

1.6Program check

Checked before it runs, and after every editA program is checked for integrity before execution, and again after any change made while it is paused. A failed check invalidates the offending command and reports exactly which program slot and command number caused it — no need to hunt through the table.

1.7Channels

One LSKI_Core instance runs one program controlling one kinematics. To add a second kinematics on the same S7‑1500T, raise LSKI_NO_OF_CHANNELS and call the LSKI modules again with dedicated instances for that channel. On the HMI, switching channel is a single write to LSKI_ChannelNavigation_ActiveChannel — the HMIInterface is multiplexed, so no extra HMI tags or screens are needed per channel. Each channel can run its own, independent set of plugins.

Chapters 3–5 · Block map

Architecture

Select a block to see its interface. LSKI_Core is the only mandatory piece; everything above and below it is optional, but once you add one HMI plugin, LSKI_Core_HMI stops being optional too.

WinCC Unified HMI screens
HMI pluginsProgrammingTeachCommissioningDiagnostics
OB ruleEvery PLC block — anything without the _HMI postfix — must be called in the same OB as LSKI_Core. _HMI blocks can live in a slower OB, but should still be called at least every 25 ms.
Technology pluginsSinaInfeedGCodePalletizingProductRegisterOMACGenericExternalDeviceAxisCouplingAxisSafeBrakeTest
SINAMICS V90
SINAMICS S210
SINAMICS S120
Sections 1.2.5–1.2.6 & 4.1 · Interpreter, motion pointer, LSKI_Core outputs

Watch the interpreter run

A real 19‑command LSKI program, driving a simulated Cartesian portal 3D+A. The black arrow is the interpreter pointer, the green arrow is the motion pointer — watch them separate whenever a move is queued with Next cycle, and snap back together the moment a command holds for When command done. The corner the gantry actually draws follows the same rule.

Execution
Program mode
Operation mode
Motion enable
100%

Programming · slot 0

Cartesian portal 3D+A

X250.0 mm
Y/Z260.0 mm
A0.0°
GripperOpen

LSKI_Core outputs

actualProgramStateNot initialised
actualProgramModeAutomatic (1)
actualOperationModeAutomatic
actualProgramOverride100%
programActiveFALSE
programInitializedFALSE
fastStopActiveFALSE
cycleStopRequestedFALSE
status16#7000

Motion queue

Empty

Error buffer

No entries

Interpreter pointer — actualSequenceData, the command being interpreted
Motion pointer — activeSequenceData, the command the kinematics is executing
Blended corner — the outgoing move was Next cycle, so the next queued move rounds through it
Sharp corner — the outgoing move was When command done, the machine parks fully before continuing

Commands 12–14 and 15–16 show the interpreter consuming several Immediately commands in a single PLC cycle — capped, as in the real interpreter, at 10 commands per sequence per cycle.

Model, not the library This pane is a browser re‑implementation of LSKI V4.1’s documented interpreter, pointer and blending behaviour for teaching purposes. It is not the SIMATIC Kinematics Integrator library itself, and it is not a substitute for the manuals or for commissioning against real axis technology objects.
Section 1.2.3 · Operation modes

Who gets to do what

Pick a mode and toggle motion enable to see which of the four core capabilities open up. Teaching always needs motion enable, whatever mode you're in.

Role to switch into this mode
Full operation isn't on the HMIIt bypasses the whole operation-mode concept, so the HMI never offers it as a choice. It's what you get by default when externalOperationMode is left unset and the OMAC plugin is not in use.
Don't rename the four rolesThe roles live in Security settings → Users and roles. Rename one and it is simply never evaluated again — the authorisation for that level silently stops working.
Authorisation is off by defaultLSKI_UserAuthorization_Active (default false) is the single switch that turns role checking on across the HMI.
OMAC takes over mode controlEnabling the OMAC plugin hands operation-mode control to the OMAC state manager — both the HMI popup and the externalOperationMode input stop having any effect.
Chapters 2–6 · Getting LSKI into a project

Bringing LSKI into a project

The path from an empty TIA Portal project to a downloaded, running kinematics program. Steps 1–4 are prerequisites the library assumes are already in place; open any step for what it actually involves.

01Open the TIA Portal projectPrerequisite

A STEP 7 V20 Update 4 project with SINAMICS Startdrive and WinCC Unified Engineering V20 Update 4 installed. LSKI is imported as a global library into this project, not the other way round.

02Hardware configuration and communicationPrerequisite

PLC hardware configured (S7‑1511T or higher, firmware 4.0; an S7‑1518T or 1507D plus the KinPlus option for 5–6 axes), and communication established to the drives and to the WinCC Unified panel that will host the HMI.

03Drive commissioning and optimisationPrerequisite

Parameterise and optimise whichever Siemens drives the machine uses — SINAMICS V90, S210 or S120 — using functions such as one-button tuning. LSKI itself is drive-agnostic: it only ever talks to the technology objects sitting on top of the drives.

04Technology object configuration and optimisationPrerequisite

Configure and test TO_Kinematics, TO_PositioningAxis, TO_SynchronousAxis and TO_SpeedAxis fully in TIA Portal first — drive/encoder connection, mechanics, leading-value interconnections, homing, control loop and hardware limit switches are all TIA-only settings with no HMI equivalent.

Commission with the kinematics control panel until jogging to target positions works correctly. Only after that should further configuration or extension move to the HMI's Configuration plugin.

05LSKI Core integration

From the global library: Master copies → PLC. Drag LSKI_Tags_V4_1_0 and LSKI_Types_V4_1_0 into your PLC's (or software unit's) tag and data-type folders, then LSKI_Blocks_V4_1_0 → LSKI_Core_Blocks into Program blocks.

Call LSKI_Core once, in any OB, and wire its three mandatory in/outs — projectData, projectConfiguration, dataExchange — to the matching channel blocks from LSKI_ExampleBlocks_V4_1_0.

06Project configuration tags

Size the installation through the constants in LSKI_ProjectConfigurationLSKI_NO_OF_CHANNELS, program slots, commands, parallel sequences and the rest. Each one is retain memory committed up front, per channel.

Changing a constant reinitialises project dataAny change here reinitialises LSKI_ProjectData in every channel, and a download with data-block reinitialisation overwrites the online data outright. Save the project data into LSKI_ProjectData's start values before you change a constant.
07Assignment of technology objects in OB Startup

Call LSKI_RegisterKinematics (it also registers the axes attached to that kinematics), LSKI_RegisterAdditionalAxis for any extra axis, and LSKI_RegisterTrackingTO plus LSKI_UpdateConveyorOrigin / LSKI_UpdateTrackingPosition for conveyor tracking — each function called exactly once, only in a Startup OB. A worked example ships under LSKI_ExampleBlocks_V4_1_0.

08Plugin integrationOptional

PLC side: drag each plugin's folder from LSKI_Blocks_V4_1_0 → LSKI_Plugin_Blocks → HMI or Technology into Program blocks. Any plugin from the HMI folder brings LSKI_Core_HMI with it as a requirement.

HMI side: LSKI_HMI_Tags_V4_1_0 into HMI tags, screens LSKI_Start and LSKI_Core_HMI into Screens, then the chosen plugin's own tag and screen folders. Re-establish any HMI connection the import broke and resynchronise the tags; for more than one channel, multiplex the HMI tags on LSKI_ChannelNavigation_ActiveChannel so the tag count stays flat. Using software units — publish the LSKI blocks and types first.

Screens are built for a resolution of 1920×1080.

09User administration on the HMIOptional

In Security settings → Users and roles, assign each user one or more of the four LSKI roles — LSKI_Teach, LSKI_Programming, LSKI_Commissioning, LSKI_ProgramControl. Nothing is enforced until LSKI_UserAuthorization_Active is switched to true — it defaults to false.

10Project download to PLC and HMI

Download both the PLC and the HMI. If HMI configuration changes were made to any technology object since the last download, upload the technology objects first — otherwise a plain download discards them.

Reinitialisation can lose channel identityKinematics and axis DB numbers, and the sub-navigation's tab registrations, live in non-retain data blocks. Downloading with the option "reinitialisation of data blocks" can wipe them — if that happens, a PLC restart restores data integrity.
Table 1‑4 & 1‑5 · Chapters 7–18

Plugin explorer

LSKI is modular. LSKI_Core is the only mandatory block — every other row here is optional and, per the manual, should be deleted from the Program blocks folder, the PLC tags and the PLC data types when unused, purely to save code‑work memory on smaller CPUs.

Core — mandatory HMI plugin Technology (PLC) plugin Both PLC & HMI parts
PluginFunction block(s)What it does & the trapConfig nodeMemory (code / data / load, kB)

Bars are scaled per column against the highest value in that column across all 14 rows (code‑work max 384 kB, data‑work max 863 kB, load max 10555 kB) — so Core, GCode, ProductRegister and Programming stand out on code‑work while AxisCoupling, AxisSafeBrakeTest and GenericExternalDevice barely register.

Chapter 19.4.1

Command reference

Every command a program can call, in the three groups the manual defines: axis control, kinematics control and interpreter commands. A command written directly in the PLC behaves exactly as it would if programmed from the HMI.

Every program needs three commandsLSKI_CmdInitStart and LSKI_CmdInitDone bracket the initialization sequence; LSKI_CmdStopProgRoutine marks the stop sequence. All three must be present even if left empty.
PLC-written programs bypass HMI checksThe HMI validates every command as it's added; a program built with these FCs is not. Call LSKI_CleanProgram (cleanMode 0 none, 1 program table + G‑code list, 2 everything) before writing, and LSKI_VerifyProgram after — it returns errorSlot, errorCmd and a status word from Table 20‑2.
Variable substitutionvariableSubstitution links a command input to a registered variable via #tempVarSub, sized by LSKI_NO_OF_SUBSTITUTION. Index 0 always means "no substitution" and can't be used for a real variable.
User functions for signalsRegister once (e.g. in Startup): LSKI_RegisterCondition / RegisterPoint / RegisterVariable / RegisterOutput / RegisterInput. Callable cyclically: LSKI_ReadCondition / ReadPoint / ReadVariable, LSKI_UpdateCondition / UpdatePoint / UpdateVariable, LSKI_InvertCondition. lock blocks HMI changes to the signal; readOnly blocks program writes to it.
CommandGroupDescription (manual wording)
Chapter 20

Status & error codes

Two separate code spaces. 16#7xxx are status words for no call / first call / subsequent call / invalid operation mode. 16#8xxx are errors — Table 20‑1 covers the Core and its plugins, Table 20‑2 covers the PLC programming functions of chapter 19.4. A handful of names repeat across the two tables with a different value — e.g. ERR_UNDEFINED_STATE is 16#8700 in Table 20‑1 but 16#8600 in Table 20‑2 — so always read the code together with which block raised it.

Normal state Flagged state (not yet an error) Error

Table 20‑1 · Core and plugin status/error codes

NameValueComment

Table 20‑2 · Error codes of the programming functions

NameValueComment
Chapters 1.4 & 4.2.2

What it costs on the CPU

Every quantity-structure constant maps straight onto retain memory. Table 4‑1 shows one channel's default configuration on three CPU classes — the smaller the CPU, the tighter the headroom.

Used retain memory, one channel

46%
CPU 1511T101 kB retain
33%
CPU 1515T162 kB retain
3%
CPU 1518T162 kB retain
Table 4‑11511T1515T1518T
Loss of project dataChanging any constant in LSKI_ProjectConfiguration reinitialises LSKI_ProjectData in every channel. A download with reinitialisation of data blocks overwrites the online data outright — save the project data into LSKI_ProjectData's start values first.

Quantity-structure constants (chapter 4.2.2)

ConstantGoverns

Runtime configuration · ProjectConfiguration.core

SettingDescription
Getting Started manual · demo project on disk

The Getting Started project

Two example sections ship in the demo project, growing from one channel on a small CPU to four channels driven through an OMAC state manager.

ComponentArticle no.Note
CPU 1515T‑2 PN6ES7 515‑2TN03‑0AB0FW 4.0
MTP1200 Unified Comfort PRO6AV2 128‑3MB27‑0AX0

One channel, four plugins

ProgrammingCommissioningTeachDiagnostics

A Cartesian portal 4D (kinematics CartesianPortal3DA, axis TOs A1_CartesianPortal3DAA4_CartesianPortal3DA) runs a pick‑and‑place. Scenario 1 places at a static position; scenario 2 places according to the current product counter, using LSKI_CmdMovePickAndPlace with a point and a variable reference.

Operate it

  1. 01Set the operation mode to Automatic.
  2. 02Select the scenario by including or excluding the corresponding jump command.
  3. 03Set the override to the desired value.
  4. 04Press and hold Initialize.
  5. 05Press Start.
  6. 06Press Stop.
  7. 07Try a Cycle stop — the product already in hand is placed before the program actually stops.
Field notes

What bites people first

Twelve things that catch new integrators, each as one line of symptom and one line of fix.