Unofficial notes · SIMATIC S7-1500T · Technology version V10.0 · STEP 7 V21
The Motion Interpreter
With the SIMATIC Motion Interpreter of the S7-1500T CPU you create motion jobs for individual axes and kinematics with up to 6 interpolating axes. The Interpreter executes a series of serial instructions — that sequence is called an Interpreter program.
In contrast to cyclic programming in STEP 7, you do not program step-enabling conditions or ‘job done’ queries — the Interpreter sequences the work itself.
Personal study notes — not a Siemens publication. The manuals on Siemens Industry Online Support are authoritative.
Architecture
Three technology objects
The Interpreter is implemented as a technology object and is controlled from the user program. Click any block below to read what it does.
The key concept
Two clocks: preparation and execution
The single thing that separates MCL from cyclic SCL. The Interpreter runs a look-ahead: jobs are prepared in the MC_LookAhead OB, acyclically and in advance, and then processed in the MC_Interpolator OB. A job executes with the parameters it had AT PREPARATION TIME, not at execution time.
Worked example from the manual: preparation of a motion sequence takes 1.5 s. Wait time 0.0 starts after 1.5 s; wait time 1.0 starts after 1.0 s; wait time 2.0 starts after 1.5 s. Current setting starts after 1.5 s.
When does my line actually run?
x := 5; assigns during PREPARATION · writeVar(x, 5); writes during EXECUTION. Reading a tag returns its value at preparation time.
Executed WITH preparation
Executed AT execution
$IPR.Clipboard.CbDint[1] := 5; // set to 5 during preparation $IPR.Clipboard.CbDint[2] := 5; // set to 5 during preparation $IPR.Clipboard.CbDint[100] := 3; // set to 3 during preparation writeVar( $IPR.Clipboard.CbDint[100], 10 ); // set from 3 to 10 during execution $IPR.Clipboard.CbDint[1] := $IPR.Clipboard.CbDint[100]; // set to 3 during preparation writeVar( $IPR.Clipboard.CbDint[1], $IPR.Clipboard.CbDint[100] ); // writes 3 — the // preparation-time value preHalt( ); // interrupt preparation here writeVar( $IPR.Clipboard.CbDint[2], $IPR.Clipboard.CbDint[100] ); // now writes 10
Centrepiece
MCL path simulator
Step or scrub through three real MCL programs and watch the TCP path build up, coloured by velocity. The source line executing right now is highlighted, TIA-monitoring style.
program 100% × TO 50% = 50% velocity · 50% accel
In MCL, blending is defined in the PRECEDING job — the opposite of the Motion Control instructions.
Reference
Instruction explorer
Every MCL instruction, grouped by family. Search, filter, or click a tile for its description and when it runs.
Bit-string instructions, mathematical functions and conversions are also supported. Max 10 programmable synchronous actions.
Workflow
How to use it
A real, ordered procedure — from mechanics to the first monitored run.
Add the positioning-axis TOs, activate simulation on each if you are running without hardware, assign the drive interface, then add the TO_Kinematics and set its type (the Getting Started basic example uses “Cartesian portal 3D” with three positioning axes) and its interconnections and geometry.
Tip from the manual: adding a PROFIdrive device such as a SINAMICS S210 and configuring IRT improves behaviour under PLCSIM Advanced.
Basic parameters > Connected kinematics — or pick the kinematics in the “Add technology object” dialog, or drag the Interpreter onto the kinematics in the project tree. One Interpreter binds to exactly one kinematics TO.
Interpreter job sequence — max jobs prepared, <TO>.Parameter.MaxNumberOfCommands, 10–100.
Program preparation > Maximum wait time — <TO>.Parameter.StartTimeout, 0.0–2.0 s.
Program preparation > Start value program override — <TO>.Parameter.ProgramOverride, 1–100 %.
Clipboard — start values for CbBool[1..300], CbDint[1..100], CbLreal[1..100].
Mapping > Mapping of technology objects: name in interpreter program + the TO. Mapping > Mapping of variables: name + data block variable (+ Read only where required).
In the Getting Started project this is where the gripper signals live — a “BasicMappingDB” DB whose BOOLs are mapped one-for-one.
Open its programming editor, pick the Interpreter and the Mapping in the two drop-downs at the top, and write the program. The editor has configuration dialogs for instruction parameters, bookmarks, and a 3D visualisation of the kinematics.
The program is interpreted at runtime — it is not compiled in TIA Portal.
Add MC_LoadProgram, MC_RunProgram and MC_StopProgram to the main OB from the instruction browser and wire their instance interfaces. Rising edge on Execute starts each job.
Compile and download to the CPU or a PLCSIM Advanced instance (enable simulation support in the project settings). Drive Execute from a watch table.
Switch on “Monitoring on/off” and “Monitor program execution” in the programming editor — the active line is highlighted in orange; for a loaded but not yet started program that highlight sits on PROGRAM main. Record the TCP with the Kinematics trace under the kinematics TO.
MC_LoadProgram
MC_RunProgram
MC_StopProgram
Diagnostics
StatusWord decoder
Click a bit to see what it means, or replay the handshake below and watch the bits light as it advances.
StatusWord
ErrorWord
WarningWord
Handshake
Branch: MC_StopProgram can move the sequence to X7 Stopping and then X8 Interrupted at any point after loading.
Field notes
Engineer’s notes
The things that bite.
x := value takes effect during PREPARATION; writeVar(x, value) takes effect during EXECUTION. Reading a tag in the Interpreter program returns the value valid at the time of PREPARATION.
Unlike the Motion Control instructions, an MCL motion job carries the blending for the transition INTO the next job.
It works in addition to the technology objects’ own overrides: program override 50 % with a kinematics velocity override of 50 % gives 25 % resulting velocity override, and 50 % for acceleration and deceleration. Changes do not affect jobs already prepared. Range 1–100 %.
The job sequence holds at most 30 kinematics motion jobs whatever <TO_Kinematics>.MotionQueue.MaxNumberOfCommands says.
To load a different or modified program, unload the current one first (MC_LoadProgram Mode 0). After CPU STOP or POWER OFF you must reload.
For motion jobs that do not end automatically, ControlledByInterpreter clears as soon as the TO reaches the specified state — so MC_StopProgram will not cancel them unless you used setControlledByInterpreter().
In “Debug” program mode, MC_StopProgram and MC_Reset with Restart = TRUE are NOT executed for the Interpreter TO, the program runs with a delay and works with preparation-time values, and the dynamics and path can differ from “Automatic” mode. The user program keeps running in parallel and can move other axes. Debug mode exists as of technology version V9.0; V8.0 had “Automatic” only.
If the mapped DB variable has the “Read only” property, the Read only check box must be set for that entry in the mapping.
Only the listed TO_Struct_Ipr_* / TO_Struct_Kinematics_* types map in the Interpreter mapping.
A runtime licence is required per technology CPU: SIMATIC Motion Interpreter basic, 6ES7823-0SJ00-1AA0. You can test the functions with SIMATIC S7-PLCSIM or S7-PLCSIM Advanced.