LKinCtrl turns a TO Kinematics into something you drive with a list. Instead of chaining single motion jobs in your user program, one function block — LKinCtrl_MC_MovePath — reads a PathData command list and executes it as one continuous, blendable path that can be stopped, interrupted and continued from its inputs, with detailed execution status and diagnostics on the way out.
Personal study notes — not a Siemens publication. The manuals on Siemens Industry Online Support are authoritative.
LKinCtrl gives the TO Kinematics technology object a command-list driven way to run path motions, plus HMI screens — documented separately — to commission and diagnose the kinematics and its axes. This is why the library exists, and what it is built from.
Instead of executing and handling several single motion commands in the user program, the TO Kinematics is controlled by only one core function block. Path information is provided by a list of commands, not by program logic. Path motions can be stopped, interrupted and continued during execution just by inputs on that one block. Detailed information on the path execution status, together with error diagnostics, comes back out of the same block.
A conventional program wires up one motion block per step and handles each one's own done / busy / error logic in turn. LKinCtrl collapses that into a single instance of LKinCtrl_MC_MovePath reading a PathData command list.
Four commands, four sets of interface handling — and the sequencing itself lives in the user program.
One instance keeps reading the list, keeps the MotionQueue full, and reports progress and errors back through a single interface.
The path motion is defined by parametrizing a command list, called PathData. Its parametrization follows the parametrization of the underlying system functions and includes the available system motion commands for TO Kinematics; the PathData length can be adapted to the use case through an internal library user constant.
PathData serves as an IN_OUT parameter for the application's core FB LKinCtrl_MC_MovePath. This function block controls the TO Kinematics and internally executes the motion commands as defined in the PathData. It can interrupt, continue and stop the path motion, and offers detailed diagnostics information in its interface. It also manages to steadily keep the TO's job sequence full without overloading it, so that a maximum look-ahead in terms of dynamic planning is achieved.
Alongside the core FB, the library ships two further motion blocks that share its interface conventions: MC_JogFrame provides jogging of a kinematics in Cartesian directions X, Y, Z including the orientation axis — continuously, incrementally, or to a specified target position — and LKinCtrl_MC_MovePickAndPlaceLinear encapsulates a linear MC command sequence for typical pick-and-place applications, usable like a standard MC block, with conveyor tracking integrated so no additional command is needed to establish tracking.
| Component | No. | Article number | Note |
|---|---|---|---|
| CPU 1518T‑2 PN | 1 | 6ES7 518‑4UP00‑0AB0 | Or other S7‑1500T CPU with FW 3.1.0 |
Available from the Siemens Industry Mall.
| LKinCtrl library | LKinCtrl_V5_3_1_TiaLib_V19.zip |
| LKinCtrl manual | LKinCtrl_V5_3_1_Manual_en.pdf |
| LKinCtrl manual HMI | LKinCtrl_V5_3_1_Manual_HMI_en.pdf |
| Getting started project | LKinCtrl_V5_3_1_GettingStarted_TiaPrj_V19.zip |
| Getting started manual | LKinCtrl_V5_3_1_GettingStarted_Manual_en.pdf |
| Changelog | LKinCtrl_V5_3_1_Changelog_en.pdf |
The block engineers actually call. It reads the PathData command list, drives the TO Kinematics, and is the one instance you wire into the cyclic task — everything else in the library supports it.
To run the application, a basic TIA Portal V19 project with a TO Kinematics and the corresponding number of TO PositioningAxis objects needs to be set up. The TO Kinematics must be configured, and a basic commissioning to run the kinematics with the control panel should be completed — this can also be done with the commissioning module in the HMI.
Integrating the library blocks into a STEP 7 program follows a fixed sequence of drag-and-drop copies:
| No. | Action |
|---|---|
| 1 | Copy the folder LKinCtrl_Tags with drag & drop into "PLC tags" in the PLC. |
| 2 | Copy the folder LKinCtrl_Types with drag & drop into "PLC data types" in the PLC. |
| 3 | Copy the folder LKinCtrl_Blocks with drag & drop into "Program blocks" in the PLC. |
| 4 | (Optional) Copy the folder LKinCtrl_Data with drag & drop into "Program blocks" in the PLC. Existing data, or separately created data, can also be used for the interface of the library blocks. |
| 5 | The blocks can now be configured and called in the user program. |
The interfaces and controls of the LKinCtrl blocks follow the PLCopen standard; they are implemented in SCL for use in a cyclic task. The table below is the full parameter list of LKinCtrl_MC_MovePath — filter it by parameter type, or scan the whole thing.
| Name | Type | Data type | Comment |
|---|---|---|---|
| Inputs | |||
| execute | IN | Bool | Rising edge starts action once. |
| stop | IN | Bool | Abort path motion. |
| interrupt | IN | Bool | Interrupt path motion. |
| reset | IN | Bool | Reset FB / acknowledge errors. |
| sequenceMode | IN | Int | Activate sequence mode (0) / single step mode (1). |
| pathTransition | IN | DInt | Initial transition configuration for a new path motion (1: use bufferMode and transitionParameter). |
| bufferMode | IN | DInt | Initial buffer mode for a new path motion. |
| transitionParameter | IN | Array[1..5] of LReal | Initial transition parameter for a new path motion. |
| configuration | IN | "LKinCtrl_typeConfiguration" | Configuration structure — see below. |
| abortMeasurementCmd | IN | Bool | TRUE: abort the active command if it is a measurement command. |
| Outputs | |||
| done | OUT | Bool | TRUE: commanded functionality has completed successfully. |
| busy | OUT | Bool | TRUE: FB is not finished — new output values can be expected. |
| active | OUT | Bool | FB is in control of the axesGroup / kinematic is in motion. |
| commandAborted | OUT | Bool | TRUE: commanded functionality was aborted by another command. |
| error | OUT | Bool | TRUE: an error occurred during execution of the FB. |
| status | OUT | Word | Status of the FB (constants in the status & error reference). |
| diagnostics | OUT | "LKinCtrl_typeMovePathDiagnostics" | Diagnostics information of the FB. |
| activePathData | OUT | String["LKINCTRL_LENGTH_OF_PATHDATA_NAME"] | Name of the actual PathData. |
| activeCmdNo | OUT | DInt | Number of the actual PathData command. |
| remainingDistanceActCmd | OUT | LReal | Remaining distance of the actual PathData command. |
| readyForNextPath | OUT | Bool | TRUE: the next PathData can be triggered. |
| activeUserFrames | OUT | Array["LKINCTRL_CS_NO_OF_FIRST_USER_FRAME".."LKINCTRL_CS_NO_OF_LAST_USER_FRAME"] of "LKinCtrl_typeFrame" | Currently active user frames. |
| bufferedCommands | OUT | "LKinCtrl_typeBufferInfo" | Current buffered commands, including history. |
| In/out | |||
| axesGroup | IN_OUT | TO_Kinematics | Reference to the axesGroup. |
| pathData | IN_OUT | Variant | Reference to the PathData. |
| pointTable | IN_OUT | Array[*] of "LKinCtrl_typePoint" | Reference to the point table. |
| flags | IN_OUT | Array[0.."LKINCTRL_NO_OF_LAST_SETFLAG"] of Bool | Boolean defined by setFlags in a PathCommand. |
| valueFlags | IN_OUT | Array[0.."LKINCTRL_NO_OF_LAST_VALUEFLAG"] of LReal | Value defined by valueFlags in a PathCommand. |
No parameters match this filter.
The configuration input carries settings that apply across the block's operation — offset and conveyor parameters, user and zone frames, and the stop/interrupt dynamics:
| Field | Type | Comment |
|---|---|---|
| offsetParameter | Array[1.."LKINCTRL_NO_OF_OFFSETS"] of "LKinCtrl_typeContourOffsetParameter" | Offset parameter settings for contour offset commands. |
| conveyorParameter | Array[1.."LKINCTRL_NO_OF_CONVEYOR"] of "LKinCtrl_typeConveyorConfiguration" | Conveyor parameter settings for conveyor tracking commands. |
| userFrames | Array[first..last user frame] of "LKinCtrl_typeFrame" | User frame configuration — additional frames beyond OCS1–3, used as coordinate system 11…n at the command. |
| workspaceFrames | Array[1.."LKINCTRL_NO_OF_ZONES"] of "LKinCtrl_typeWorkspaceZoneDefinition" | Workspace zone configurations used for zone commands. |
| kinematicsFrame | Array[1.."LKINCTRL_NO_OF_ZONES"] of "LKinCtrl_typeKinematicsZoneDefinition" | Kinematics zone configuration used for zone commands. |
| stopMode | DInt | MC_GroupStop dynamics: 0 stop with dynamics of the active job; 1 stop with maximum kinematics dynamics (adaption still effective); 10 / 11 as 0 / 1 plus desync conveyor. |
| interruptMode | DInt | MC_GroupInterrupt dynamics: 0 dynamics of the active job; 1 maximum kinematics dynamics (adaption still effective). |
| errorStopMode | DInt | MC_GroupStop dynamics when stopping due to an error — same value set as stopMode. |
| preloadMotionQueue | USInt | Preload the motion queue via interrupt/continue before the start of motion: 0 no preloading; 1 preload and start when prepared; 2 preload and start with acknowledge (rising edge at execute). |
| resetModalDynamics | Bool | TRUE: internal modal dynamics are reset between paths. FALSE: kept between paths. |
Once a PathData structure has been created in a DB, the FB is called cyclically. The axesGroup, pathData, pointTable and flags in/outs must be connected to their corresponding objects; the execute signal that starts the path motion can be wired to an input pin, or set in the code of an SCL block.
Based on PLCopen Part 4 behaviour, execute reacts to a rising edge. The other control inputs each map to a distinct system-level action:
A rising edge at execute starts a new path motion, or — after an interrupt — continues the interrupted one.
stop triggers MC_GroupStop internally: the path motion is aborted and every executed command is deleted from the MotionQueue.
interrupt triggers MC_GroupInterrupt: motion status and all executed commands stay in the MotionQueue, and can be continued.
reset acknowledges errors or performs a general reset of the FB, once busy = FALSE.
sequenceMode switches between automatic and single step operation — see Operating modes.
Actuators can be controlled via flags depending on path motion status, alongside the stop-mode and offset settings in configuration.
Diagnostic output splits into two groups. The PLCopen-style outputs — done, busy, active, commandAborted, error and status — follow the timing behaviour of the PLCopen-conformant system motion commands. Beyond that, the diagnostics structure is written whenever an error occurs: it identifies the command number and PathData name that may have caused it, the state-machine states of LKinCtrl_MC_MovePath and LKinCtrl_ExecuteKinMotionCmd, and the TO Kinematics' own status and error words.
While a path motion runs, activePathData and activeCmdNo report which command is executing and in which PathData, and remainingDistanceActCmd reports the remaining distance of that single command. readyForNextPath switches TRUE once every command in the current PathData has been internally executed into the MotionQueue — not that those commands have finished, only that they are queued — and that is the signal to trigger the FB again with the next PathData, keeping the MotionQueue filled for maximum look-ahead.
sequenceMode switches the FB between two distinct ways of working through a PathData. The difference is how much of the list one execute edge commits to:
| Automatic (0, default) | Single step (1) | |
|---|---|---|
| Per execute edge | Runs the complete PathData | Runs exactly one command |
| done signals | After the last command in the PathData finishes | After each single command finishes |
| Retriggering | Possible on done = TRUE, or as soon as readyForNextPath goes TRUE — keeps the MotionQueue filled | A new rising edge on execute is required for every command |
| Blending between commands | Configured via the next command's first entry, or overridden at the FB via pathTransition / bufferMode / transitionParameter | None — bufferMode is ignored, see caution below |
| Best suited to | Production operation, continuous paths | Commissioning, step-through diagnosis |
Once readyForNextPath signals that a PathData's commands are all registered in the MotionQueue, the FB can be retriggered with the following PathData — the queue stays filled and the path continues immediately once the first PathData ends.
Transitions between two path motions can be configured either in the following PathData's first command entry, or by setting pathTransition = 1, which overwrites that entry's blending parameters with the ones set at the FB inputs bufferMode and transitionParameter[1..5].
Every command in the PathData is executed separately, and every rising edge at execute triggers exactly one of them. All programmed target positions are still reached completely.
The FB can trigger more than one command per call, which helps keep the MotionQueue filled and can improve path dynamics. This is enabled by raising the PLC tags LKINCTRL_NO_OF_START_EXECUTE_CMDS and LKINCTRL_NO_OF_SEQ_EXECUTE_CMDS in the tag table LKinCtrl_Configuration.
An undesired TO Kinematics behaviour can leave blending between two commands incorrect after an interrupted command is aborted with no continue following it. Because an interrupt always needs a matching continue, LKinCtrl_MC_MovePath executes a continue command before starting the path motion, to guarantee one always follows. This behaviour is controlled by the internal constant CONTINUE_AT_START.
A PathData structure is just an array of commands — LKinCtrl_typePathDataElement entries read in order by LKinCtrl_MC_MovePath. Build one below in the manual's own command types, then watch it execute exactly as the block reports it: which entry is active, how fast the path is moving, and whether it is running, interrupted or stopped.
Siemens ships LKinCtrl with a ready‑to‑run TIA Portal project: a simulated 4‑axis kinematics running three scenarios — a traced contour, a pick&place packaging cell and a conveyor‑tracking hand–off — driven by a Unified HMI. Everything below is read out of that project's own exported source, not paraphrased from the manual: real block names, real tag names, and the actual PathData the demo executes.
The project consists of four TO PositioningAxis configured as virtual (simulated) axes, connected to a TO Kinematics defined as a 3D Rollpicker with orientation. Two further virtual TO PositioningAxis represent the conveyor belts used for conveyor tracking. On the PLC side the example contains two call environments — one that drives the kinematics, one that feeds the Unified HMI — plus one FB per scenario that runs its automatic sequencing. Since the HMI is optional, every scenario can equally be driven from a Watch table.
| Component | Qty | Article no. | Note |
|---|---|---|---|
| CPU 1518T‑2 PN | 1 | 6ES7 518‑4UP00‑0AB0 | Or other S7‑1500T CPU, FW ≥ 3.1.0 |
| MTP2200 Unified Comfort PRO | 1 | 6AV2 128‑3XB27‑0BX0 | Or other WinCC Unified panel, FW V19.0.0.2 |
The project file inspected for this page (…TiaPrj_V19_V21) is the same demo re‑saved in TIA Portal V21 Update 2 HF1; the manual's own steps below assume TIA V19 or higher.
Traces the outline of an “S” and its circumscribing circle — a stand‑in for glue, print or cutting work where the TCP must follow a predefined contour precisely. 1A runs in the world coordinate system; 1B runs the identical shape inside OCS3, so redefining that frame simply relocates the whole contour.
A product arrives on a (simulated) conveyor, is picked, rotated 90° and placed into one of four slots in a box; the place point is re‑derived from a UCS each cycle so the same path serves all four slots. Path data is written directly in SCL, not via the HMI.
A product on conveyor 1 is picked on the fly, carried to conveyor 2 and placed there while both belts keep moving — the TCP tracks OCS1 then OCS2. Path data is also written directly in SCL. Stopping mid‑tracking raises a TO error by design and must be acknowledged.
All three scenarios read and write the same setFlagNames / pointTable arrays in ExampleProject_Data — these are the indices Scenario 1 and 2 name.
| Kind | Index | Name | Comment |
|---|---|---|---|
| SetFlag | 0 | S1 Enable actuator | rising edge: enable actuator |
| SetFlag | 1 | S1 Disable actuator | rising edge: disable actuator |
| SetFlag | 2 | S2 Pick ready | TRUE: product ready to be picked |
| SetFlag | 3 | S2 Open actuator | rising edge: open actuator |
| SetFlag | 4 | S2 Close actuator | rising edge: close actuator |
| Point | 1 | S2 Above place | position above the place location |
| Point | 2 | S2 Place | position to place the product |
Watch the Scenario 1 actuator live at "InstExampleProject_S1_Contour".actuator, Scenario 2's at "InstExampleProject_S2_Packaging".actuator, and the place cycle at "InstExampleProject_S2_Packaging".placeIndex; Scenario 3's conveyor speeds and product interval are set at "ExampleProject_Control".scenario3VelocityConveyor1/2 and .scenario3ProductIntervalConveyor1.
In the manual's own order: prepare and download once, then drive it from either a Watch table or the Unified HMI.
Driven this way, a scenario retriggers indefinitely as soon as the move path is ready again — stop it with a rising edge on .stopMovePath (also: .interruptMovePath, .resetMovePath). This is Full operation mode: no HMI restrictions apply.
{"default": [
{"screen": "LKinCtrl_Editor_Layout", "textListIndex": 1},
{"screen": "LKinCtrl_Commissioning_Layout", "textListIndex": 2},
{"screen": "LKinCtrl_Diagnostics_Layout", "textListIndex": 3}
]} the same mechanism configures the main navigation in screen 03_MainNavigation.| Mode | Editing | Program exec. | Teaching |
|---|---|---|---|
| No operation | locked | locked | locked |
| Automatic | possible | possible | locked |
| Manual | possible | locked | possible (manual vel.) |
| Test run | possible | possible | possible (test‑run vel.) |
| Full operation | No HMI in use — no restrictions; used automatically when driven from the Watch table | ||
The status bar's kinematics controls, from the manual's own table:
| Control | Action |
|---|---|
| Home | homes all connected kinematic & conveyor axes; LED green once every axis is homed |
| Enable | toggles enable for all connected axes; LED green once every axis is enabled |
| Reset | resets the kinematics and all connected axes; LED red on any fault (axes, conveyors or move path) |
| Start / continue | starts, or resumes an interrupted, path motion execution |
| Interrupt | interrupts the path motion execution |
| Abort | aborts the path motion execution |
The status bar's user icon opens a login dialog. The project ships predefined user roles that aren't evaluated by default; enabling user administration on the Settings page then locks the HMI until Administrator / Administrator logs in.
Read straight out of the TIA Openness/VCI export under Vci/ — real object names, and the folder each lives in so you can find it again in TIA Portal.
The project also ships a GSDML for a SINAMICS S210 servo drive (AdditionalFiles/GSD/), even though every axis above is configured virtual — the six drive channels aren't exercised by this demo.
Scenario 1's contour was authored on the HMI and ships as retained start values inside "ExampleProject_Data".pathDataArray — decoded below from that DB's exported start values. Scenarios 2 and 3 are written directly in SCL, in ExampleProject_Startup, precisely to show a use case with no HMI involved.
10 active commands, pathDataArray[1], all in WCS. Positions in mm (the TO's configured engineering unit); path velocity likewise per second. The circular moves give their aux point as an offset from the previous target and a travel arc in degrees rather than a radius — that's circMode = 1 (centre + arc) on all three of them here. The DB provisions five path slots in total; only four are used by these scenarios — the fifth, named “Path 5”, ships empty.
| # | Name | Command | Target | Buffer | Vel | Notes |
|---|---|---|---|---|---|---|
| 1 | B_up | MoveLinAbs | x0 y28.28 z50 a0 | BlendingLow | 300 | SetFlag 1 (disable actuator) before move |
| 2 | B | MoveLinAbs | x0 y28.28 z0 a0 | BlendingLow | 300 | — |
| 3 | Circ | MoveCircAbs | arc 360° | Buffered | 150 | SetFlag 0 (enable actuator) before — the circumference circle |
| 4 | D_up | MoveLinAbs | x10 y10 z50 a0 | Buffered | 300 | — |
| 5 | D | MoveLinAbs | x10 y10 z0 a0 | BlendingLow | 300 | — |
| 6 | — | WaitTime | 3000 ms | Buffered | — | cmdActivated = FALSE — disabled by default; flip it TRUE (Watch table or HMI) to pause 3 s after cmd 5 |
| 7 | S_up | MoveCircAbs | aux Δy10, arc 235° | Buffered | 150 | SetFlag 0 (enable actuator) before |
| 8 | F | MoveLinAbs | x5.74 y−1.81 z0 a0 | BlendingLow | 300 | — |
| 9 | S_lo | MoveCircAbs | aux Δy−10, arc 235° | BlendingLow | 150 | SetFlag 1 (disable actuator) after |
| 10 | — | MoveLinRel | Δz +50 | Buffered | −1 (TO default) | retract, closing the loop back to the start height |
Scenario 1B (pathDataArray[2], “contourOCS”) repeats this exact shape, prefixed with one extra command — SetOcsFrame assigning OCS3 an origin of x100 y0 z0 — and every subsequent command's coordinate system switched from WCS to OCS3. Move the frame, and the whole “S” moves with it.
7 commands, pathDataArray[3], written in ExampleProject_Startup, region WRITE_PATH_SCENARIO_2. WCS except the two point references, which resolve against UCS1.
| # | Command | Target | Buffer | Notes |
|---|---|---|---|---|
| 1 | SetPathDynamics | vel 100 | — | accel/decel −1 (TO default), jerk −2 (keep current) |
| 2 | MoveLinAbs | x0 y0 z50 a0 · “above pick” | BlendingHigh | SetFlag 2: wait for pick‑ready, once · SetFlag 3: open actuator before |
| 3 | MoveLinAbs | x0 y0 z10 a0 · “pick” | BlendingHigh | SetFlag 4: close actuator after |
| 4 | MoveLinAbs | x0 y0 z50 a0 · “above pick” | Buffered | — |
| 5 | MoveLinAbs | Point 1 “S2 Above place” | BlendingHigh | place index re‑written each cycle by the scenario FB |
| 6 | MoveLinAbs | Point 2 “S2 Place” | BlendingHigh | SetFlag 3: open actuator after |
| 7 | MoveLinAbs | Point 1 “S2 Above place” | Buffered | — |
3 motion commands and 2 waits, pathDataArray[4], region WRITE_PATH_SCENARIO_3 — each motion command is a MoveLinPickAndPlace (cmdType 11), the command that wraps LKinCtrl_MC_MovePickAndPlaceLinear for use inside a path.
| # | Command | CS / conveyor | Target | Vel / accel / decel | Notes |
|---|---|---|---|---|---|
| 1 | MoveLinPickAndPlace | OCS1, conveyor 1 | x0 y0 z10 a0 | 500 / 5000 / 5000 | working height 60 mm, variable dynamic limits — pick from conveyor 1 |
| 2 | WaitTime | — | 200 ms | — | — |
| 3 | MoveLinPickAndPlace | OCS2, conveyor 2 | x0 y0 z10 a90 | 500 / 5000 / 5000 | start & target working height 60 mm — place on conveyor 2, product turned 90° |
| 4 | WaitTime | — | 200 ms | — | — |
| 5 | MoveLinPickAndPlace | WCS, no conveyor | x50 y0 z80 a0 | 500 / 5000 / 5000 | depart vertically 60 mm, no target direction — return to the wait position |
Two call chains hang off ExampleProject_Main (OB123): one drives the kinematics, one feeds the Unified HMI.
Two real FBD call signatures, read straight from the exported networks. ExampleProject_Main wires the Rollpicker TO_Kinematics and the whole ExampleProject_Data record into Call_Env's InOuts; Call_Env passes the same objects straight on into InstLKinCtrl_MC_MovePath:
Only selectedPath and settings travel in from the Watch table / HMI side of Call_Env to choose & configure the path; sequenceMode, pathTransition, bufferMode, transitionParameter and configuration on the inner MC_MovePath call are set inside Call_Env itself, not exposed further out.
| Block | Where it runs | How it's invoked here |
|---|---|---|
| LKinCtrl_MC_GroupPower | InstLKinCtrl_MC_GroupPower | Called directly by Call_Env; input enable driven from .enableAxes / the HMI's power control. |
| LKinCtrl_MC_GroupReset | InstLKinCtrl_MC_GroupReset | Called directly by Call_Env; execute driven from .resetAxes (rising edge). |
| LKinCtrl_MC_GroupHome | InstLKinCtrl_MC_GroupHome | Called directly by Call_Env; execute driven from .homeAxes (rising edge). |
| LKinCtrl_MC_JogFrame | instJogFrame | Instantiated inside the library's own LKinCtrl_TeachKinematics block (called via InstLKinCtrl_TeachKinematics_HMI / _Commissioning_HMI) for manual jog moves in Teach mode and Commissioning — the example project never calls it directly. Region JOG_FRAME triggers it from whichever HMI faceplate or external jog input is active: jogForward, jogBackward, jogToPosition and jogSPTP each combine an HMI and an “external” source with a validity check. |
| LKinCtrl_MC_MovePickAndPlaceLinear | instMC_MovePickAndPlaceLinear[1..2] | A 2‑element multi‑instance array inside LKinCtrl_MC_ExecuteKinMotionCmd — MC_MovePath's own engine dispatches into it whenever a PathData command has cmdType = 11. This is exactly what Scenario 3's three motion commands run as. |
The dispatch itself, quoted from LKinCtrl_MC_ExecuteKinMotionCmd:
// Reset instance
#instMC_MovePickAndPlaceLinear[#statFBCounterMoveLinPnP](axesGroup := #to_Kinematics,
execute := FALSE);
IF #instMC_MovePickAndPlaceLinear[#statFBCounterMoveLinPnP].busy = FALSE THEN
...
// Trigger command
#instMC_MovePickAndPlaceLinear[#statFBCounterMoveLinPnP](execute := TRUE,
position := #pathDataElementPreBuf.cmdCoordinates.targetPosition,
coordSystem := #pathDataElementPreBuf.cmdCoordinates.coordSystem,
...);From here: the full 29‑command cmdType catalogue and every flag mode live in Commands and Flags above; to reshape any of these three paths interactively rather than read them off a table, try the Path lab.
Every path LKinCtrl drives is one array — LKinCtrl_typePathData, a library UDT instantiated in a global DB. Each element is one command: a target, its dynamics and blending, and up to three Boolean and four LREAL flags to fire alongside it.
The structure that MovePath's pathData input points to. It holds the path's name and the command array itself.
| Name | Type | Comment |
|---|---|---|
| pathDataName | String[LKINCTRL_LENGTH_OF_PATHDATA_NAME] | Name of the PathData; shown as the active path data at MovePath. |
| LKinLangInterface | LKinCtrl_typeAdvPointers | Interface to the LKinLang application; pointers used to handle PathData as a ring buffer. |
| commands[1..LKINCTRL_NO_OF_PATHDATA_ELEMENTS] | Array of LKinCtrl_typePathDataElement | The command list — one entry per array index, detailed below. |
Every array element is an LKinCtrl_typePathDataElement. Fields not relevant to a command's cmdType are simply left at their defaults.
| Field | Type | Comment |
|---|
// illustrative field values, not a manual screenshot commands[3].cmdType := 1 // absolute linear commands[3].cmdName := 'ToPick' commands[3].point := 2 // resolved from Point Table commands[3].cmdCoordinates.coordSystem := 1 // OCS1 commands[3].cmdParameters.pathDynamics.velocity := -1.0 // TO default commands[3].cmdParameters.bufferMode := 2 // blend, lower speed commands[3].cmdParameters.transitionParameter[1] := 40.0 // mm commands[3].setFlags[1].flag := 2 commands[3].setFlags[1].flagMode := 1 // SET_BEFORE_AND_NO_RESET commands[3].setFlags[2].flag := 4 commands[3].setFlags[2].flagMode := 21 // RESET_AFTER
// illustrative field values, not a manual screenshot commands[4].cmdType := 3 // absolute circular commands[4].cmdParameters.circleParameters.circMode := 1 // auxPoint = centre commands[4].cmdParameters.circleParameters.auxPoint[1] := 250.0 // centre, coord. 1 commands[4].cmdParameters.circleParameters.auxPoint[2] := 0.0 // centre, coord. 2 commands[4].cmdParameters.circleParameters.arc := 180.0 // opening angle commands[4].cmdParameters.circleParameters.pathChoice := 0 // positive / CCW commands[4].cmdParameters.circleParameters.circlePlane := 2 // X-Y plane
Rather than writing coordinates inline, a command can reference a row of the Point Table attached at MovePath. The reference is resolved to real coordinates when the command is copied into the internal buffer.
Point references apply to: linear commands · circular commands with aux-point mode 0 or 1 · the pick-and-place command · MoveDirect / sPTP · the OCS frame command · the UCS frame command · Define Tool.
A command with cmdType = -1 marks the end of the list. Nothing after it is executed — unused trailing array elements can simply stay at their default cmdType of −1.
PathData is a UDT: define a DB variable of type LKinCtrl_typePathData, fill it either by pointing and clicking in the DB view or by writing SCL networks ahead of the MovePath call (a running command-index variable, incremented after each definition, keeps the array order easy to reorder by dragging networks). Run that definition logic once — e.g. on PLC startup — not every cycle.
| Library constant | Governs | Value |
|---|---|---|
| LKINCTRL_NO_OF_PATHDATA_ELEMENTS | Length of the commands array per PathData. | 20 |
| LKINCTRL_LENGTH_OF_PATHDATA_NAME | Character length of pathDataName. | 20 |
Both are library constants: raise LKINCTRL_NO_OF_PATHDATA_ELEMENTS for longer paths, or the name length if pathDataName needs to carry more than 20 characters.
The cmdType field on a PathData entry selects one of 29 command types across 12 families, plus the measurement flag that rides along on a motion command. Filter by family or search across names, parameters and rules.
Every command entry can drive actuators through the path itself: up to three Boolean setFlags and four LREAL ValueFlags per command, timed by a flagMode against that command's own motion.
The setFlags/ValueFlags arrays on a command entry refer, by index, into the Boolean flags and LREAL valueFlags InOut arrays at the LKinCtrl_MC_MovePath interface — typically wired straight to output signals. The default value for every flag entry is -1, which triggers nothing: it neither sets nor resets. Explanations below refer to setFlags only; the mechanism is identical for ValueFlags, except that a value is written instead of a bit being set.
| Constant | Default | Governs |
|---|---|---|
| LKINCTRL_NO_OF_CMD_SETFLAGS | 3 | Boolean setFlags configurable per command entry. |
| LKINCTRL_NO_OF_CMD_VALUEFLAGS | 4 | LREAL ValueFlags configurable per command entry. |
| LKINCTRL_NO_OF_LAST_SETFLAG | 10 | Highest index of the Boolean flags InOut array at MovePath. |
| LKINCTRL_NO_OF_LAST_VALUEFLAG | 10 | Highest index of the LREAL valueFlags InOut array at MovePath. |
Reset. The flags InOut arrays reset automatically at the start of a PathData and on MovePath's done signal. Set the global tag LKINCTRL_DISABLE_FLAG_RESET to disable that automatic reset.
The flagMode on a setFlags/ValueFlags entry chooses when the flag is set or reset relative to its command, and whether execution should wait for an external acknowledge.
| Mode | Constant | Behaviour |
|---|
A track-conveyor command couples an OCS to a moving belt so the kinematics can approach, follow and depart a product without it ever standing still.
Tracking uses an OCS frame that MovePath updates continuously from a leading value — the conveyor's own position. The OCS origin becomes, and stays, equal to the moving product's position.
Once the command executes successfully, that OCS is coupled to the belt; the kinematics synchronises with it on the next command that targets the same OCS.
Up to FW 3.0.x, blending is not possible:
Synchronisation ends the moment a command in WCS, or an untracked OCS, executes. A dedicated desync command can only be an absolute linear or absolute circular (circMode 0) command.
For automatic desync on stop or error, set Configuration.stopMode to 10 or 11:
| stopMode | Stop dynamics | Desynchronisation |
|---|---|---|
| 0 | Current dynamics | None |
| 1 | Maximum dynamics | None |
| 10 | Current dynamics | After stop |
| 11 | Maximum dynamics | After stop |
cmdType = 50 desynchronises from the conveyor with only a small movement: internally, a linear command runs to the current TCP position.
Five blocks work outside a PathData list, for group housekeeping, manual jogging and a self-contained pick-and-place move — the same motion sequence that cmdType 11 wraps for use inside a path.
Enables or disables every axis interconnected to the attached axesGroup in one call — equivalent to fanning MC_Power out across the whole kinematics group.
Resets every TO axis on the axesGroup and the TO_Kinematics object itself — the group-level equivalent of MC_Reset, used to acknowledge errors or reinitialise.
References every TO axis interconnected to the axesGroup, with the same homing-mode options as MC_Home applied per axis.
Manual jogging in Cartesian X/Y/Z/A/B/C, continuous or incremental, plus positioning to a target — interpolated or via sPTP — in any supported coordinate system and with any of up to three tools.
Wraps a full linear pick-and-place motion — optional start vector, transition, optional target vector, optional conveyor tracking — behind one PLCopen-style call. It is the block that cmdType 11 runs internally; everything here also applies to that PathData command (§3.15).
Orientation only moves during the transition motion (steps 2–4) — never in the linear start or target vector. On a 2D+A or 3D+A kinematics, directionA can force which way that orientation turns.
Motion commands queue one after another, starting from the latest target position before the FB was triggered (or the current position, if nothing was moving). Only buffer a following MC command once readyForNextCommand = TRUE, so the order stays correct. remainingPathLength only reports a meaningful value once that output is TRUE, and it is not corrected for later internal shortening — e.g. blending or (de)synchronisation — so it may not reach exactly 0.
Set conveyorTracking.enable = TRUE to couple the target OCS (coordSystem) to a belt axis before the motion starts, using the block's own axis, origin and initial-position inputs.
| Field | Type | Comment |
|---|---|---|
| enable | Bool | TRUE establishes tracking with this command's execution. |
| conveyorBeltAxis | DB_ANY | Conveyor belt axis DB. |
| conveyorBeltOrigin | TO_Struct_Kinematics_Frame | Frame at the conveyor's origin. |
| initialObjectPosition | TO_Struct_Kinematics_Frame | Object position on the belt at trigger time — X only, as in §3.7.1. |
Both vectors share the same four fields, in startParameter / targetParameter (type LKinCtrl_typePnPParameter):
| Field | Comment |
|---|---|
| direction[1..3] | X/Y/Z direction of the vector, always pointing away from start or target; normed internally. All-zero means no vector at all. |
| workingHeight | ≤0 no vector · >0 length, meaning set by LKINCTRL_PNP_WORKINGHEIGHT_MODE: mode 1 (default) is the complete working height including the blending part; mode 2 is the linear length alone. |
| transitionArea | <0 uses the axesGroup's max blending radius (not with mode 2) · = 0 standstill at the vector's end · >0 blending distance · ≥ workingHeight collapses to pure blending, no linear component (mode 1 only). |
| dynamicsFactor | Path-velocity scaling factor along this vector, 1–200%. |
No vector at all (workingHeight = 0 or direction = [0,0,0]) makes the block behave like a plain MC_MoveLinearAbsolute to position.
Setting startPosition / startCoordSystem explicitly is required whenever blending into the command (bufferMode > 1) is combined with a start-vector definition, or with a change between two tracked OCS. Otherwise the default (startCoordSystem = -1, use the actual position) is fine.
A typical pick-and-place cell, both pick and place positions in conveyor tracking (values as documented for this sequence):
conveyorTracking.initialObjectPosition is updated before every execution of the sequence, from the current measured object position.
Acknowledge a present error by setting execute = FALSE. If the block gets stuck between status 16#7000 and 16#8000, abort it with MC_GroupStop. Motion-command errors (status 16#8701–16#8720) carry the underlying MC command's error in subFunctionStatus — see the TO documentation. Command-creation errors (status 16#8601) are broken down in the Error handling section below.
Every status and error identifier the library's blocks raise, grouped by the block that raises it — plus the PLC tag tables that configure and enumerate the library.
Always read a block's diagnostics output for the full picture: it names the PathData command and internal state a MovePath error occurred in, on top of the status word itself.
| Raised by | Identifier | Value | Kind | Meaning |
|---|
Application-level settings — sizes, name lengths and a handful of behavioural switches. These values may be changed to suit the project.
| Tag | Default | Governs |
|---|---|---|
| LKINCTRL_LENGTH_OF_CMDPOINT_NAME | 30 | Length of a point name. |
| LKINCTRL_LENGTH_OF_OFFSET_NAME | 20 | Length of an offset (tool) name. |
| LKINCTRL_LENGTH_OF_PATHDATA_NAME | 20 | Length of a PathData name. |
| LKINCTRL_LENGTH_OF_TO_NAME | 30 | Length of technology-object names. |
| LKINCTRL_NO_OF_CMD_SETFLAGS | 3 | Boolean flags configurable per command. |
| LKINCTRL_NO_OF_CMD_VALUEFLAGS | 4 | LREAL flags configurable per command. |
| LKINCTRL_NO_OF_CONVEYOR | 5 | Number of configurable conveyor sets. |
| LKINCTRL_NO_OF_LAST_SETFLAG | 10 | Highest index of the Boolean flags array at MovePath. |
| LKINCTRL_NO_OF_LAST_VALUEFLAG | 10 | Highest index of the LREAL valueFlags array at MovePath. |
| LKINCTRL_NO_OF_OFFSETS | 3 | Number of configurable tool-offset sets. |
| LKINCTRL_NO_OF_PATHDATA_ELEMENTS | 20 | Length of the PathData command array. |
| LKINCTRL_NO_OF_PATHS | 5 | Number of paths. |
| LKINCTRL_NO_OF_POINTS_AT_POINT_TABLE | 30 | Number of points in the Point Table. |
| LKINCTRL_NO_OF_SEQ_EXECUTE_CMDS | 1 | Commands buffered per call after the first cycle (§5.1). |
| LKINCTRL_NO_OF_START_EXECUTE_CMDS | 1 | Commands buffered on the first cycle (§5.1). |
| LKINCTRL_NO_OF_ZONES | 10 | Number of zone definitions. |
| LKINCTRL_SPTP_EXECUTION_STATUS_OUTPUT | 0 | 0 regular time status · 1 inverted · 2 approximate Cartesian distance. |
| LKINCTRL_DISABLE_FLAG_RESET | FALSE | TRUE disables the automatic flag reset at execute / done. |
| LKINCTRL_NO_OF_CHANNELS | 0 | Number of channels − 1; relevant to the HMI part only. |
| LKINCTRL_PNP_WORKINGHEIGHT_MODE | 1 | 1 workingHeight is the complete height · 2 linear length only. |
Fixed values used to configure PathData commands by name instead of magic numbers. cmdType and flag-mode constants are listed inline in the Commands and Flags sections above; the remaining ones are gathered here.
| Tag | Value | Governs |
|---|---|---|
| LKINCTRL_PATHDATA_TYPE_REDUCED / _NORMAL / _ADVANCED | 1 / 2 / 3 | PathData type constants. |
| LKINCTRL_FM_DISTANCE_TOLERANCE | 0.01 | Tolerance used by flagMode 10. |
| LKINCTRL_NO_OF_VALID_BITS | 6 | Number of valid bits in ParameterValid. |
| LKINCTRL_NO_OF_PATHDATA_PREBUFFER_ELEMENTS | 5 | Number of PreBuffer elements. |
| LKINCTRL_NO_OF_SETFLAGS_BUFFER_ELEMENTS | 15 | Double the PreBuffer element count. |
| LKINCTRL_PI | 3.14159… | Constant value for π. |
| LKINCTRL_COMP_LEFT / _RIGHT | 1 / 2 | Tool-radius compensation side. |
| LKINCTRL_OUTER_CORNER / _INNER_CORNER | 1 / 2 | Linear/linear intersection type for contour offset. |
| LKINCTRL_CIRCMODE_GCODE | 3 | circMode value used in G-code notation. |
| LKINCTRL_CS_NO_OF_FIRST/LAST_USER_FRAME | 11 / 15 | Index range of the five user frames (USER_FRAME_1…5). |
| LKINCTRL_MEAS_CMD_WO_ACK / _WITH_ACK | 1 / 2 | Measurement-command mode (§3.16). |
| LKINCTRL_NO_OF_PATHDATA_ELEMENTS_ADVANCED / _REDUCED | 20 / 10 | Legacy PathData array lengths. |
| LKINCTRL_FIRST/LAST_INDEX_INFO_BUFFER | −10 / 20 | Index range of the buffered-commands info output array. |
Named constants for the same numeric settings TO Kinematics motion commands use directly — for configuring PathData or a standalone FB call without magic numbers.
| Tag | Value | Governs |
|---|---|---|
| BM_BUFFERED / _BLENDING_LOW / _BLENDING_HIGH | 1 / 2 / 5 | bufferMode. |
| DA_DEFAULT / _DEACTIVATED / _WITH_VARIABLE_LIMITS / _WITH_CONSTANT_LIMITS | −1 / 0 / 1 / 2 | dynamicsAdaption. |
| SM_ACTIVE_DYNAMICS / _MAX_DYNAMICS | 0 / 1 | Stop mode dynamics. |
| PC_POSITIVE / _LONG_RUN_POSITIVE / _LONG_RUN_NEGATIVE | 0 / 2 / 3 | pathChoice. |
| CP_XZ / _YZ / _XY | 0 / 1 / 2 | circlePlane / mainPathPlane. |
| CM_BORDER / _CENTER / _RADIUS | 0 / 1 / 2 | circMode. |
| IM_ACTIVE_DYNAMICS / _MAX_DYNAMICS | 0 / 1 | Interrupt mode dynamics. |
| DIRA_POSITIVE / _NEGATIVE / _SHORTEST | 1 / 2 / 3 | orientationDirection / directionA. |
A dozen things the manual flags explicitly, or that fall out of how the mechanism actually works, gathered in one place.
Both commands force the kinematics to standstill first; MovePath drains the motion queue automatically to get there. bufferMode is irrelevant — there is no blending into either command.
The measurement flag aborts its motion command mid-flight on a sensor edge. Whatever comes next cannot blend into that abort point.
bufferMode 2/5 only blends into the sequence when there is no start vector and no cross-OCS tracking change — or when startCoordSystem is set explicitly to cover those cases.
Up to FW 3.0.x, three specific transitions can't blend: finishing tracking, moving straight into a freshly tracked OCS, and switching tracking from one OCS to another back to back.
Linear and circular commands expose remainingDistanceActCmd. sPTP has no path length to measure, so it exposes a time-based executionTimeStatus (0.0–1.0) instead. Only sPTP can change link constellation — a continuous-path move can't leave the current axis-position space.
The same Cartesian fields resolve differently under WCS, OCS[1–3], MCS (100), JCS (101) or a UCS — and switching the active tool moves the TCP with it. A rotated UCS (A, B or C ≠ 0) also rejects circMode 1 and 2 outright.
The axis must be listed on the TO Kinematics conveyor-tracking tab and have a parameter set configured at MovePath's Configuration input. initialObjectPosition only accepts a value on X. sPTP commands are rejected outright while tracking is active.
A GroupStop during active tracking leaves the kinematics still riding the belt. Use stopMode 10/11 for automatic desync on stop, or an explicit cmdType 50.
Combined on the same command, a wait-for-acknowledge mode and an auto-set-after mode on the same flag can leave it permanently unable to reset. Don't combine them.
flagModes 10 and 22 measure to where the next command's blending radius begins, not the literal programmed point.
A stopped path leaves flag-driven actuators exactly as they were — a gripper keeps holding. Only a new rising edge at execute, or MovePath's own done signal, resets the flags.
An invalid point number throws an error rather than being ignored. Use exactly -1 to mean “no reference.”
Shifting a different coordinate system silently resets the previous shift. And insert a linear move to the CS origin before any circular command that immediately follows a shift.
Drawn from the LKinCtrl V5.3 manual (Siemens Industry Online Support, Entry ID 109755891, 04/2026) and its Getting Started manual. This page is a reading aid built for quick lookup — not a substitute for the manual, which remains the authority for anything safety-relevant or version-specific.