You are on page 1of 43

SINAMICS G:

Encoderless
positioning with
SIMATIC S7-1200 /
1500

SINAMICS G, SIMATIC S7-1200/1500 Siemens


Industry
https://support.industry.siemens.com/cs/ww/en/view/109767951 Online
Support
Legal information

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.

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 2
Table of contents

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

Using a proximity switch ..................................................................... 30


3.3.2 Increasing the positioning accuracy for induction motors .................. 31
3.4 Details regarding the principle of operation........................................ 32
Evaluating the speed accuracy .......................................................... 32
Example of a positioning operation .................................................... 33
Response for a U/f characteristic and load surges ............................ 33
Response with field-oriented control and load surges ....................... 34
Influence of the MC servo cycle time on the positioning response .... 34
3.5 Notes regarding motion control instructions ....................................... 39
3.6 Safety ................................................................................................. 41
3.7 Alternative solutions ........................................................................... 41
3.7.1 Evaluating the electrical rotor position angle ..................................... 41
4 Appendix .......................................................................................................... 42
4.1 Service and Support ........................................................................... 42
4.2 Application support ............................................................................. 43
4.3 Links and references .......................................................................... 43
4.4 Change documentation ...................................................................... 43

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 3
1 Introduction

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

Note The following referencing functions are not supported:


- No evaluation of the encoder zero mark or measured value memory in the drive
- No absolute encoder adjustment

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

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 4
1 Introduction

1.2 Principle of operation


In this application example, the position actual value is determined by integrating
the actual speed (drive parameter r63). This method makes practical sense when
using induction motors – but also when using synchronous-reluctance motors. For
synchronous motors and synchronous-reluctance motors, it would also be possible
(and practical) to evaluate the electrical rotor position angle; on the other hand, this
would not provide any advantages for induction motors. For more information on
this topic, see Alternative solutions.

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

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 5
1 Introduction

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

"Revolutions per minute" is realized in the technology object (alternatively, the


calculation can be made in the user program, which is necessary when using the
SIMATIC S7-1200). The actual drive position is required when positioning. This is
why the speed is transferred to a function block provided with the application
example, which then calculates the position. The calculated actual position is then
assigned a data block with the structure of telegram 81; this is used to establish a
communication link between the encoder and the technology object.

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.

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 6
1 Introduction

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.

Fig. 1-3 Motion control instructions


© Siemens AG 2019 All rights reserved

• MC_Power: Enable, inhibit axes


• MC_Reset: Acknowledge fault
• MC_Home: Homing – set home position
• MC_Halt: Stop axes
• MC_MoveRelative: Position axes in relative terms
• MC_MoveAbsolute: Position axes in absolute terms
• MC_MoveVelocity: Traverse axes with speed setpoint
• MC_MoveJog: Move axes in the jog mode
• MC_MoveSuperimposed: Positioning axes superimposed

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 7
1 Introduction

1.3 Classifying the positioning accuracy


The following data provides a rough classification regarding the positioning
accuracy that can be achieved in most applications. We recommend that the
suitability of encoderless positioning is tested using a prototype. The different
positioning accuracies that can be expected depend on the selected operating
mode, selected motor and drive system.

Table 1-1 Typical positioning accuracies for a traversing distance of 1 m


Induction Induction Synchronous Synchronous-
motor motor in reluctance motor3 reluctance motor
operated VECTOR with SINAMICS
with U/f control2 S120 Booksize and
control1 test signal
technique4
(not part of this
application
example)
Positioning accuracy < 20 mm < 3 mm < 0.2 mm < 0.01 mm
© Siemens AG 2019 All rights reserved

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.

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 8
1 Introduction

1.4 Hardware requirements


SIMATIC controllers
• SIMATIC S7-1200 from firmware version 4.2.3 and technology object V6.0
• SIMATIC S7-1500 from firmware version 2.5 and technology object V4.0
SINAMICS drives
• SINAMICS G110M from firmware 4.7 SP10 with PROFINET interface
• SINAMICS G120C5 from firmware 4.7 SP10 with PROFINET interface
• SINAMICS G120 from firmware 4.7 SP10 with Control Units CU240E-2 PN,
CU240E-2 PN-F and CU250-S PN5/6

