Simatic - All About Motion Control - Guide PDF
Simatic - All About Motion Control - Guide PDF
Simatic - All About Motion Control - Guide PDF
Legal information
Use of application examples
Application examples illustrate the solution of automation tasks through an interaction of several
components in the form of text, graphics and/or software modules. The application examples are
a free service by Siemens AG and/or a subsidiary of Siemens AG ("Siemens"). They are
non-binding and make no claim to completeness or functionality regarding configuration and
equipment. The application examples merely offer help with typical tasks; they do not constitute
customer-specific solutions. You yourself are responsible for the proper and safe operation of the
products in accordance with applicable regulations and must also check the function of the
respective application example and customize it for your system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right to have the
application examples used by technically trained personnel. Any change to the application
examples is your responsibility. Sharing the application examples with third parties or copying the
application examples or excerpts thereof is permitted only in combination with your own products.
The application examples are not required to undergo the customary tests and quality inspections
of a chargeable product; they may have functional and performance defects as well as errors. It is
your responsibility to use them in such a manner that any malfunctions that may occur do not
result in property damage or injury to persons.
Disclaimer of liability
Siemens shall not assume any liability, for any legal reason whatsoever, including, without
limitation, liability for the usability, availability, completeness and freedom from defects of the
application examples as well as for related information, configuration and performance data and
any damage caused thereby. This shall not apply in cases of mandatory liability, for example
under the German Product Liability Act, or in cases of intent, gross negligence, or culpable loss of
life, bodily injury or damage to health, non-compliance with a guarantee, fraudulent
non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for
damages arising from a breach of material contractual obligations shall however be limited to the
© Siemens AG 2021 All rights reserved
foreseeable damage typical of the type of agreement, unless liability arises from intent or gross
negligence or is based on loss of life, bodily injury or damage to health. The foregoing provisions
do not imply any change in the burden of proof to your detriment. You shall indemnify Siemens
against existing or future claims of third parties in this connection except where Siemens is
mandatorily liable.
By using the application examples you acknowledge that Siemens cannot be held liable for any
damage beyond the liability provisions described.
Other information
Siemens reserves the right to make changes to the application examples at any time without
notice. In case of discrepancies between the suggestions in the application examples and other
Siemens publications such as catalogs, the content of the other documentation shall have
precedence.
The Siemens terms of use (https://support.industry.siemens.com) shall also apply.
Security information
Siemens provides products and solutions with Industrial Security functions that support the secure
operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary
to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept.
Siemens’ products and solutions constitute one element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines
and networks. Such systems, machines and components should only be connected to an
enterprise network or the Internet if and to the extent such a connection is necessary and only
when appropriate security measures (e.g. firewalls and/or network segmentation) are in place.
For additional information on industrial security measures that may be implemented, please visit
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends that product updates are applied as soon as they are available
and that the latest product versions are used. Use of product versions that are no longer
supported, and failure to apply the latest updates may increase customer’s exposure to cyber
threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed
at: https://www.siemens.com/industrialsecurity.
Table of contents
Legal information ......................................................................................................... 2
1 General Programming / Standardization ......................................................... 7
1.1 S7-1200/S7-1500: Programming Guidelines and Programming
Styleguide ............................................................................................. 7
1.2 S7-1500: Guide to Standardization ...................................................... 7
1.3 S7-1200/S7-1500 Guideline on Library Handling in TIA Portal ............ 8
1.4 S7-1200/S7-1500: Library of general functions LGF ........................... 8
1.5 S7-1200/S7-1500 Library of Basic Controls (LBC) .............................. 8
1.6 S7-1200/S7-1500 OMAC PackML V3 Machine and Unit States ......... 9
1.7 S7-1500 SIMATIC ACL ........................................................................ 9
1.8 S7-1500 / S7-1500T SIMATIC Interpreter .......................................... 10
2 Diagnostics and communication ................................................................... 11
2.1 S7-1500 Overview acyclic communication standards to
SINAMICS V90 via PROFINET .......................................................... 11
2.2 S7-1200/S7-1500 Acyclic Data Exchange LAcycCom ....................... 12
2.3 S7-1500 Alarm Handling for SINAMICS drives .................................. 12
2.4 S7-1200/S7-1500 Simple acyclic Function Blocks for controlling
a SINAMICS drives in TIA Portal ....................................................... 12
2.5 S7-1500 Profiling / CPU task trace .................................................... 13
2.6 S7-1200/S7-1500 Libraries for Communication for SIMATIC
Controllers .......................................................................................... 13
© Siemens AG 2021 All rights reserved
3 Safety ................................................................................................................ 14
3.1 S7-1200F/S7-1500(T)F Programming Guideline Safety .................... 14
3.2 S7-1500(T)F Safety Integrated with SINAMICS S120 via
PROFIsafe .......................................................................................... 14
3.3 S7-1200F/S7-1500(T)F SINAMICS Failsafe blocks LDrvSafe ........... 14
3.4 S7-1200F/S7-1500(T)F SIMATIC Micro-Drive Failsafe library
LDrvSafe............................................................................................. 15
3.5 S7-1500(T)F SIMATIC Safe Kinematics – in a nutshell ..................... 15
4 Motion Control ................................................................................................. 16
4.1 General Motion Control ...................................................................... 16
4.1.1 S7-1500/S7-1500T Standard application axis control (LAxisCtrl
& LAxisBasics) ................................................................................... 16
4.1.2 S7-1500 LCalcMC - Calculation of motion profile details................... 17
4.1.3 S7-1500/ S7-1500T LAnyAxis - Motion Control Applications with
DB_ANY ............................................................................................. 17
4.1.4 S7-1500 LPrintMark - Print Mark Acquisition with TO Measuring
Input.................................................................................................... 18
4.1.5 S7-1500 Load balancing (LLoadBal) .................................................. 18
4.1.6 S7-1500 Rapid/Traverse/Creep Speed positioning ........................... 19
4.1.7 S7-1500T Guidelines for filtering and extrapolation with actual
value coupling .................................................................................... 19
4.1.8 S7-1500 Backlash compensation ....................................................... 20
4.1.9 S7-1500 Technology Objects of SIMATIC S7 .................................... 20
4.1.10 S7-1500 Basics of axis control with technology objects and
approach to axis optimization ............................................................. 21
4.1.11 S7-1500 Use of MC-PreServo and MC-PostServo ............................ 21
4.1.12 S7-1500 Which requirements have to be fulfilled before a
technology object can be enabled via "MC_Power"? ........................ 21
4.1.13 S7-1500 SIMATIC Low Frequency Vibration Suppressed
Positioning .......................................................................................... 22
4.1.14 S7-1500 What are the advantages of using the data type
DB_ANY with Motion Control applications? ....................................... 22
4.1.15 SINAMICS Which drives can you use with S7-1500 Motion
Control ................................................................................................ 22
4.1.16 S7-1500 Technology Objects with Sinamics S210 ............................ 23
4.2 Synchronous Operation...................................................................... 24
4.2.1 S7-1500/ S7-1500T Compare of synchronization modes .................. 24
4.2.2 S7-1500T Cross PLC synchronous operation ................................... 24
4.2.3 S7-1500T Set synchronization in simulation - Retain a
synchronized connection when locking the slave axis, for
example .............................................................................................. 24
4.2.4 S7-1500T Creation of cam disks at runtime ....................................... 25
4.2.5 S7-1500T Synchronize in Standstill CamInStandStill ........................ 25
4.2.6 S7-1500T How does a slave axis of camming behave during
"Direct synchronous setting" (SyncProfileReference = 2)? ................ 25
4.2.7 S7-1500T Switchover and generation of cams .................................. 26
4.3 Hydraulic............................................................................................. 27
4.3.1 S7-1500 LSimaHydTO for hydraulic applications .............................. 27
4.3.2 S7-1500 Manual determination of a compensation characteristic
for hydraulic valves and hydraulic axes ............................................. 27
4.4 Motion Control & Drives ..................................................................... 28
4.4.1 SINAMICS SDC: Serial Drive Commissioner..................................... 28
4.4.2 SINAMICS drive optimization guide ................................................... 28
4.4.3 S7-1200/S7-1500 Drive Lib control blocks for TIA Portal .................. 28
4.4.4 S7-1500 Configuring a SINAMICS S120 with Startdrive ................... 29
© Siemens AG 2021 All rights reserved
The library "LGF (Library of general functions)" contains additional functions for
STEP 7 (TIA Portal).
Provided Applications
Application - System Diagnostics with S7-1500 and TIA Portal
Application - Diagnostics in User Program with S7-1500
Application - Machine and Plant Diagnostics with ProDiag
Application - Overview: Diagnostic tools at SIMATIC and SCALANCE
© Siemens 2021 All rights reserved
3 Safety
3.1 S7-1200F/S7-1500(T)F Programming Guideline Safety
This document provides you with many recommendations and notes for the optimal
configuration and programming of S7-1200/1500 controllers. This helps you create
standardized and optimal programming of your automation solutions.
4 Motion Control
This topic page gives you an overview of the essential documents, entries and links
on the topic of Motion Control. The topic Motion Control contains every control task
to the operation of drives and capturing position values with the help of position
sensors.
Function blocks for simple and central control of the basic motion control functions of axes
© Siemens 2021 All rights reserved
(technology objects) of a SIMATIC S7-1500 or S7-1500T. The central view of each axis via
this standard application enables easy programming, fast commissioning and direct testing
of your application.
By means of the library it is possible to create own motion control applications for
various axis types. This is used, for example, for software modules with flexible use
of technology objects or when using axis arrays.
The blocks of the present library support the user in acquiring print marks
via the technology object measuring input in the automation system
SIMATIC S7-1500 or SIMATIC S7-1500T.
The "LLoadBal" library provides a load balancing functionality to be easily integrated into
existing user projects in which several motors act on a common mechanical load and drive it
together.
© Siemens 2021 All rights reserved
4.1.7 S7-1500T Guidelines for filtering and extrapolation with actual value
coupling
This FAQ response provides guidelines for parameterizing the actual value
extrapolation on the "External encoder" technology object. The individual
parameters are explained in detail and the effect of the actual value extrapolation is
demonstrated with examples.
From Motion Control V6.0 (TIA Portal V17 – PLC FW V2.9) the backlash
compensation is integrated in the system features of the technology objects.
The technology objects included in the SIMATIC CPUs simplify the programming of
technological processes. This application example introduces the technology
objects of the SIMATIC S7-1500(T) and shows their use in an example program.
4.1.10 S7-1500 Basics of axis control with technology objects and approach
to axis optimization
In addition to PROFIdrive and analog coupling, the data connection of drive and
encoder to the axis technology object can also be provided via a data block.
Before a technology object can be enabled without error via "MC_Power", all the
necessary sensors (encoders) and actuators (drives) must be available for the
technology object.
With this application the load oscillation for positioning can be reduced significantly.
It is suitable for applications, where low frequency load vibrations occur.
The axis is positioned in a way, so that the load oscillation is exciteted as less as
possible. This way the oscillation on the load side can be reduced significantly,
without having a load encoder.
4.1.14 S7-1500 What are the advantages of using the data type DB_ANY with
Motion Control applications?
You can store all sorts of data blocks in an ARRAY of the data type DB_ANY.
Hence also the technology data block of the technology object of a project. An
ARRAY of the data type DB_ANY can show a list of axes, for example. In this way,
technology objects can be integrated more flexibly in user program.
© Siemens 2021 All rights reserved
4.1.15 SINAMICS Which drives can you use with S7-1500 Motion Control
When you remove the axis enable or in the case of motion jobs on a slave axis, an
active synchronized connection is disconnected. By setting the synchronization in
simulation you can keep the synchronization active without disconnecting it.
The LCamHdl library for SIMATIC and SIMOTION provides function blocks that
support the user in creating high-quality and jerk-free cam disks compliant to VDI
guideline 2143. The necessary calculations of the segments of different profile
types especially of polynomial coefficients and standardizations are done by the
function blocks.
This application example shows how to couple the leading axis and one or more
following axes via setpoint positions in standstill with camming using the instruction
"MC_CamIn".
At the motion control function "MC_CamIn", the parameter setting
“SyncProfileReference" = 2 can be used to set a following axis synchronously with
a leading axis via a cam disk coupling. The master and slave axes must be at the
synchronous position before the function is called (for more information, see also
109758886).
The use of the function blocks described below allows you to move the leading axis
or one or more following axis/axes directly to the synchronous position and then
couple them.
4.2.6 S7-1500T How does a slave axis of camming behave during "Direct
synchronous setting" (SyncProfileReference = 2)?
When 'direct synchronous setting' is performed for a slave axis with the aid of the
"MC_CamIn" motion control function in camming using the "SyncProfileReference"
= 2 parameter setting, the cam is offset based on the current positions of the two
axes and the two axes are synchronized immediately.
A press is created using the components shown in figure. The material is pushed
into the press through a feeder. The motion profile of the feeder is stored in two
cams, which should be switched over during press operation. It should also be
possible to change the values of the cams at any time.
4.3 Hydraulic
4.3.1 S7-1500 LSimaHydTO for hydraulic applications
The "LSimaHydTO" block library enables closed-loop control of hydraulic axes with
the SIMATIC S7-1500(T). With the help of modular function blocks, it is possible to
realize not only valve-controlled hydraulic applications, but also those with variable-
RPM pump drive (servo pump).
Here you can find the DriveLib for reading and writing data from and to the SINAMICS S/G
converter systems within SIMATIC S7-300/400/1200/1500 at TIA Portal. Note: As from
Startdrive V16, the DriveLib library is no longer supplied with Startdrive. As from STEP7
V15.1, these blocks are also provided as instructions.
With Startdrive V15 and V16 you cannot configure machine or external encoders
as encoder DO. You can configure a second encoder on the drive and send the
encoder data to the S7-1500T via telegram 106, but the data cannot be evaluated
in the axis TO. We show you how, you still can evaluate the encoder data with the
aid of a DB and the TO External Encoder.
This entry describes the configuration and optimization of the F-TM ServoDrive and
its connection to the technology object (TO) Positioning axis.
When using the SIMATIC F-TM ServoDrive in positioning tasks in conjunction with
a SIMATIC S7-1500 as well as S7-1200, the design of the mechatronic system for
positioning accuracy is of particular importance.
© Siemens 2021 All rights reserved
With the information and the Excel tool provided in this article you have the
possibility of calculating the positioning accuracy for your individual mechanical
system (motor/gearbox combination). The tool also supports you in determining the
position resolution of your Motion Control application.
4.4.12 Projects for the "Universal demonstration and training case with
SINAMICS S120" V3
You can here downloads projects that can run on "Universal demonstration and
training case with SINAMICS S120, version 3"
4.5 Manuals
4.5.1 S7-1500 Motion Control Overview V6.0 as of STEP 7 V17
This documentation describes the Motion Control functions for the following
technology objects:
• Speed axis
• Positioning axis
• External encoder
4.5.3 S7-1500 Motion Control alarms and error IDs V6.0 as of STEP 7 V17
© Siemens 2021 All rights reserved
This documentation describes the technology alarms of the technology objects and
the error identifications of the motion control instructions.
4.5.4 S7-1500 Measuring input and cam functions V6.0 as of STEP 7 V17
This documentation describes the Motion Control functions for the following
technology objects:
• Measuring input
• Output cam
• Cam track
This documentation describes the Motion Control functions for the following
technology objects:
• Synchronous axis
• Cam (S7-1500T)
• Leading axis proxy (S7-1500T)
This documentation describes the Motion Control functions for the following
technology objects:
• Kinematics (S7-1500T)
This entry includes a detailed signal flow plan of the control structure of a
technology object positioning or synchronous axis of the SIMATIC S7-1500 or
SIMATIC S7-1500T.
The cam editor of the technology object Cam supports the user in creating and
© Siemens 2021 All rights reserved
dimensioning complex curves in the TIA Portal. Cam elements can be added and
parameterized in graphical and tabular form. The transitions between two cam
elements are created automatically. The cam editor supports linear interpolation,
interpolation with cubic and Bézier splines, and the definition of transitions in
compliance with VDI guideline 2143. All changes of the cam are immediately made
visible in the graphical area of the editor and can be validated by various methods
of verification.
5 Integrated Engineering
5.1 SIMATIC Modular Application Creator (MAC)
The Modular Application Creator enables the automatic generation of TIA Portal
projects. Especially with complex machine configurations, such as multi-belt control
or other multi-axis applications, this is very efficient compared to manually creating
and assigning software blocks and parameters to the automation project directly in
the TIA Portal.
© Siemens 2021 All rights reserved
6 Virtual Commissioning
6.1 SIMIT/MCD Virtual commissioning in machine building
In order to reduce risks and effort during the real commissioning, the virtual
commissioning of a machine offers an efficient alternative. With the help of NX
MCD, SIMIT and PLCSIM Advanced you can virtually commission your machine.
7 Handling Toolbox
In order to support the engineering of handling applications there is a collection of
software blocks and libraries for SIMATIC S7-1500 T-CPUs, which simplify the
creation of such applications. Besides an HMI faceplate to control and configure
the kinematics via an HMI there is e.g. an application to easily program path
motions.
8 Converting Toolbox
Do you want to significantly reduce your engineering time based on fully
functioning solutions and tested know-how? Our Converting Toolbox is the perfect
solution to achieve this: The package, which has been specifically created for this
purpose, includes a whole raft of preconfigured software functions and applications
for production machines with continuous material webs.
Converting Toolbox
The SIMATIC Modular Application Creator module for Converting helps you to
generate the technological motion control part of your Converting machine
convenient and without engineering faults. All necessary parameters are
configured wizard based. Afterwards, technology objects including its settings and
interconnections, application libraries, function block calls and the required settings
are generated automatically. Thus, a machine comprising line axis, winder axes,
traversing drives and tension control axes are reliably and quickly generated.
9 Packaging Toolbox
Why reinvent the wheel every time? With the Packaging Toolbox, Siemens offers
packaging-specific technology libraries that can be integrated in existing or new
machine applications along with own blocks, all with minimal effort. This increases
the availability and flexibility of production and reduces substantially engineering
and commissioning times.
10 Multi-Carrier-System Toolbox
The Multi-Carrier-System is a linear motor-based transport system for highly
flexible and modular applications. In order to support the engineering of a Multi-
Carrier-System there is a Toolbox for SIMATIC S7-1500T controllers, which
simplify the creation of such applications. Besides the libraries, it also contains
tools for project generation, visualization and virtual commissioning of the MCS.
n this entry the Siemens products required for the TS 2 Booster from Rexroth will
be provided for the 12 possible variants as an Excel list for download.
11 Print Standard
Printing presses are becoming increasingly flexible and modular. Many functions
that used to be performed mechanically are now implemented with a separate
drive. This leads to comprehensive multi-axis concepts with cross-control
synchronous operation. In conjunction with ever shorter development and
commissioning times, a standardized software solution for motion control with
flexible modules for technology functions is becoming increasingly important. The
Print Standard application with its Add-Ons provide these functionalities.
© Siemens 2021 All rights reserved
The application provides the software parts for communication via PROFINET IRT,
parameterization of the sensor, evaluation of point-, wedge- and block marks,
control of the axis for correction of length and side register deviations, as well as a
visualization example for TIA Portal WinCC Advanced.
13 Metal Forming
13.1 S7-1500T SIMATIC PressAutomation
The Application SIMATIC PressAutomation offers a solution for a quick and easy
automation of systems required for material transport in, through and out of press
systems based in Simatic S7-1500T controllers.
This application example is intended for all engineers an users that wish to
implement a mechanical excentric press based on SIMATIC S7-1500. It realizes all
of the above mentioned functionalities based on following hardware: SIMATIC S7-
1500, TM Timer, AI HS, SINAMICS S120.
14 Appendix
14.1 Service and support
Industry Online Support
Do you have any questions or need assistance?
Siemens Industry Online Support offers round the clock access to our entire
service and support know-how and portfolio.
The Industry Online Support is the central address for information about our
products, solutions and services.
Product information, manuals, downloads, FAQs, application examples and videos
– all information is accessible with just a few mouse clicks:
support.industry.siemens.com
Technical Support
The Technical Support of Siemens Industry provides you fast and competent
support regarding all technical queries with numerous tailor-made offers
– ranging from basic support to individual support contracts.
Please send queries to Technical Support via Web form:
siemens.com/SupportRequest
We support you with our globally available training courses for industry with
practical experience, innovative learning methods and a concept that’s tailored to
the customer’s specific needs.
For more information on our offered trainings and courses, as well as their
locations and dates, refer to our web page:
siemens.com/sitrain
Service offer
Our range of services includes the following:
• Plant data services
• Spare parts services
• Repair services
• On-site and maintenance services
• Retrofitting and modernization services
• Service programs and contracts
You can find detailed information on our range of services in the service catalog
web page:
support.industry.siemens.com/cs/sc
The Siemens Industry Mall is the platform on which the entire siemens Industry
product portfolio is accessible. From the selection of products to the order and the
delivery tracking, the Industry Mall enables the complete purchasing processing –
directly and independently of time and location:
mall.industry.siemens.com