Professional Documents
Culture Documents
SINAMICS G - Encoderless Positioning With SIMATIC
SINAMICS G - Encoderless Positioning With SIMATIC
Encoderless
positioning with
SIMATIC S7-1200 /
1500
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 2019 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 Introduction ........................................................................................................ 4
1.1 Overview............................................................................................... 4
Functionality ......................................................................................... 4
1.2 Principle of operation............................................................................ 5
Programming environment ................................................................... 6
1.3 Classifying the positioning accuracy .................................................... 8
1.4 Hardware requirements ........................................................................ 9
1.5 Software requirement ........................................................................... 9
2 Engineering ...................................................................................................... 10
2.1 Hardware configuration ...................................................................... 10
2.2 Interface of the library supplied .......................................................... 10
2.3 Creating the project configuration ...................................................... 12
2.4 Integrating the library to calculate the position actual value .............. 19
3 Worth knowing ................................................................................................. 26
3.1 Fundamentals ..................................................................................... 26
3.2 Calculating the speed actual value SIMATIC S7-1200 ...................... 26
3.3 Recommendations ............................................................................. 28
3.3.1 Monitoring the positioning operation .................................................. 28
Selecting a minimum positioning velocity........................................... 28
© Siemens AG 2019 All rights reserved
1 Introduction
1.1 Overview
SIMATIC S7-1200 and S7-1500 automation systems support the controlled
positioning of electrically driven axes. Technology objects are used for this
purpose.
Communications to the SINAMICS drive system is established via standard
telegrams according to the PROFIdrive profile. The motion control intelligence is
embedded in the SIMATIC, where an application-specific setpoint profile is
generated. The drive follows this setpoint profile, and position deviations are
compensated using the position controller integrated in the SIMATIC.
In most applications, measuring systems are used to determine position actual
values; for example, a motor encoder or measuring systems mounted on the load
side. Based on these systems and depending on the encoder type used, the
highest positioning accuracies can be achieved.
There are also many applications where high-resolution encoders are not
necessary when it comes to achieving positioning accuracy - and in fact, in some
cases, an encoder is not required at all.
The subsequent application example discusses the various options and secondary
conditions relating to encoderless positioning.
© Siemens AG 2019 All rights reserved
Functionality
This application example facilitates the following encoderless positioning functions:
• Absolute or relative positioning
• Jogging and setting-up operation
• Active as well as passive referencing
• Linear and rotary axes
Applications
Basic positioning axes with low demands placed on the positioning accuracy
• Feeder and transport axes in conveyor systems
• Compensation of speed dips when loads are transferred/transitioned; for
example, for conveyor belts running one after the other
• Position tracking functionality for conveyor systems
• Feeding packages into sorting systems
With this application example, the motion intelligence is embedded in the control. In
addition to the user program, which contains the motion instructions according to
PLCopen®, the technology object provides a series of usability features that are
shown in the following diagram.
Fig. 1-1
Program Monitoring
Messages
© Siemens AG 2019 All rights reserved
Diagnostic
Buffer
Limits
Inter-
face
Normalization
Mechanics
Drive
The principle interface between the encoder and the SINAMICS G120 drive within
technology object PositioningAxis is shown in the following diagram. In this
particular application example, data is exchanged with the encoder via a data
block. Based on the actual speed, the function block calculates the actual position
XIST1.
Fig. 1-2 Schematic showing the data exchange between the encoder, drive and technology
object in this application example
The technology object sends the setpoint to the drive. This also receives the actual
drive speed in a scaled representation type. The conversion into SI unit
© Siemens AG 2019 All rights reserved
Programming environment
PLC open blocks for programming are available in the TIA Portal.
You control the axis from the user program using the motion control instructions.
The instructions start motion control tasks that execute the required functions.
You can obtain the status of the motion control tasks - and any fault messages that
occur when they are being executed - from the output parameters of the motion
control instructions.
The motion control instructions that are available are in the TIA Portal in the
"Instructions" task card in Category "Technology" in the "Motion Control" folder.
1 Essential dependency on the motor slip while positioning. The highest repeat accuracy is
achieved when using the same load, positioning length, acceleration, deceleration, jerk and
velocity. Typical application: Motors with a very low power rating (P < 100 W); several motors
connected to one drive unit. Can only be used for passive loads (no external disturbing
influences at standstill). The closed-loop drive controller cannot identify when the motor is
locked (cannot turn).
2 Depends on the determination and input of correct motor equivalent circuit diagram data. If
necessary, the leadscrew pitch must be adapted - see Increasing the positioning accuracy for
induction motors. The average motor speed while positioning should be >50 % of the rated
motor speed; this in turn means that short distances as well as low positioning velocities result
in inaccuracies. In principle, a positioning velocity in the range of the rated motor speed is the
preferred approach. If the same path is to be traversed, then this should be realized with the
same dynamic response values. Can only be used for passive loads (no external disturbing
influences at standstill). In principle, motors with lower rated slip are the preferred choice.
3 Motors are saved as catalog-listed motors. Positioning speeds should be higher than drive
parameter p1755. Value was determined with a cycle time of 4.0 ms of the MC servo [OB91].
4 Not part of this application example. Isochronous connection to a SIMATIC S7-1500. (see
Alternative solutions). Typically, accuracies of < 0.4 are achieved at the motor shaft. For a
movement of 10 mm on the load side per motor revolution this corresponds to an accuracy of
0.01 mm.
2 Engineering
2.1 Hardware configuration
The minimum hardware configuration required is shown below. A SIMATIC S7-
1200 or S7-1500 automation system communicates via PROFINET with a
connected SINAMICS G drive. The motor is connected to the drive via the motor
cable. An encoder is not connected. A temperature sensor can also be connected
as well as an optional motor brake. Additional sensors can also be connected to
the SIMATIC or the drive – see Monitoring the positioning operation
SIMATIC
S7-1200/1500
PROFINET
SI
NA
© Siemens AG 2019 All rights reserved
motor
cable
motor
UDInt cycletime
LReal actualSpeed
Increments_P
UDInt
erRevolution
BitsInGx_
UDInt
XIST1
From this encoder telegram, only double word G1_XIST1 is used. In conjunction
with the measured value memory functionality or when using absolute encoders, all
other words in telegram 81 are required; however, this application does not support
this functionality.
Position G1_XIST1 is determined using the function block provided with the
application. From this, corresponding to the encoder and mechanical settings, the
technology object calculates a position actual value in physical units, for example,
in millimeters.
© Siemens AG 2019 All rights reserved
The essential configuration and commissioning steps are subsequently described. The
diagram excerpts have been taken from the connection between a S7-1500 and a
SINAMICS G120. There is an essential difference when connected to a SIMATIC S7-1200
as the configuration screen forms of the S7-1200 and S7-1500 are in some cases different.
3. 1. Select "Controllers"
2. Select the required
CPU 1
3. Then click on "OK".
2
© Siemens AG 2019 All rights reserved
𝑅 [Ω] resistance
𝑚𝑚2
𝜌 [Ω⋅ ] specific resistance (copper:
𝑚
𝑚𝑚2
0.01786 Ω⋅ )
𝑚
𝑙 [𝑚] cable length
𝐴[𝑚𝑚²] cross section
Upload parameterization:
1. Go offline
2. Backup the data to the
EEPROM
1. Interconnect variable
"CycleTime" to block input
"cycletime"
2. Interconnect variable
"PositioningAxis.ActualSpeed"
to input "actualSpeed".
3 Worth knowing
3.1 Fundamentals
When it comes to induction motors, the accuracy especially depends on the quality
of the motor data, and the internal calculation algorithms used in the drive. Here,
the speed accuracy – and therefore the positioning accuracy – benefit from the
automatic motor identification technique and extensive motor model algorithms
used in the SINAMICS drive system. It is advantageous to use a temperature
sensor (KTY84 or PT1000) to optimally take into account temperature effects,
which impact the model calculation. If a temperature sensor is not used, the
SINAMICS G has a thermal multi-mass model, which also adapts the motor model
data as a function of the temperature. In this case, the motor weight (parameter:
p344) should be entered as precisely as possible.
In the controlled model, the effect of the load is taken into account in the speed
actual value (parameter r63). As a consequence, appropriately high position
velocities are advantageous.
The controlled model starts at the latest at a speed of >p1755. The model change
(from open-loop controlled to closed-loop controlled) starts earlier if a time between
0 and 2000ms is parameterized in parameter p1759. Refer to the descriptions for
parameters p1755, p1756 and p1759 for additional information.
Block "LSlvcPos_XIST1Calc" must also be supplied with the actual motor speed in
revolutions per minute [rpm]. Contrary to the SIMATIC S7-1500, for SIMATIC S7-
1200, this value is not available in the technology data block.
#speed :=INT_TO_LREAL(WORD_TO_INT("Achse_1_Drive_IN".NIST_A)) /
16384.0 * "Achse_1".Actor.DriveParameter.ReferenceSpeed;
Fig. 3-2 Calculating the speed actual value in revolutions per minute [rpm] and assigning to
block "LSlvcPos_XIST1Calc" in the MC-PreServo [OB67]
3.3 Recommendations
3.3.1 Monitoring the positioning operation
Since there is no motor encoder and no direct position measuring system in the
application described here, the motion can be made plausible by using the
following monitoring functions. The following description is applicable if p1300 = 20
is parameterized in drive parameter.
The positioning length must be adequately long so that this minimum speed (and
therefore the minimum positioning velocity) is reached at all. Depending on the
acceleration, this minimum positioning velocity is already reached after just a few
millimeters.
Example:
An axis is to be traversed through 5 mm. The spindle is directly installed (i.e.
without gearbox) with a leadscrew pitch of 10 mm. This means that the motor
should rotate through just half a revolution.
The following dynamic response values are selected:
Fig. 3-4 Positioning task with a positioning length of 5 mm and a setpoint velocity of
50.0 mm/s
Here, SINAMICS correctly calculates the speed actual value from approximately
50 rpm. A position difference is identified in the control as the position actual value
no longer increases. Here, the following error was set to 1 mm. The control
responds and indicates that a following error has occurred. The speed of 50 rpm
was already reached after approximately 130 ms - or a distance of 0.25 mm.
Note Set plausible values for the following error monitoring. This means that a blocked
axis can be detected starting at a minimum velocity.
Fig. 3-7 Specification of the leadscrew pitch based on the mechanical arrangement
Fig. 3-8 Changing the leadscrew pitch to take into account motor model deviations
© Siemens AG 2019 All rights reserved
as possible. If a temperature sensor is not available, then the motor weight should
be entered as precisely as possible. The SINAMICS drive system has a suitable
motor temperature model.
Operation with a U/f characteristic can be advantageous, especially for very small
motors (power rating < 100 Watt). However, this results in some restrictions, as
described in Details regarding the principle of operation.
𝑇𝑟𝑎𝑣𝑒𝑟𝑠𝑖𝑛𝑔 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒
Number of increments = pulse number * 2𝐹𝑖𝑛𝑒 𝑟𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 ∗
𝐿𝑈 𝑝𝑒𝑟 𝑙𝑜𝑎𝑑 𝑟𝑒𝑣𝑜𝑙𝑢𝑡𝑖𝑜𝑛
1000 𝑚𝑚
Number of increments = 1024 * 22 ∗ = 409600
10 𝑚𝑚
In this example, a setpoint of 1000 mm was entered. The axis actually moved
1000.7 mm, which can be seen in the form of the blue curve. No load steps were
entered.
Here, a setpoint of 1000 mm was entered. As a result of the externally applied load
surges, the axis actually only moved 943.21 mm. The red curve shows the
calculated speed actual value r63 for a U/f characteristic, which is significantly
more inaccurate than for field-oriented control. For the U/f characteristic (drive
parameter p1300 <= 19), a significant deviation can be identified between the
calculated speed actual value and the actual speed value (green curve). This
means that it is hardly possible for the position controller to compensate for the
position loss. As a consequence, this method is not suitable if the axis is subject to
dominant load surges.
In this example, a setpoint of 1000 mm was entered. In this case, the axis moved
1000.1 mm (comparison measurement with an encoder mounted on the motor
shaft – 4096 increments represent one motor revolution = 10 mm)
The trace also shows just how accurately the SINAMICS drive system determines
the speed actual value in field-oriented control (drive parameter p1300 = 20). The
calculated speed actual value (parameter r63, red curve) and the speed actual
value (green curve) measured with an encoder mounted on the motor shaft are
shown. These are essentially superimposable. Prerequisites to achieve this are the
appropriate motor data and the appropriately set control parameters. The
© Siemens AG 2019 All rights reserved
The speed actual value and the torque precontrol (feedforward control) for a
specific test setup with different MC servo cycle times are shown in the following
traces. The drive settings are the same. The torque precontrol is steadier for a
cycle time of 4 ms than for 10 ms. Here, the SINAMICS S120 drive system would
have an advantage as a result of the optional isochronous connection.
In both traces, the torque precontrol smoothing (parameter p1517) was changed
from the default setting of 4 ms to 20 ms. Otherwise, the torque precontrol noise for
an MC servo cycle time of 10 ms would be more significant.
Note For the SIMATIC S7-1500, the torque precontrol can also be calculated in a
higher-level control system and transferred to the drive via supplementary data.
TO variable "PositioningAxis“.Acceleration with the appropriate scaling factor can
be used for this purpose.
Even for MC servo cycle times of >4ms, this results in a far steadier torque
characteristic.
Fig. 3-18 Creating an output variable to transfer the torque precontrol from the address area
of the supplementary data (extension)
Fig. 3-19 Deactivating the internal torque precontrol p1496 = 0 % in the drive, as in this
chapter, the torque precontrol is calculated in the control
You can now trace the following signals to test the system:
– r63: Speed actual value
– r1516: Torque precontrol
– r1508: Torque setpoint before the supplementary torque (ideally, this
should be7 0)
– r80: Torque actual value (ideally, this value is almost superimposable with
r1516)
7 For real physical setups, the speed controller must compensate friction and system deviations
A SIMATIC digital input or a drive digital input can be used as digital input, for
example. If the digital input is connected at the drive device, then the status of the
digital inputs (drive parameter r722) must be transferred using supplementary data.
Here, no measured value memory functionality is used. As a consequence, transfer
is especially dependent on the MC servo cycle time and therefore has an
associated dead time.
An example where an axis was homed to a digital input and then a new positioning
task was started is shown in the following trace:
The technology object measuring probe can be created below the technology
object. A SIMATIC technology module can be used for this purpose. Using these
additional hardware components, dead times are appropriately taken into account
and higher accuracies are achieved.
© Siemens AG 2019 All rights reserved
Absolute positioning
When the axis is switched off, and for low (setpoint) speeds (below drive parameter
p1755), it is not detected if the axis is shifted as a result of an external force
applied to it.
In cases such as these, for absolute positioning, the axis should again be set to
"Not homed". For example, this is possible using the MC_reset block with restart:
In the user program, the "Homed" bit can be checked in the status word (bit 5):
3.6 Safety
Regarding safety, the same general conditions apply as for closed-loop speed
controlled axes.
4 Appendix
4.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 and application examples – all
information can be obtained with just a few mouse clicks:
support.industry.siemens.com
Technical Support
The Technical Support of Siemens Industry provides you with fast and competent
support regarding all technical queries with many customized portfolio elements
– ranging from basic support to individual support contracts.
Use the web form to send requests to Technical Support:
www.siemens.com/industry/supportrequest
© Siemens AG 2019 All rights reserved
Service portfolio
Our service portfolio includes the following:
• Plant data services
• Spare part services
• Repair services
• On-site and maintenance services
• Retrofit and modernization services
• Service programs and contracts
You can find more detailed information about our service portfolio in the service
catalog:
support.industry.siemens.com/cs/sc