1.5 Software requirement


The application was created and tested using TIA Portal V15.1.
© Siemens AG 2019 All rights reserved

5Check whether your firmware and device support synchronous-reluctance motors


6CU250S-2 PN is equipped with an encoder interface. However, it makes sense to use it to
compare between encoderless positioning and positioning with encoder.

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 9
2 Engineering

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

2.2 Interface of the library supplied


For this particular application, actual position XIST1 is not available in the
communication telegram. Instead, actual position XIST1 is calculated in a function
block called "LSlvcPos_XIST1Calc", and assigned a data block with the structure
of telegram 81.

Fig. 2-1 Inputs and outputs of function block LSlvcPos_XIST1Calc


LSlvcPos_XIST1Calc

Bool init XIST1 DWord

UDInt cycletime

LReal actualSpeed
Increments_P
UDInt
erRevolution
BitsInGx_
UDInt
XIST1

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 10
2 Engineering

Table 2-1 Inputs and outputs of function block LSlvcPos_XIST1Calc


Name P type Data Comment
type
init IN Bool Reinitialization if inputs "cycletime",
"Increments_perRevolution" or
"BitsInGxXIST1" are changed during
the runtime. If init is set to "true", then
the system is initialized once after the
control powers up.
cycletime IN UDInt Cycle time of the calling organization
block MC-PreServo. Here, for the
recommended cycle time of 4ms, a
value of 4000000 should be entered, or
variable "Cycletime" of the calling
organization block MC-PreServo is
linked (S7-1500).
actualSpeed IN LReal S7-1500:
Here, link variable
"TO_Axis".ActualSpeed
S7-1200:
Calculate the actual motor speed by
directly accessing PROFIdrive telegram
1 or 2 (see Creating the project
configuration)
Increments_perRevolution IN UDInt A fictitious encoder resolution is
required to calculate XIST1. Here,
© Siemens AG 2019 All rights reserved

BitsInGxXIST1 IN UDInt parameterize the same values as you


set in screen form Technology objects
>> Axisname >> Hardware interface >>
Data exchange with encoder. The
default values when creating the
technology object are preset.
XIST1 OUT DWord Calculated position actual value. Assign
this output to variable "G1_XIST1" in
data block
"LSlvcPos_VirtualEncoderTel81".

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 11
2 Engineering

The encoder is connected to the technology object via a data block.


The data block has the structure of encoder telegram 81:
Fig. 2-2 Content of data block LSlvcPos_VirtualEncoderTel81 to connect the encoder to the
technology object

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

2.3 Creating the project configuration

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.

Table 2-2 Essential configuration and commissioning steps


No. Action Diagram

1. Create a project in the


project view in the TIA
Portal, and assign a name
– for example:
G120_S71500PosSensorless

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 12
2 Engineering

No. Action Diagram

Double click on "Add new


2. device"

3. 1. Select "Controllers"
2. Select the required
CPU 1
3. Then click on "OK".

2
© Siemens AG 2019 All rights reserved

4. Go into the "Device


configuration" of the CPU

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 13
2 Engineering

No. Action Diagram

5. Configure the PROFINET


interface
1. In "device
configuration", open
"Properties" of the
CPU.
2. In the tree hierarchy,
go to "Ethernet
addresses" of the
PN_interface [X1]
3. Select the "Set IP
address in the project",
and enter the required
IP address.
4. Insert a new subnet
and select this.
5. Select the automatic
generation of the PN
device name.
© Siemens AG 2019 All rights reserved

6. Select the required


SINAMICS drive:
1. In the editor, go to the
"Network view"
2. Then drag the required
SINAMICS G from the
catalog and drop it in
the graphic area.

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 14
2 Engineering

No. Action Diagram

7. Connect the SINAMICS G


to the PROFINET network

1. Drag the PROFINET


interface of the
SINAMICS and drop
into the Profinet
network.
2. The SINAMICS is
assigned to the
PROFINET network
© Siemens AG 2019 All rights reserved

8. In the editor, go to "Device


