Position Control With SIMATIC S7-1200 and Sinamics V90 PN (S Mode)
Position Control With SIMATIC S7-1200 and Sinamics V90 PN (S Mode)
SIMATIC S7-1200
and SINAMICS
V90 PN (S mode)
Siemens
SINAMICS V90 PROFINET Version Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109743917 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 2018 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 Task ..................................................................................................................... 4
1.1 Overview............................................................................................... 4
2 Solution............................................................................................................... 5
2.1 Solution overview ................................................................................. 5
2.2 Hardware and Software Components .................................................. 5
2.2.1 Validity .................................................................................................. 5
2.2.2 Used Components ................................................................................ 6
3 Basics ................................................................................................................. 7
3.1 Basics regarding SINAMICS V90 PN version ...................................... 7
3.2 Basic information about using NON-isochronous
communication between PLC and drive ............................................... 8
Real-time Communication (RT) ............................................................ 8
Isochronous Real-time Communication (IRT) ...................................... 8
3.3 Improvements for a better system behavior ....................................... 10
Send clock .......................................................................................... 10
Update time (Bus cycle time) ............................................................. 11
Cycle time for PLC program ............................................................... 11
3.4 Recommendation of time setting with SIMATIC S7-1200 .................. 12
3.5 Recommendation of time setting SIMATIC S7-1500 ......................... 14
Siemens AG 2018 All rights reserved
1 Task
1.1 Overview
Introduction
In this manual the basic application “Position control with a S7-1200 and
SINAMICS V90 PN” will be described in detail.
The SINAMICS V90 PN works in this application in speed control mode (S mode)
and the communication will use PROFINET RT.
The described solution in this document contains the variations which have some
detailed technical issues to look at it.
Profinet cable
Encoder cable
Power cable
2 Solution
2.1 Solution overview
Schema Display
The following figure displays the most important components of the solution:
Figure 2-1
IO Supervisor
IO controller
Siemens AG 2018 All rights reserved
IO device
Delimitation
This application does not include a description of
Profinet communication
SINAMICS V90 PN version
BOP operation of SINAMICS V90
Basic knowledge of these topics is assumed.
Required knowledge
Basic knowledge on TIA Portal is assumed.
Hardware components
Table 2-1
Component No. Article number Note
SIMATIC S7-1200 1217C 1 6ES7217-1AG40-0XB0 V4.1
DC/DC/DC
SINAMICS V90 PN 200V 1 6SL3210-5FB10-4UF0 400W
SIMOTICS S-1FL6 Li 1 1FL6034-2AF21-1AG1 400W
motor
Table 2-3
Component Note
109743917_CPU1217C + V90 PN for Position Control_PROJ_V15.zip Project file
109743917_Standard Application_V90pn_S7_1x00_PositionControl_ Reference document
DOC_en_V1.1.pdf
3 Basics
3.1 Basics regarding SINAMICS V90 PN version
When SINAMICS V90 PN works in the speed control mode (S mode), the following
telegrams are supported:
Standard telegram 1
Standard telegram 2
Standard telegram 3
Standard telegram 5
Siemens telegram 102
Siemens telegram 105
NOTE Siemens telegram 105 is only available with TIA Portal V14, the Hardware
Support Package for V90PN for TIA Portal and in combination with S7-1500 /
1500T.
The standard telegram 1 can be used only for RT mode. The standard telegram 2,
the standard telegram 3 and the standard telegram 102 can be used either for RT
mode or IRT mode depending on the IO controller. The standard telegram 5 and
Siemens AG 2018 All rights reserved
the standard telegram 105 can only support IRT mode and be used with TIA Portal
V14 or higher.
The telegrams 1, 2 and 102 are used for speed control axis while telegrams 3, 5
and 105 are used for positioning axis because these telegrams contain the actual
position of the encoder (Gn_XIST1).
If SIMATIC S7-1200 is used for positioning control then the TO (Technology
Object) Positioning axis has to be used. The TO Positioning axis only supports the
standard telegrams 1, 2 and 3.
Thus, the standard telegram 3 will be used in this basic application.
(Isochronous Real-Time)
PROFINET with RT
(Real-Time)
Siemens AG 2018 All rights reserved
optimal usage of the bandwidth and reach the best possible performance in the
PROFINET IO system.
Use of IRT allows you to achieve update times with highest deterministics ≥ 250 µs
and a jitter accuracy of the send clock < 1 µs. Isochronous applications are
possible with IRT.
Fields of application
Send clock
Send clock is the shortest possible time interval in data exchange.
The calculation of send clock should follow the formula below:
Send clock = 31.25 μs * Send Clock Factor
The send clock factor is 2n (n is an integral value from 0 to 9), while 31.25 μs is the
basic time unit.
Siemens AG 2018 All rights reserved
Figure 3-3 Send clock in TIA Portal (follow step 1 to 2 to do the change of send clock)
Figure 3-4 update time (bus cycle time) in TIA Portal (follow step 1 to 3 to change the bus
cycle time)
Siemens AG 2018 All rights reserved
T1: cycle time for PLC program T2: Bus cycle time
NOTE When SINAMICS V90 PN works in RT communication, the minimum cycle time
is unchangeable and fixed to be 4 ms.
Following selections of bus cycle time are recommended according to our test:
Table 3-3 Recommended Bus cycle time (in ms) for SIMATIC S7-1200
OB91 cycle time Bus cycle time (IO cycle) Min. cycle time in V90 PN
2 1 4
4 1 4
8 1 4
12 1 4
16 1 4
2 2 4
4 2 4
8 2 4
12 2 4
16 2 4
2 4 4
4 4 4
8 4 4
16 4 4
Figure 3-6 Example 1 of torque/speed (OB91 cycle time = 8 ms; bus cycle time = 4 ms)
Figure 3-7 Example 2 of torque/speed (OB91 cycle time = 10 ms; bus cycle time = 4 ms)
Siemens AG 2018 All rights reserved
NOTE In standard applications with S7-1500(T) and V90 PN the IRT communication is
recommended. If there is a necessary case to setup PROFINET RT then the
following description can be used.
When the RT communication has been selected, the cycle time for OB91 is
changeable and can be adjusted according to actual application.
Usually, the following rules during the configuration of OB91 cycle time and bus
cycle time must be observed:
The ratio between OB91 cycle time and Bus cycle time or vice versa must be
an even integral value
Siemens AG 2018 All rights reserved
Table 3-4 Recommended time configurations (in ms) for SIMATIC S7-1500
OB91 cycle time Bus cycle time (IO cycle) Min. cycle time in V90 PN
2 1 4
4 1 4
8 1 4
12 1 4
16 1 4
2 2 4
4 2 4
8 2 4
12 2 4
16 2 4
2 4 4
4 4 4
8 4 4
12 4 4
16 4 4
2 8 4
4 8 4
8 8 4
16 8 4
Figure 3-8 Example 1 of torque/speed (OB91 cycle time = 4 ms; bus cycle time = 2 ms)
Figure 3-9 Example 2 of torque/speed (OB91 cycle time = 4 ms; bus cycle time = 3 ms)
Siemens AG 2018 All rights reserved
Figure 3-1
L
1-phase N
230V
PE
L1 L2 PE
L1 N PE
SIMATIC S7-1200
CPU 1217C
X1P1 X1P2 24V+ 0V PE
SINAMICS V90 PN
Siemens AG 2018 All rights reserved
U V W Port2 Port1
Table 3-1
Nr. Action Remarks
1. Set drive parameter p29108 to be 1. JOG function is enabled when p29108=1
2. Switch to JOG menu with drive BOP operation.
3. Press or button to run the motor.
4.
4 Configuration
In this chapter the configurations for position control with RT mode will be
described in detail. The used standard telegram is “3”.
Network:
2. Here, if you know the detailed information about the S7-1200 modules, you
can directly find the type and add it into the project
Siemens AG 2018 All rights reserved
Otherwise, you can add an unspecified CPU 1200 into the project:
3. If an unspecified 1200 CPU has been added into the project, you can
detect the connected CPU by clicking the “Detect” and search it with online
access:
Start the search by clicking the “Start search” button, and the connected
S7-1200 CPU will be found if the PROFINET network communication
works properly:
Siemens AG 2018 All rights reserved
Add SINAMICS V90 PN into the project in the TIA Portal as follows:
1. Input the V90 PN GSD file.
NOTE For the GSD file, you can download from following internet site:
https://support.industry.siemens.com/cs/ww/en/view/109737269
2. Find the GSD file and select it. Press the “Install” button to install it.
Siemens AG 2018 All rights reserved
3. In the network view, select V90 PN from the “other filed drives” of catalog
tree on the right side.
Here, you can configure information about the device name, Ethernet
address…
You can also use the “Online access” to find the accessible device and make
sure the information is consistent:
NOTE Important!
The Profinet name is very important. You must double-check
such information in the SINAMICS V90 PN configuration.
Here, you can configure information about the device name, Ethernet
address…
You can also use the “Online access” to find the accessible device and make
sure the information is consistent:
NOTE Important!
The Profinet name is very important. You must double-check
such information in the SINAMICS V90 PN configuration.
3. In the device view of SINAMICS V90 PN, select the standard telegram 3 from
the submodules:
After the configurations of both SINAMICS V90 PN and S7-1200 CPU, you need to
connect SINAMICS V90 PN to S7-1200 CPU:
1. In the network view, click the “Not assign” and select “PLC_1.PROFINET
Interface_1”:
1. Add a new object by double-click “Add new object” from the project tree:
Figure 5-1
Siemens AG 2018 All rights reserved
3. When a new object has been added successfully, the object node is added into
the device tree and the configuration panel for this newly added axis is opened:
Figure 5-3
5. After configuring the type of drive, we need to select a PROFIdrive in the drive
information of basic parameters:
Figure 5-5
6. After that, change the steps per revolution to 2500 because an incremental
encoder with the resolution of 2500 ppr is used in our example:
Figure 5-6
Siemens AG 2018 All rights reserved
8. After selecting “Encoder on drive”, the information about the data exchange
and encoder type is displayed and needs to be configured:
Figure 5-8
Siemens AG 2018 All rights reserved
Figure 5-11
Siemens AG 2018 All rights reserved
Figure 5-12
Figure 5-13
Siemens AG 2018 All rights reserved
13. In the pop-up dialog box, click “OK” button to proceed the operation.
Figure 5-16
14. Click the “Enable” button to make servo drive at SON (servo is on) state:
Figure 5-17
Siemens AG 2018 All rights reserved
15. When the drive SON (servo is on) has been enabled, you can select a
command from the command list:
Figure 5-18
16. Select the command “Homing”, and then click “Set home position” to set
current position to be position 0:
Figure 5-19
Siemens AG 2018 All rights reserved
18. Input values for positioning, for example, travel by a position or to target
position of 100 mm with acceleration/deceleration of 50 mm/s^2:
Figure 5-21
Remarks:
According to the configuration of mechanics, 100 mm means 10 motor revolutions.
20. Deactivate the axis control and switch to offline mode. Open the main program
block OB1 after that.
23. Add a new watch table and put all the necessary signals into this table:
Figure 5-24
24. Add a new watch table and put all the necessary signals into this table:
Figure 5-25
Siemens AG 2018 All rights reserved
26. Switch to online mode and activate the monitoring function of the watch table:
Figure 5-26
29. Modify M10.2 to 0 to complete homing and then modify M10.4 to 1 to move to
the absolute position of 1000 mm with the speed of 100 mm/s:
Siemens AG 2018 All rights reserved
Figure 5-29
30. Modify M10.4 to 0 and then modify M10.5 to 1 to move a distance of 100 mm
with the speed of 100 mm/s:
Figure 5-30
6 Related literature
Table 6-1
Topic
\1\ Siemens Industry Online Support
http://support.industry.siemens.com
\2\ Download page of this entry
https://support.industry.siemens.com/cs/ww/en/view/109743917
\3\
7 Contact
Siemens Ltd., China
DF M3-BF GMC
Nanjing, 211100
China
mailto: [email protected]
8 History
Table 8-1
Version Date Modifications
V1.0 11/2016 First version
V1.1 05/2018 Upgrade the project to TIA Portal V15