view" in the properties of
the SINAMICS drive.
1. Select "Device view"
2. Select the drive
3. Click on the Control
Unit

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 15
2 Engineering

No. Action Diagram

9. Under the PROFINET


interface, check the IP
address of the SINAMICS
drive.

10. Under the PROFINET


interface, check the →
telegram configuration
and ensure that standard
telegram 1 is selected.
Here you can also
configure an I/O area for
supplementary data, for
example, to transfer the
status of digital inputs
(r722). This makes sense if,
© Siemens AG 2019 All rights reserved

for example, you are using


a SINAMICS G110M and a
proximity switch is
connected to the drive for
homing.
Parameterizing the SINAMICS G120
12. Carry out the basic
commissioning of the drive
using the wizard.
1. Start the wizard under
"Commissioning"→"Co
mmissioning Wizard".
2. Select application class
"[2] Dynamic Drive
Control (DDC)"
3. Click on "Next".

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 16
2 Engineering

No. Action Diagram

13. Select "Ramp function in


the PLC"
and click on "Next" and run
through the wizard.

14. Enter the motor data,


ensure that telegram 1 is
selected and as
technological application,
© Siemens AG 2019 All rights reserved

select "[1] Dynamic starting


or reversing"

15. Perform a stationary


measurement.
1. Go online with the
device
2. Select Commissioning
→ Motor optimization.
3. Select "Stationary
Measurement"
measuring type
4. Click on "Additional
configuration…"
5. There, enter the cable You should enter the cable resistance (phase value) before
resistance. starting the measurement. The table for copper cables is
shown below:
𝜌⋅𝑙
𝑅=
𝐴

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 17
2 Engineering

No. Action Diagram

𝑅 [Ω] resistance
𝑚𝑚2
𝜌 [Ω⋅ ] specific resistance (copper:
𝑚
𝑚𝑚2
0.01786 Ω⋅ )
𝑚
𝑙 [𝑚] cable length
𝐴[𝑚𝑚²] cross section

16. Perform the stationary


measurement
© Siemens AG 2019 All rights reserved

17. Perform a rotating


measurement.
The motor data are more
precisely captured when
using the rotating
measurement.
When required,
mechanically disconnect
the motor from the load.
The user must then enter
the moment of inertia
precontrol (feedforward
control).

20. After completing the


rotating optimization
(tuning) steps

Upload parameterization:
1. Go offline
2. Backup the data to the
EEPROM

3. Upload the drive


configuration.
4. Back up the project

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 18
2 Engineering

2.4 Integrating the library to calculate the position actual


value
Table 2-3
No. Action Diagram
1. In the TIA Portal, open the
"Libraries" tab, which is located at
the right-hand edge of the screen.

De-archive the library in the TIA


Portal.

2. Open library LSLVCPos.zal15_1


© Siemens AG 2019 All rights reserved

3. Drag the blocks from the library


and drop them in the "Program
blocks" of the PLC.

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 19
2 Engineering

No. Action Diagram


4. Compile your project.

5. Insert a technology object


"TO_PositioningAxis" from Version
V4.0.

6. Parameterize the basis


© Siemens AG 2019 All rights reserved

parameters for your axis under


TO_positioning axis
"Configuration"

7. Select the parameterized


SINAMICS G drive as "Drive".

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 20
2 Engineering

No. Action Diagram

8. Select the data connection "Data


block" as encoder.
© Siemens AG 2019 All rights reserved

Select the data block from the


integrated library as "Data block".
Variable Encoder01 with data type
"PD_TEL81" for an encoder is
already preassigned there. You
must appropriately extend the data
block (for example Encoder02
etc.) if you wish to create several
axes. The default setting
"Incremental" is kept as encoder
type.

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 21
2 Engineering

No. Action Diagram


9. Under "Data exchange with the
drive" keep telegram 1. Leave the
checkmark set for "Automatically
apply…". If you remove the
checkmark, then manually transfer
drive parameter p2000 in
"Reference speed" and p1082 in
"Maximum speed".
"Additional data" is not selected
here, even if supplementary data
was selected above.

10. Under "Data exchange with


encoder", keep the default setting
telegram 81 as well as encoder
data "Increments per revolution"
and "Bits in Gx_XIST1". This is
also the default setting for the
"LSlvcPos_XIST1Calc" block
provided with the application.
© Siemens AG 2019 All rights reserved

However, an encoder resolution is


assumed, which in reality cannot
be achieved.

11. For active as well as passive


homing, setting "Use homing mark
via digital input" is recommended.
If you use a digital input of the
converter, then you can transfer
the status of the digital inputs
(parameter r722) to the control
using a telegram extension.

Complete the configuration of the


technology object.

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 22
2 Engineering

No. Action Diagram


12. Organization blocks OB91 and
OB92 are automatically created
when creating a technology object.
Then insert the OB MC-PreServo.

13. The following blocks are now in


your "Program blocks" folder:
© Siemens AG 2019 All rights reserved

14. Open the OB "MC-PreServo


[OB67]" and call block
"LSlvcPos_XIST1Calc".

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 23
2 Engineering

No. Action Diagram


15. Interconnecting inputs of FB
"LSvlcPos_XIST1Calc".

1. Interconnect variable
"CycleTime" to block input
"cycletime"
2. Interconnect variable
"PositioningAxis.ActualSpeed"
to input "actualSpeed".

3. Accept inputs "Increments per


revolution" and "Bits in
Gx_XIST1" according to the
settings in the technology
object under "Configuration"
→"Hardware
interface"→"Data exchange
with encoder".
Values 2048 and/or 11
correspond to the default
setting.
© Siemens AG 2019 All rights reserved

Note: Variable "PositioningAxis.ActualSpeed" is not available on


the SIMATIC S7-1200. You can calculate the speed yourself by
directly accessing the communication telegram – see
Calculating the speed actual value SIMATIC S7-1200

16. Interconnecting output "xist1" of


the FB "LSvlcPos_XIST1Calc".

Assign output "xist1" to double


word "LSlvcPos_VirtualEncTel81.
Tel81.InputG1_XIST1"

17. Compile your project and transfer


it to the controller.

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 24
2 Engineering

No. Action Diagram


18. You can now traverse the axis
from the control panel

19. You can now write your user


program using PLC Open blocks.
© Siemens AG 2019 All rights reserved

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 25
3 Worth knowing

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.

3.2 Calculating the speed actual value SIMATIC S7-1200


© Siemens AG 2019 All rights reserved

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.

When using standard telegram 1 (communication telegram to the SINAMICS), the


speed actual value can be calculated as follows in the MC-PreServo [OB67]:

#speed :=INT_TO_LREAL(WORD_TO_INT("Achse_1_Drive_IN".NIST_A)) /
16384.0 * "Achse_1".Actor.DriveParameter.ReferenceSpeed;

Axis_1: Name of the technology object


speed : local variable
NIST_A: Speed actual value from the communication interface (telegram 1)

The calculation can be performed in the MC-PreServo [OB67].

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 26
3 Worth knowing

Fig. 3-1 Speed actual value


© Siemens AG 2019 All rights reserved

Fig. 3-2 Calculating the speed actual value in revolutions per minute [rpm] and assigning to
block "LSlvcPos_XIST1Calc" in the MC-PreServo [OB67]

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 27
3 Worth knowing

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.

Selecting a minimum positioning velocity


The motor speed should be selected appropriately high so that the motor speed
can be calculated with the adequate accuracy and displayed. To do this, a
corresponding minimum positioning velocity should be specified for a positioning
operation.

Table 3-1 Parameters for the model switchover


Parameter Parameter text
number

𝑝1755 Motor model changeover speed encoderless operation

𝑝1756 Motor model changeover speed hysteresis encoderless


© Siemens AG 2019 All rights reserved

For induction motors, the minimum speed is:


𝑛 > 𝑝1755 ⋅ (1 − 𝑝1756) ⋅ 0.5
as here the adaptation controller starts to calculate the speed.
For synchronous-reluctance motors a speed of
𝑛 > 𝑝1755
should be selected.

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:

Acceleration: 120 mm/s²


Deceleration: 120 mm/s²
Jerk: 1200 mm/s³

The following values are parameterized in the drive:


p1755 = 200 rpm; p1756 = 50%;

According to the formula above, the following recommended minimum speed is


obtained:

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 28
3 Worth knowing

𝑛 > 𝑝1755 ⋅ (1 − 𝑝1756) ⋅ 0.5 = 200 𝑟𝑝𝑚 ⋅ (1 − 50%) ⋅ 0.5 = 50 𝑟𝑝𝑚

For a leadscrew pitch of 10 mm (1:1 gearbox ratio) this corresponds to a minimum


velocity of 8.33 mm/s (= 50 rpm / 60 * 10 mm).

A blocked axis is not detected for an especially low positioning velocity:


Fig. 3-3 Positioning task with a positioning length of 5 mm and low setpoint velocity of
5.0 mm/s

Red curve: Speed setpoint (drive parameter r62)


Green curve: Calculated speed actual value (drive parameter r63[0])
Blue curve: Speed actual value of the encoder mounted
for the test

A blocked axis is detected at a very early stage if the positioning velocity is


adequately high:
© Siemens AG 2019 All rights reserved

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.

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 29
3 Worth knowing

Fig. 3-5 Activating the following error monitoring

Using a proximity switch


You can also check a positioning operation by installing a proximity switch. This
means that when the proximity switch is passed, you can evaluate the signal in
your user program.
© Siemens AG 2019 All rights reserved

This also means that passive homing is possible:

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 30
3 Worth knowing

Fig. 3-6 Configuration example for passive homing


© Siemens AG 2019 All rights reserved

3.3.2 Increasing the positioning accuracy for induction motors

The positioning accuracy is essentially determined by the accuracy of the model


calculation of the torque-generating current and the rated slip of the induction
motor.
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.
If the expected positioning accuracy is not achieved, it is more practical to adapt
the leadscrew pitch in the configuration screen forms of the SIMATIC technology
object rather than changing parameters in the drive.
To do this, perform typical positioning operations and measure the actual
positioning distance. A relative positioning of 1 m was specified in the following
example. The axis actually traversed through a distance of 1.01m, which was able
to be repeated. This deviation of one percent was taken into account using the
leadscrew pitch.

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 31
3 Worth knowing

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

3.4 Details regarding the principle of operation


The position actual value is generated by integrating the calculated speed actual
value.

Evaluating the speed accuracy


The described integration technique to determine the position actual value
assumes the most accurate calculation of the speed actual value possible (drive
parameter r63).
To do this, determine the equivalent circuit diagram data as accurately as possible
by entering the correct cable resistance and performing stationary and rotating
measurements. An existing temperature sensor (for example PT1000) should be
evaluated so that the motor model can compensate any temperature effects as well

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 32
3 Worth knowing

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.

Example of a positioning operation


The calculated speed actual value is compared with the value from a mounted
encoder (red) in the following traces. The encoder position actual value r482
characteristic is also shown (blue) – resolution 1024 pulses and pulse quadrupling
(drive parameter p418 = 2). A position change of 409600 increments represents a
traversing distance of 1000 mm.

𝑇𝑟𝑎𝑣𝑒𝑟𝑠𝑖𝑛𝑔 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒
Number of increments = pulse number * 2𝐹𝑖𝑛𝑒 𝑟𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 ∗
𝐿𝑈 𝑝𝑒𝑟 𝑙𝑜𝑎𝑑 𝑟𝑒𝑣𝑜𝑙𝑢𝑡𝑖𝑜𝑛
1000 𝑚𝑚
Number of increments = 1024 * 22 ∗ = 409600
10 𝑚𝑚

Fig. 3-9 Example of a positioning operation


© Siemens AG 2019 All rights reserved

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.

Response for a U/f characteristic and load surges


Fig. 3-10 Positioning operation with load surges and U/f characteristic (p1300 = 1)

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.

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 33
3 Worth knowing

Response with field-oriented control and load surges


Fig. 3-11 Positioning operation with load surges and field oriented-control (p1300 = 20)

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

procedure to achieve this is described in Chapter Creating the project


configuration.

Influence of the MC servo cycle time on the positioning response


The recommended cycle time of the MC servo block [OB91] is 4 ms.

Fig. 3-12 Setting the MC servo cycle time [OB91]

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.

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 34
3 Worth knowing

Fig. 3-13 Drive response for a 4 ms MC servo cycle time [OB91]

Fig. 3-14 Drive response for a 10 ms MC servo cycle time [OB91]


© Siemens AG 2019 All rights reserved

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.

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 35
3 Worth knowing

Fig. 3-15 Calculation example for torque precontrol (TorquePreControlCalc function) in


SIMATIC S7-1500
© Siemens AG 2019 All rights reserved

Fig. 3-16 Example call for FC "TorquePreControlCalc" in the MC-PostServo [OB95]

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 36
3 Worth knowing

Fig. 3-17 Telegram extension to transfer the torque precontrol


© Siemens AG 2019 All rights reserved

Fig. 3-18 Creating an output variable to transfer the torque precontrol from the address area
of the supplementary data (extension)

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 37
3 Worth knowing

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

Fig. 3-20 Interconnecting the supplementary torque in the drive


© Siemens AG 2019 All rights reserved

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

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 38
3 Worth knowing

3.5 Notes regarding motion control instructions


Homing
Active homing can be performed. To do this, select the following setting and assign
a digital input.
Fig. 3-21 Setting in the "Active Homing" screen form

Passive homing while traversing


© Siemens AG 2019 All rights reserved

Homing is subsequently possible while traversing using proximity switches. There


is also a method that involves installing a proximity switch before the target position
to home the axis at that position and/or to trigger a new positioning task.

Fig. 3-22 Example of a setting in the "Passive Homing" screen form

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:

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 39
3 Worth knowing

Fig. 3-23 Homing and subsequent repositioning via digital input

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:

Fig. 3-24 Using MC_RESET to reset the homed status

In the user program, the "Homed" bit can be checked in the status word (bit 5):

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 40
3 Worth knowing

3.6 Safety
Regarding safety, the same general conditions apply as for closed-loop speed
controlled axes.

3.7 Alternative solutions


3.7.1 Evaluating the electrical rotor position angle

For synchronous motors or synchronous-reluctance motors in conjunction with the


SINAMICS S120 Booksize drive system, there is also an interesting variant, where
the position actual value is derived by summing the rotor position angle. The
electrical rotor position angle is evaluated (drive parameter r94), and the position
actual value XIST1 is derived by appropriately summing. Typically, positioning
accuracies of <0.4° at the motor shaft are achieved. In this case, an isochronous
connection to a SIMATIC S7-1500 should be selected, as in this case, it is not
permissible that any subsampling occurs. The rotor position angle must be
sampled at least twice per 360°.
This method is not implemented in this application example. If you have such an
application, then contact Application support.
© Siemens AG 2019 All rights reserved

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 41
4 Appendix

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

SITRAIN – Training for Industry


With our globally available training courses for our products and solutions, we
provide you with practical support through innovative learning methods and with a
customer-specific, harmonized concept.
More information is available on the various training courses as well as locations
and dates at:
www.siemens.com/sitrain

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

Industry Online Support App


You will receive optimum support wherever you are with the "Siemens Industry
Online Support" App. The App is available for Apple iOS, Android and
Windows phones:
support.industry.siemens.com/cs/ww/de/sc/2067

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 42
4 Appendix

4.2 Application support


Siemens AG
Digital Industries
Factory Automation
Production Machines
DI FA PMA APC
Frauenauracher Str. 80
91056 Erlangen, Germany
mailto: tech.team.motioncontrol@siemens.com

4.3 Links and references


Table 4-1
No. Subject
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Link to the entry page of the application example
https://support.industry.siemens.com/cs/ww/en/view/109767951
\3\
© Siemens AG 2019 All rights reserved

4.4 Change documentation


Table 4-2
Version Date Change
V1.0 06/2019 First edition

Encoderless Positioning with SIMATIC S7-1200/1500


Entry ID: 109767951, V1.0, 06/2019 43

You might also like